Share via


Additional MAPI Constants

Additional MAPI Constants

This topic contains constant definitions and interface identifiers used by MAPI APIs that were not previously exposed and documented.

Constants

MAPI_BG_SESSION 0x00200000 A client can call the MAPILogonEx function, setting the MAPI_BG_SESSION flag in the flFlags parameter to log on to a session and carry out any operations in the background. In general, if a client intends to do processing on a background thread or in a separate process in a manner that is unobtrusive to the foreground thread, it should call MAPILogonEx with the MAPI_BG_SESSION flag. An example where this is used is a client application, such as an indexing engine, opening a Personal Folders File (PST) for background type access.
MAPI_CACHE_ONLY 0x00004000 A client can call the IAddrBook::OpenEntry method, setting the MAPI_CACHE_ONLY flag in the ulFlags parameter to open an address book entry and to access it subsequently only from the cache. An example where this is used is a client application that wants to open the Global Address List in Cached Exchange mode and access an entry in that Address Book from the cache without creating traffic between the client and the server.
DIALOG_MODAL ((ULONG) 0x00000001) When a client calls the IAddrBook::Details method, the client must set the DIALOG_MODAL flag in the ulFlags parameter to display the modal dialog box showing the details about a particular address book entry. This constant is defined in mapidefs.h.
ITEMPROC_FORCE 0x00000800 In Outlook 2007, wrapped PST stores have rules and spam filtering processed on new messages before MAPI clients are notified of the new messages. A provider or client using the IMAPIFolder::CreateMessage method to create a new message in PST stores should set the ITEMPROC_FORCE flag in the ulFlags parameter of the IMAPIProp::SaveChanges method to indicate to the PST store that the message is eligible for rules processing before the store notifies any listening client of the arrival of the new message. Note that such rules processing only applies to new messages created on a server that is not a Microsoft Exchange Server, because Exchange Server processes rules for messages on the server. Hence the provider or client creating the message must pass this flag in combination with NON_EMS_XP_SAVE that indicates the server is not an Exchange server.
MAPI_NO_CACHE 0x00000200 If Microsoft Office Outlook is in Cached Exchange Mode and a store has been opened in cached mode, a client or service provider can call IMsgStore::OpenEntry, setting the MAPI_NO_CACHE flag in the ulFlags parameter to open an item or a folder on the remote store. Note that if you open the message store with the MDB_ONLINE flag on the remote server, you do not have to use the MAPI_NO_CACHE flag.
MAPI_UNICODE 0x80000000 A client or service provider can call the OpenIMsgOnIStg function, setting the MAPI_UNICODE flag in the ulFlags parameter to create Unicode .msg files. The resulting IMessage file shows STORE_UNICODE_OK in its PR_STORE_SUPPORT_MASK and supports Unicode properties. This constant is defined in mapidefs.h.
MDB_ONLINE 0x00000100 If Outlook is in Cached Exchange Mode, a client or service provider can call the IMAPISession::OpenMsgStore method, setting the MDB_ONLINE flag in the ulFlags parameter to override the connection to the local message store and open the store on the remote server. Note that you cannot open an Exchange store in cached mode and in non-cached mode at the same time in the same MAPI session. If you have already opened the cached message store, you must either close the store before you open it with this flag, or open a new MAPI session where you can open the Exchange store on the remote server by using this flag.
NON_EMS_XP_SAVE 0x00001000 A client can call the IMAPIProp::SaveChanges method, setting the NON_EMS_XP_SAVE flag in the ulFlags parameter to indicate that the message has not been delivered from an Exchange server. This flag should be used in combination with the ITEMPROC_FORCE flag in the ulFlags parameter to indicate to a PST store that the message is eligible for rules processing before the PST store notifies any listening client of the arrival of the message. This rules processing only applies to new messages that are created with IMAPIFolder::CreateMessage on a server that is not an Exchange server (in which case the Exchange server would have already processed rules on the message).
SPAMFILTER_ONSAVE 0x00000080 A client can call IMAPIProp::SaveChanges, setting the SPAMFILTER_ONSAVE flag in the ulFlags parameter to enable spam filtering on a message that is being saved. Spam filtering support is available only if the sender’s e-mail address type is Simple Mail Transfer Protocol (SMTP), and the message is being saved to a store for a Personal Folders file (PST).
STORE_ITEMPROC 0x00200000 If this flag is set in the PR_STORE_SUPPORT_MASK property of a wrapped PST store, it indicates that when a new message arrives at the store, the store has rules and spam filtering processed on the message separately. The store then calls IMAPISupport::Notify, setting fnevNewMail in the NOTIFICATION structure that is passed as a parameter, and passing the details of the new message to a listening client. Subsequently, when the listening client receives the notification, it does not process rules on the message.
STORE_UNICODE_OK 0x00040000 If this flag is included in the PR_STORE_SUPPORT_MASK property, it indicates that the store supports Unicode storage. A client can look for the presence of the flag to decide whether to request or to save Unicode information to the store.

