I thought it'd be interesting to document the registry values that MAPI Editor uses. Most of them are exposed in the UI through Options/Other.
All of these registry keys are stored under the registry key HKEY_CURRENT_USER\Software\Microsoft\MFCMAPI.
If a registry value is not found, the default is assumed.
True/false values are stored with the usual convention of 0 being false, and any other value being true.
Option: "Debug Output Tags (0 = None, ffff = Verbose. See Help.)" Reg Value: DebugTag (REG_DWORD) Default: 0 Meaning: Sets which debug tags are enabled. The list of tags is in the Help (F1) dialog. Note that setting the high order tags (DBGWindowProc and DBGMenu) is liable to slow the process to a crawl.
Option: "Enable Debug Output to File" Reg Value: DebugToFile (REG_DWORD) Default: 0 Meaning: Whether debug output is written to a text file. If debug tags are enabled, but file logging is not, debug output is still emitted with OutputDebugString and can be monitored using a debug monitor such as dbgview.
Option: "Debug Output File:" Reg Value: DebugFileName (REG_SZ) Default: c:\mfcmapi.log Meaning: File for debug output. This file is always opened in append mode. If this file cannot be opened, there will be no error dialog, but there should be an error output emitted through OutputDebugString.
Option: "Parse Named Properties" Reg Value: ParseNamedProps (REG_DWORD) Default: true Meaning: If enabled, use GetNamesFromIDs to determine property names.
Option: "Parse Named Properties for All Props (including those below 0x8000)" Reg Value: GetPropNamesOnAllProps (REG_DWORD) Default: false Meaning: Some providers return useful data when GetNamesFromIDs is passed a property ID outside the named property range. When this option is enabled, GetNamesFromIDs is called for all property IDs. Note that some providers will complain heavily.
Option: "Throttle Level: If nonzero, limits the number of rows displayed in tables:" Reg Value: ThrottleLevel (REG_DWORD) Default: 0 Meaning: A long time ago, MFCMAPI loaded tables on the main UI thread, so this option was necessary. Now that tables are loaded on a background thread, and table loads can be halted early by hitting Esc, this option isn't as useful. However, there may be times during testing when it is nice to only load the first few rows without having to hit Esc, so this option was left in.
Option: "Register Notifications on Hierarchy Tables During Load" Reg Value: HierNotifs (REG_DWORD) Default: true Meaning: If enabled, when a folder is added to the tree view, load its hierarchy table and register for notifications. This allows for dynamic updates of the tree view as folders are created, deleted, move, or renamed. Folders which are being monitored in this manner show as bold in the tree view.
Option: "Register Notifications on Hierarchy Tables During Node Expansion or Selection" Reg Value: HierExpandNotifs (REG_DWORD) Default: true Meaning: If enabled, when a node is selected or expanded in the tree that was not already registered for notifications, then register for notifications. If the folder isn't already bold, it will turn bold if the registration is successful.
Option: "Allow Notifications on Root Container (may cause infinite loop in some Address Books)" Reg Value: HierRootNotifs (REG_DWORD) Default: false Meaning: Some providers really do not like when MAPI clients register for notifications on the root container. The Exchange Address book is a notable example. This option is disabled by default to avoid problems with such providers.
Option: "Hierarchy Node Load Count: If nonzero, limits the number of child nodes for which the hierarchy table is automatically loaded:" Reg Value: HierNodeLoadCount (REG_DWORD) Default: 20 Meaning: Registering for notifications on hierarchy tables is expensive. So when expanding a folder, this option determines how many children of the folder get registered for notification. This option exists primarily for Public Folders where a single folder is likely to have thousands of child folders.
Option: "Perform GetProps call on objects when selecting or displaying. Extra properties will still display if unchecked." Reg Value: DoGetProps (REG_DWORD) Default: true Meaning: When enabled, whenever an row is selected in the upper pane, call GetProps to get a default list of properties for the item associated with the row. Regardless of how this is set, if Extra properties have been set, a GetProps call with the list of extra properties will still be performed.
Option: "Use GetPropList to get property list for GetProps call (otherwise use NULL tag list)" Reg Value: UseGetPropList (REG_DWORD) Default: true Meaning: There are two ways to get a default list of properties. One, the default, is to call GetPropList to get a default list of property tags, then pass this list in to GetProps. The other way, which will happen if this option is disabled, is to call GetProps with NULL for the property tag list. Some providers have bugs which can be easily exposed by calling GetProps with a NULL property tag list.
Option: "Allow duplicate columns of different types." Reg Value: AllowDupeColumns (REG_DWORD) Default: false Meaning: This is used in two places. The first is when SetColumns is called. Some providers allow for multiple columns with the same property tag, but different property types, such as one of PT_STRING8 and another of PT_UNICODE. Other providers treat this as an error. With this option enabled, two columns of the same ID but different types will be treated as different. With this option disable (default), the two columns will be merged, with the first type winning, before SetColumns is called. This option is also used in the Extra properties code for the bottom/right pane, using the same logic in constructing the list of property tags for GetProps.
Option: "Default to using row data for property list instead of calling GetProps." Reg Value: UseRowDataForSinglePropList (REG_DWORD) Default: false Meaning: Normally, when a row is selected in the upper pane or a node is selected in the tree control, if an item which inherits from IMAPIProp can be opened, then result of GetProps calls will be used to fill the property pane. If an item cannot be opened (either due to an error or because the row is not associated with an item, like in the Rules table), then the row used for the upper pane or tree node is displayed. The status pane will indicate which data is being displayed. When this option is enabled, GetProps is never attempted.
Option: "Use nice names for certain column headers and pull them to the front of the view" Reg Value: DoColumnNames (REG_DWORD) Default: true Meaning: For many types of tables, a default "interesting" set of properties has been selected. When these tables are displayed, these properties will be used to call SetColumns on the table. When this option is enabled, nice names are used in the column headers instead of the property tag names. Hovering over column headers will still display the property tag information in a tooltip bubble.
Option: "When loading tables, display SetColumns edit dialog" Reg Value: EditColumnsOnLoad (REG_DWORD) Default: false Meaning: When enabled, after the set of columns to be used for a table is determined, display a dialog allowing the user to modify the set.
Option: "Use MDB_ONLINE when calling OpenMsgStore" Reg Value: ForceMDBOnline (REG_DWORD) Default: false Meaning: See http://support.microsoft.com/kb/834496. If a cached mode profile is suddenly very slow in MAPI Editor, check that this option hasn't been set. Due to the way the underlying providers work, it may be necessary to restart MAPI Editor if the profile has already been opened before this option is toggled.
Option: "Use MAPI_NO_CACHE when calling OpenEntry" Reg Value: ForceMapiNoCache (REG_DWORD) Default: false Meaning: See http://support.microsoft.com/kb/834496. If a cached mode profile is suddenly very slow in MAPI Editor, check that this option hasn't been set. Due to the way the underlying providers work, it may be necessary to restart MAPI Editor if the profile has already been opened before this option is toggled.
Option: "Allow caching of IPersistMessage objects when opening Outlook forms in compose mode, which may prevent shutdown of certain versions of Outlook" Reg Value: AllowPersistCache (REG_DWORD) Default: false Meaning: Unless you're very interested in how form viewers work, don't mess with this option.
Option: "Pass IMAPIProgress implementation to functions that take it" Reg Value: UseIMAPIProgress (REG_DWORD) Default: false Meaning: Many MAPI functions take an optional IMAPIProgress parameter. With this option enabled, MAPI Editor's implementation of this interface is passed to these functions. Output from this interface is displayed on the status pane. Not enabled by default because many providers' support for IMAPIProgress is minimal and buggy.
Option: "Use IID_IMessageRaw when opening messages" Reg Value: UseMessageRaw (REG_DWORD) Default: true Meaning: See http://support.microsoft.com/kb/908074. When enabled, IID_IMessageRaw is used for opening messages. Most providers do not support this interface.
Option: Not list in Other/Options. Instead, this is a check box on the Help (F1) dialog. Reg Value: DisplayAboutDialog (REG_DWORD) Default: true Meaning: When enabled, displays the Help (F1) dialog when MAPI Editor is started. Since this option can be toggled directly from the dialog, it is not listed in Options/Other.
Any updates on releasing the source code of MAPI editor?
I am trying to use part of the mfcmapi code to load message in non modal form.
Current problem is that I get these link errors:
2>gui_core.lib(MAPIMessage.obj) : error LNK2001: unresolved external symbol _IID_IMAPIForm
2>gui_core.lib(MyMAPIFormViewer.obj) : error LNK2001: unresolved external symbol _IID_IMAPIViewAdviseSink
2>gui_core.lib(MyMAPIFormViewer.obj) : error LNK2001: unresolved external symbol _IID_IMAPIViewContext
2>gui_core.lib(MyMAPIFormViewer.obj) : error LNK2001: unresolved external symbol _IID_IMAPIMessageSite
2>gui_core.lib(MyMAPIFormViewer.obj) : error LNK2001: unresolved external symbol _IID_IPersistMessage
Do you know which library exports these ?
No library exports them - you just need to declare them right. In one (and only one!) of your CPP files, you need to include initguid.h before you include your guid headers.
In the MFCMAPI source, I do this in guids.cpp:
Incidently, the comments in MAPIGuid.h explain this.
Works great. Thank you very much.