Click to open or copy the files for the Simple.cli sample.
Click to open or copy the common files (required).
The Simple.cli sample application illustrates using Simple MAPI functions. The sample is a very simple mail client. Using it is intuitive and straightforward.
When writing simple MAPI applications, the addresses of all of the simple MAPI functions have to be obtained explicitly (using GetProcAddress), as opposed to linking to the import library for MAPI.DLL.
If sending or receiving mail is not the primary function of your application, you can test the presence of simple MAPI in a system without incurring high cost of trying to load a DLL by testing the value of the MAPI variable. It is 1 if simple MAPI is installed. The variable is located in the [mail] section of Win.ini on 16-bit Windows and Windows® NT version 3.51 and earlier; it is under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem in the registry on Windows® 95 and Windows NT 4.0 and later.
This sample uses the following keywords:
_lclose; _llseek; _lread; _lwrite; aboutdlgproc; assert; atoi; bitblt; composedlgproc; convertdaterec; copyattachment; copyfile; copymemory; copyrecipient; createcompatiblebitmap; createcompatibledc; createdibitmap; creatediscardablebitmap; createfontindirect; deinitapplication; deinitbmps; deinitsimplemapi; deletebitmaplb; deletedc; deletefile; deletemsgnode; deleteobject; detailsdlgproc; dialogbox; drawfocusrect; drawitem; exttextout; findnode; findresource; fnameinlist; freemsglist; freeresource; fsmapiinstalled; getbvalue; getdc; getdlgitem; getgvalue; getnextfile; getobject; getprofileint; getprofilestring; getrvalue; getstockobject; getsyscolor; gettextmetrics; getversionex; getwindowfont; globalallocptr; globalfreeptr; inboxdlgproc; initapplication; initbmps; initinstance; initsimplemapi; insertmsgnode; invalidaterect; loadalterbitmap; loadbitmaplb; loadcursor; loadlibrary; loadresource; loadstring; lockresource; logsendmail; lstrcmp; lstrcpy; lstrlen; mainwndproc; makedisplaynamestr; makeintresource; makelong; makemessagebox; makemsgnode; makenewmessage; mapifreebuffer; mapisendmail; max; measureitem; memcpy; memset; messagebox; messageboxa; openfile; optionsdlgproc; outtextformat; pvalloc; pvallocmore; pvfree; readmaildlgproc; regclosekey; regopenkeyex; regqueryvalueex; releasedc; resolvefriendlynames; rgb; rgbinvertrgb; savefileattachments; savemsgchanges; securemenu; selectobject; senddlgitemmessage; sendmessage; setbkcolor; setcursor; setdlgitemtext; seterrormode; setfocus; setlbfont; setrect; setrgbvalues; settextcolor; setwindowfont; strtok; text; togglemenustate; unlockresource; winmain; wsprintf