Route.cli: MAPI Routing Client Sample

Visual Studio 6.0

The Route.cli sample illustrates two important aspects of MAPI:

  • How to use specially defined named properties, known as routing property sets, for storing addressing information when sending messages across different messaging systems.

  • How to use basic MAPI facilities, as an e-mail client might.

Different messaging systems use different address formats. So when a message crosses a domain boundary, usually passing through a gateway, the addressing information needs to be translated from the format used by the original domain to the format used by the new domain. Almost all gateways do this for the sender and ordinary message recipients. MAPI defines a special mechanism for preserving the addressing information for users who are not on the message recipient list. See "Sending Messages Between Domains" in the MAPI online documentation for more information. This sample uses the mechanism to route a message to a list of people one after another.

The routing client demonstrates the use of routing property sets by implementing a simple linear route for a message with optional attached documents. The routing list is stored in the routing property sets, and each user who receives the message has an opportunity to edit the message and pass it to the next person in the routing list. Each user may optionally edit the remainder of the route as well.

The sample routing client also serves as a simple e-mail client. Features include:

  • Viewing the contents table of any folder in any message store.

  • Sending or reading any message, using the form registered for it.

  • Forcing new mail to be downloaded to the default message store.

  • Deleting mail.

Building SDK Samples

This sample uses the following keywords:

aboutdlgproc; address; assert; bitblt; cbnewadrlist; clientlogoff; clientlogon; common_oncommand; commondlgproc; compareentryids; composedlgproc; configmovebuttons; convertdaterec; copyfile; copymemory; copyto; createattach; createcompatiblebitmap; createcompatibledc; createdialogdata; createdibitmap; creatediscardablebitmap; createfontindirect; createmessage; createnewattachment; createoutmessage; createsolidbrush; ctl3d_autosubclass; ctl3d_initialize; ctl3d_uninitialize; debugtrace; debugtraceproblems; debugtraceresult; deinitapplication; deinitbmps; deinitmapi; deinitroutedata; deleteattach; deletebitmaplb; deletedc; deletemessages; deletemsgnode; deleteobject; deleteprops; delivernow; delrouteprops; details; detailsdlgproc; dialogboxparam; drawfocusrect; drawitem; edit_getlinecount; edit_getmodify; edit_lineindex; edit_linelength; enablewindow; enddialog; exttextout; fgetfoldchooser; filetimetolocalfiletime; filetimetosystemtime; findresource; firstrecipient; flushqueues; formatfiletime; formatmessageid; freelibrary; freemsglist; freeoarlist; freepadrlist; freeprows; freeresource; getattachmenttable; getbvalue; getcontentstable; getdc; getdlgitem; getgvalue; gethierarchytable; getidsfromnames; getlasterror; getmsgstorestable; getobject; getparent; getprocaddress; getprops; getreceivefolder; getrouteaddrlists; getrouteindices; getrouteproptagarray; getrouteproptagarrayfast; getrvalue; getscode; getstatustable; getstockobject; getsyscolor; gettextmetrics; getwindowfont; getwindowlong; globalallocptr; globalfreeptr; handle_msg; hasattachment; hr_failed; hr_succeeded; hrgetoneprop; hrqueryallrows; hrsetoneprop; inbox_oncommand; inboxdlgproc; initapplication; initbmps; initinstance; initmapi; initroutenameidarray; insertmsgnode; invalidaterect; listbox_addstring; listbox_deletestring; listbox_getcount; listbox_getcursel; listbox_getitemdata; listbox_getitemrect; listbox_gettext; listbox_insertstring; listbox_resetcontent; listbox_setcursel; listbox_setitemdata; loadalterbitmap; loadbitmaplb; loadcursor; loadlibrary; loadresource; loadstring; lockresource; logoff; logsendmail; lstrcat; lstrcmpi; lstrcpy; lstrlen; main_oncommand; mainwndproc; makeintresource; makemessagebox; makemsgnode; makenewroutemessage; mapdialogrect; mapiallocatebuffer; mapiallocatemore; mapifreebuffer; mapiinitialize; mapilogonex; mapiopenformmgr; mapiuninitialize; max; measureitem; memcpy; memset; messagebox; modifyrecipients; openaddressbook; openattach; opendefaultstore; openentry; openmsgstore; openoutfolder; openproperty; optionsdlgproc; outtextformat; populateattachlist; populatemessages; populateroutelistbox; ppropfindprop; prepareform; preparerecips; prop_id; prop_tag; prop_type; rbox_oncommand; rbox_oninitdialog; read_oncommand; read_oninitdialog; readmaildlgproc; release; releasedc; resultfromscode; rgb; rgbinvertrgb; rt_oncommand; rt_oninitdialog; saveattachment; savechanges; scaddconversationindex; scduppropset; securemenu; selectform; selectobject; setbkcolor; setcursor; setdlgitemtext; seterrormode; setfocus; setlbfont; setmessageclass; setprops; setreadflag; setrect; setrgbvalues; setrouteindices; setrouteprops; settextcolor; setwindowfont; setwindowlong; setwindowpos; setwindowtext; showform; sizedsproptagarray; sizedssortorderset; stat; submitmessage; switch; szfindlastch; text; togglemenustate; ulrelease; unlockresource; winmain; wsprintf; zeromemory