The MFCMAPI user interface can display all the folders and the subfolders that are in any message store. It can also display any address book that is loaded in a profile.
A Microsoft Visual C++ Microsoft Foundation Classes (MFC) project, MFCMAPI is designed as a series of MFC dialog boxes that implement a directory hierarchy in the left pane and a property list in the right pane. Every dialog box has a number of menu items that you can use to act upon the active items. This includes an empty test function that you can use to host test code. For details on the dialog boxes and their corresponding classes, see the Readme.txt file that is included with the project.
To download the latest version of MFCMAPI, visit the following Web site:
Generic MAPI functionsMost of the following functions are contained in the MAPIFunctions.cpp file:
- AddTestAddress - Adds a hard-coded one-off address to a message.
- ConcatSPropTagArrays - Takes two SPropTagArrays and combines them.
- CopySBinary - Copies one SBinary to another to handle memory management.
- CopyLargeNamedPropertyToDebugOutput - Demonstrates how to read a large named MAPI property by using IStream.
- CopyBodyToLargeNamedProperty - Demonstrates how to write a large named MAPI property by using PR_BODY as the source.
- DeleteMessagePermanently - Deletes a message by using the DeleteMessages function.
- DeleteToDeletedItems - Uses CopyMessages to move a message to the Deleted Items folder.
- FindPropInPropTagArray - Searches an SPropTagArray for a particular property.
- LoadFromMSG - Loads an .msg file into an IMessage.
- ManualResolve - Manually resolves an address.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:266351 How to manually resolve an address book entry by using MAPI
- OpenDefaultMessageStore - Locates and opens the default message store from IMAPISession.
- OpenMessageModal - Uses PrepareForm and ShowForm to display a message.
- OpenOtherUsersMailbox - Uses HrMailboxLogon to open a mailbox.
- OpenPublicMessageStore - Locates and opens a public message store from IMAPISession.
- SaveToMSG - Saves an IMessage to an .msg file.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:171907 Save message to MSG compound file
- WriteAttachmentToFile - Saves an attachment to a file.
IMAPIAdviseSink implementationThe IMAPIAdviseSink sample contains two implementations of the IMAPIAdviseSink interface; one for simple new mail notification, and one for more complex table notification.
Note The directory hierarchy views in MFCMAPI do not take advantage of notifications. There is a Refresh View menu command on the Actions menu for most dialog boxes that use the directory hierarchy view.
MAPI Form Viewer implementationThe MAPI Form Viewer sample contains a class that implements the IMAPIMessageSite, IMAPIViewContext, and IMAPIViewAdviseSink interfaces. Together, these make for a MAPI Form Viewer implementation. The code that uses the Form Viewer is in the OpenMessageNonModal function that is contained in the MAPIFunctions.cpp file.
For more information about another implementation of a MAPI Form Viewer, click the following article number to view the article in the Microsoft Knowledge Base:
문서 ID: 291794 - 마지막 검토: 2009. 9. 22. - 수정: 1