Definitions for Archiving Items in a Folder

The following constant definitions are values used to set PR_AGING_GRANULARITY.

  #define AG_MONTHS 0
#define AG_WEEKS  1
#define AG_DAYS   2

Definitions for Displaying Remote Objects

The following constant and macro definitions are for displaying remote objects. For more information, see PR_DISPLAY_TYPE_EX.

  #define DTE_FLAG_REMOTE_VALID	0x80000000
#define DTE_FLAG_ACL_CAPABLE    0x40000000
#define DTE_MASK_REMOTE        	0x0000ff00
#define DTE_MASK_LOCAL        	0x000000ff
 
#define DTE_IS_REMOTE_VALID(v)	(!!((v) & DTE_FLAG_REMOTE_VALID))
#define DTE_IS_ACL_CAPABLE(v)	(!!((v) & DTE_FLAG_ACL_CAPABLE))
#define DTE_REMOTE(v)		(((v) & DTE_MASK_REMOTE) >> 8)
#define DTE_LOCAL(v)		((v) & DTE_MASK_LOCAL)
 
#define DT_ROOM			((ULONG) 0x00000007)
#define DT_EQUIPMENT		((ULONG) 0x00000008)
#define DT_SEC_DISTLIST		((ULONG) 0x00000009)

Definitions for Message Format

The following constant definitions are values that are used to set PR_MSG_EDITOR_FORMAT.

  #define EDITOR_FORMAT_DONTKNOW  ((ULONG) 0)
#define EDITOR_FORMAT_PLAINTEXT ((ULONG) 1)
#define EDITOR_FORMAT_HTML      ((ULONG) 2)
#define EDITOR_FORMAT_RTF       ((ULONG) 3)

Definitions for Using RPC over HTTP

The following constant definitions are flags used to set PR_ROH_FLAGS.

  #define ROHFLAGS_USE_ROH            0x1
#define ROHFLAGS_SSL_ONLY           0x2
#define ROHFLAGS_MUTUAL_AUTH        0x4
#define ROHFLAGS_HTTP_FIRST_ON_FAST 0x8
#define ROHFLAGS_HTTP_FIRST_ON_SLOW 0x20

The following constant definitions are used to set PR_ROH_PROXY_AUTH_SCHEME.

  #define ROHAUTH_BASIC 0x1
#define ROHAUTH_NTLM  0x2

Interface Identifiers

Use the DEFINE_OLEGUID macro defined in the Microsoft Windows Software Development Kit (SDK) header file guiddef.h to associate the GUID symbolic name with its value.

//{0002038A-0000-0000-C000-000000000046}

  #if !defined(INITGUID) || defined(USES_IID_IMessageRaw)
DEFINE_OLEGUID(IID_IMessageRaw,	0x0002038A, 0, 0);
#endif

See Also

About MAPI Additions

How to: Access a Store on the Remote Server When Outlook is in Cached Exchange Mode

How to: Open a Store on the Remote Server When Outlook is in Cached Exchange Mode

How to: Manage a Message in an OST Without Invoking a Synchronization in Cached Exchange Mode