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 : IMAPIProp file shows STORE_UNICODE_OK in its PidTagStoreSupportMask Canonical Property 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 PidTagStoreSupportMask Canonical 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 PidTagStoreSupportMask Canonical 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 the PidTagAgingGranularity Canonical Property.

#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 the PidTagDisplayTypeEx Canonical Property.

#define DTE_FLAG_REMOTE_VALID0x80000000 
#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 the PidTagMessageEditorFormat Canonical Property.

#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 Namespaces

The following globally unique identifiers (GUIDs) represent the namespaces of named properties.

const GUID PS_INTERNET_HEADERS  = {0x00020386, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
const GUID PS_PUBLIC_STRINGS    = {0x00020329, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
const GUID PSETID_Appointment   = {0x00062002, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
const GUID PSETID_Address       = {0x00062004, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
const GUID PSETID_Common        = {0x00062008, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
const GUID PSETID_Log           = {0x0006200A, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
const GUID PSETID_Meeting       = {0x6ED8DA90, 0x450B, 0x101B, {0x98, 0xDA, 0x00, 0xAA, 0x00, 0x3F, 0x13, 0x05}};
const GUID PSETID_Task          = {0x00062003, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};

Definitions for Using RPC over HTTP

The following constant definitions are flags used to set the PidTagRpcOverHttpFlags Canonical Property.

The following constant definitions are used to set the PidTagRpcOverHttpProxyAuthScheme Canonical Property.

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

Additional Interface Identifiers

IMAPISync

DEFINE_GUID(IID_IMAPISync, 0x5024a385, 0x2d44, 0x486a,  0x81, 0xa8, 0x8f, 0xe, 0xcb, 0x60, 0x71, 0xdd);

IMAPISyncProgressCallback

DEFINE_GUID(IID_IMAPISyncProgressCallback, 0x5024a386, 0x2d44, 0x486a,  0x81, 0xa8, 0x8f, 0xe, 0xcb, 0x60, 0x71, 0xdd);

IID_IContabAdmin

// {CC6A3BA9-E7F5-4769-887B-34E190817BFC}
DEFINE_GUID(IID_IContabAdmin, 0xcc6a3ba9, 0xe7f5, 0x4769, 0x88, 0x7b, 0x34, 0xe1, 0x90, 0x81, 0x7b, 0xfc);

IID_IMAPISECUREMESSAGE

DEFINE_GUID(IID_IMAPISecureMessage, 0x253cc320, 0xeab6, 0x11d0, 0x82, 0x22, 0, 0x60, 0x97, 0x93, 0x87, 0xea);

IID_IMAPIGetSession

DEFINE_GUID(IID_IMAPIGetSession, 0x614ab435, 0x491d, 0x4f5b, 0xa8, 0xb4, 0x60, 0xeb, 0x3, 0x10, 0x30, 0xc6);

See Also

Community Additions

Show: