共用方式為


MAPI Constants

Applies to: Office 2010 | Outlook 2010 | Visual Studio

In this article
Class and Interface Identifiers
Attachment Security Conversion API
MAPI-MIME Conversion API
Offline State API
Outlook Named Properties
Replication API
MAPI Store
Additional MAPI Constants

This topic contains constant definitions, MAPI interface declarations, and class and interface identifiers used by the MAPI APIs.

Class and Interface Identifiers

Use the DEFINE_GUID macro defined in the Microsoft Windows Software Development Kit (SDK) header file guiddef.h to associate globally unique identifier (GUID) symbolic names with their values, unless otherwise indicated.

Attachment Security Conversion API

This section contains constant definitions and interface identifiers for the Attachment Security API.

// {b2533636-c3f3-416f-bf04-aefe41abaae2}
DEFINE_GUID(IID_IAttachmentSecurity, 0xb2533636, 0xc3f3, 0x416f, 0xbf, 0x04, 0xae, 0xfe, 0x41, 0xab, 0xaa, 0xe2);

Use the MAPIMETHOD macro defined in the Windows SDK header file mapidefs.h to define the pure virtual function IsAttachmentBlocked.

#define MAPI_IATTACHMENTSECURITY_METHODS(IPURE)         MAPIMETHOD(IsAttachmentBlocked)         (LPCWSTR pwszFileName, BOOL *pfBlocked) IPURE;

Use the DECLARE_MAPI_INTERFACE_ macro defined in the Windows SDK header file mapidefs.h to define the virtual method table for IAttachmentSecurity.

DECLARE_MAPI_INTERFACE_(IAttachmentSecurity, IUnknown) 
{ 
    BEGIN_INTERFACE 
    MAPI_IUNKNOWN_METHODS(PURE) 
    MAPI_IATTACHMENTSECURITY_METHODS(PURE) 
};

MAPI-MIME Conversion API

This section contains constant definitions and class and interface identifiers for the MAPI-MIME Conversion API.

Constants

CCSF_SMTP

0x0002

CCSF_NOHEADERS

0x0004

CCSF_USE_TNEF

0x0010

CCSF_INCLUDE_BCC

0x0020

CCSF_8BITHEADERS

0x0040

CCSF_USE_RTF

0x0080

CCSF_PLAIN_TEXT_ONLY

0x1000

CCSF_NO_MSGID

0x4000

E_INVALIDARG

As defined in the Microsoft® Windows Software Development Kit (SDK) header file winerror.h

Class Identifiers

// {4e3a7680-b77a-11d0-9da5-00c04fd65685}
DEFINE_GUID(CLSID_IConverterSession, 0x4e3a7680, 0xb77a, 0x11d0, 0x9d, 0xa5, 0x0, 0xc0, 0x4f, 0xd6, 0x56, 0x85);

Interface Identifiers

// {4b401570-b77b-11d0-9da5-00c04fd65685}
DEFINE_GUID(IID_IConverterSession, 0x4b401570, 0xb77b, 0x11d0, 0x9d, 0xa5, 0x0, 0xc0, 0x4f, 0xd6, 0x56, 0x85);

Offline State API

This section contains constant definitions and class and interface identifiers for the Offline State API.

Constants

E_INVALIDARG

As defined in the Microsoft® Windows® Software Development Kit (SDK) header file winerror.h

E_NOINTERFACE

As defined in the Windows (SDK) header file winerror.h

MAPIOFFLINE_ADVISE_DEFAULT

(ULONG)0

MAPIOFFLINE_UNADVISE_DEFAULT

(ULONG)0

MAPIOFFLINE_ADVISE_TYPE_STATECHANGE

1

MAPIOFFLINE_CAPABILITY_OFFLINE

0x1

MAPIOFFLINE_CAPABILITY_ONLINE

0x2

MAPIOFFLINE_FLAG_BLOCK

0x00002000

MAPIOFFLINE_FLAG_DEFAULT

0x00000000

MAPIOFFLINE_STATE_ALL

0x003f037f

Online or offline

MAPIOFFLINE_STATE_OFFLINE_MASK

0x00000003

MAPIOFFLINE_STATE_OFFLINE

0x00000001

MAPIOFFLINE_STATE_ONLINE

0x00000002

Class Identifiers

//{fbeffd93-b11f-4094-842b-96dcd31e63d1}
DEFINE_GUID(GUID_GlobalState, 0xfbeffd93, 0xb11f, 0x4094, 0x84, 0x2b, 0x96, 0xdc, 0xd3, 0x1e, 0x63, 0xd1);

Interface Identifiers

//{000672B5-0000-0000-c000-000000000046}
DEFINE_GUID(IID_IMAPIOffline, 0x000672B5, 0x0000, 0x0000, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46);

//{0317bde5-fc29-44cd-8dcd-36125a3be9ec}
DEFINE_GUID(IID_IMAPIOfflineNotify, 0x0317bde5, 0xfc29, 0x44cd, 0x8d, 0xcd, 0x36, 0x12, 0x5a, 0x3b, 0xe9, 0xec);

//{42175607-ff3e-4790-bc18-66c8643e6424
DEFINE_GUID(IID_IMAPIOfflineMgr, 0x42175607, 0xFF3E, 0x4790, 0xbc, 0x18, 0x66, 0xc8, 0x64, 0x3e, 0x64, 0x24);

Outlook Named Properties

This section contains constant definitions for named properties and their namespaces, and other related constants.

Definitions for Named Properties

 
#define dispidMeetingType0x0026 
#define dispidFileUnder0x8005 
#define dispidYomiFirstName 0x802C 
#define dispidYomiLastName 0x802D 
#define dispidYomiCompanyName 0x802E 
#define dispidWorkAddressStreet 0x8045 
#define dispidWorkAddressCity 0x8046 
#define dispidWorkAddressState 0x8047 
#define dispidWorkAddressPostalCode 0x8048 
#define dispidWorkAddressCountry 0x8049 
#define dispidWorkAddressPostOfficeBox 0x804A 
#define dispidInstMsg 0x8062 
#define dispidEmailDisplayName 0x8080 
#define dispidEmailAddrType 0x8082 
#define dispidEmailEmailAddress 0x8083 
#define dispidEmailOriginalDisplayName 0x8084 
#define dispidEmail1OriginalEntryID0x8085 
#define dispidEmail2DisplayName 0x8090 
#define dispidEmail2AddrType 0x8092 
#define dispidEmail2EmailAddress 0x8093 
#define dispidEmail2OriginalDisplayName 0x8094 
#define dispidEmail2OriginalEntryID0x8095 
#define dispidEmail3DisplayName 0x80A0 
#define dispidEmail3AddrType 0x80A2 
#define dispidEmail3EmailAddress 0x80A3 
#define dispidEmail3OriginalDisplayName 0x80A4 
#define dispidEmail3OriginalEntryID0x80A5 
#define dispidTaskStatus 0x8101 
#define dispidTaskStartDate 0x8104 
#define dispidTaskDueDate 0x8105 
#define dispidTaskActualEffort 0x8110 
#define dispidTaskEstimatedEffort 0x8111 
#define dispidTaskFRecur 0x8126 
#define dispidBusyStatus0x8205 
#define dispidLocation 0x8208 
#define dispidApptStartWhole 0x820D 
#define dispidApptEndWhole 0x820E 
#define dispidApptDuration 0x8213 
#define dispidRecurring 0x8223 
#define dispidTimeZoneStruct0x8233 
#define dispidAllAttendeesString 0x8238 
#define dispidToAttendeesString 0x823B 
#define dispidCCAttendeesString 0x823C 
#define dispidConfCheck0x8240 
#define dispidApptCounterProposal 0x8257 
#define dispidApptTZDefStartDisplay0x825E 
#define dispidApptTZDefEndDisplay0x825F 
#define dispidApptTZDefRecur0x8260 
#define dispidReminderTime0x8502 
#define dispidReminderSet 0x8503 
#define dispidFormStorage0x850F 
#define dispidPageDirStream0x8513 
#define dispidSmartNoAttach 0x8514 
#define dispidCommonStart 0x8516 
#define dispidCommonEnd 0x8517 
#define dispidFormPropStream0x851B 
#define dispidRequest 0x8530 
#define dispidCompanies 0x8539 
#define dispidContacts0x853A 
#define dispidPropDefStream0x8540 
#define dispidScriptStream0x8541 
#define dispidCustomFlag0x8542 
#define dispidReminderNextTime 0x8560 
#define dispidHeaderItem0x8578 
#define dispidUseTNEF0x8582 
#define dispidToDoTitle0x85A4 
#define dispidLogType 0x8700 
#define dispidLogStart 0x8706 
#define dispidLogDuration 0x8707 
#define dispidLogEnd 0x8708 

Definitions for Namespaces

The following globally unique identifiers (GUIDs) represent the namespaces of the 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}}; 

Refer to the section MAPI Store for the PSETID definitions.

Other Constants

INSP_ONEOFFFLAGS

0xD000000

INSP_PROPDEFINITION

0x2000000

MNID_ID

As defined in the header file mapidefs.h.

MNID_STRING

As defined in the header file mapidefs.h.

mtgNone

0x0

mtgRequest

0x00000001

mtgFullUpdate

0x00010000

mtgInfoUpdate

0x00020000

mtgOutofDate

0x00080000

mtgDelegated

0x00100000

Replication API

This section contains constant definitions, MAPI interface declarations, and class and interface identifiers for the Replication API.

Constants

The following is a MAPIUID structure identifying a MAPI service provider:

const MAPIUID g_muidProvPrvNST = 
 { 0xE9, 0x2F, 0xEB, 0x75, 0x96, 0x50, 0x44, 0x86, 
      0x83, 0xB8, 0x7D, 0xE5, 0x22, 0xAA, 0x49, 0x48 };

DNH_OK

0x00010000

DNT_OK

0x00010000

HSF_LOCAL

0x00000008

HSF_COPYDESTRUCTIVE

0x00000010

HSF_OK

0x00010000

MDB_OST_LOGON_UNICODE

((ULONG) 0x00000800)

MDB_OST_LOGON_ANSI

((ULONG) 0x00001000)

SHOW_SOFT_DELETES

((ULONG) 0x00000002)

SS_ACTIVE

0

SS_SUSPENDED

1

SYNC_UPLOAD_HIERARCHY

0x00000001

SYNC_DOWNLOAD_HIERARCHY

0x00000002

SYNC_UPLOAD_CONTENTS

0x00000040

SYNC_DOWNLOAD_CONTENTS

0x00000080

SYNC_OUTGOING_MAIL

0x00000200

SYNC_BACKGROUND

0x00001000

SYNC_THESE_FOLDERS

0x00020000

SYNC_HEADERS

0x02000000

UPC_OK

0x00010000

UPD_ASSOC

0x00000001

UPD_MOV

0x00000002

UPD_OK

0x00010000

UPD_MOVED

0x00020000

UPD_UPDATE

0x00040000

UPD_COMMIT

0x00080000

UPF_NEW

0x00000001

UPF_MOD_PARENT

0x00000002

UPF_MOD_PROPS

0x00000004

UPF_DEL

0x00000008

UPF_OK

0x00010000

UPH_OK

0x00010000

UPM_ASSOC

0x00000001

UPM_NEW

0x00000002

UPM_MOV

0x00000004

UPM_MOD_PROPS

0x00000008

UPM_HEADER

0x00000010

UPM_OK

0x00010000

UPM_MOVED

0x00020000

UPM_COMMIT

0x00040000

UPM_DELETE

0x00080000

UPM_SAVE

0x00100000

UPR_ASSOC

0x00000001

UPR_READ

0x00000002

UPR_OK

0x00010000

UPR_COMMIT

0x00020000

UPS_UPLOAD_ONLY

0x00000001

UPS_DNLOAD_ONLY

0x00000002

UPS_THESE_FOLDERS

0x00000080

UPS_OK

0x00010000

UPT_PUBLIC

0x00000001

UPT_OK

0x00010000

UPV_ERROR

0x00010000

UPV_DIRTY

0x00020000

UPV_COMMIT

0x00040000

Interface Declarations

DECLARE_MAPI_INTERFACE_PTR(IExchangeImportHierarchyChanges,PXIHC);

DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges,PXICC);

Interface Identifiers

//{4FDEEFF0-0319-11CF-B4CF-00AA0DBBB6E6}
DEFINE_GUID (IID_IPSTX, 0x4FDEEFF0, 0x0319, 0x11CF, 0xB4, 0xCF, 0x00, 0xAA, 0x0D, 0xBB, 0xB6, 0xE6)

//{2067A790-2A45-11D1-EB86-00A0C90DCA6D}
DEFINE_GUID (IID_IPSTX2, 0x2067A790, 0x2A45, 0x11D1, 0xEB, 0x86, 0x00, 0xA0, 0xC9, 0x0D, 0xCA, 0x6D)

//{55f15320-111b-11d2-a999-006008b05aa7}
DEFINE_GUID (IID_IPSTX3, 0x55f15320, 0x111b, 0x11d2, 0xa9, 0x99, 0x00, 0x60, 0x08, 0xb0, 0x5a, 0xa7)

//{aa2e2092-ac08-11d2-a2f9-0060b0ec3d4f}
DEFINE_GUID (IID_IPSTX4, 0xaa2e2092, 0xac08, 0x11d2, 0xa2, 0xf9, 0x00, 0x60, 0xb0, 0xec, 0x3d, 0x4f)

//{55f15322-111b-11d2-a999-006008b05aa7}
DEFINE_GUID (IID_IPSTX5, 0x55f15322, 0x111b, 0x11d2, 0xa9, 0x99, 0x00, 0x60, 0x08, 0xb0, 0x5a, 0xa7)

//{55f15323-111b-11d2-a999-006008b05aa7}
DEFINE_GUID (IID_IPSTX6, 0x55f15323, 0x111b, 0x11d2, 0xa9, 0x99, 0x00, 0x60, 0x08, 0xb0, 0x5a, 0xa7)

//{d2d85db4-840f-49b8-9982-07d2405ec6b7}
DEFINE_GUID (IID_IOSTX, 0xd2d85db4,  0x840f, 0x49b8, 0x99, 0x82, 0x07, 0xd2, 0x40, 0x5e, 0xc6, 0xb7)

Use the two following interface identifiers with IMAPIContainer::OpenEntry, IMAPISession::OpenEntry, or IMsgStore::OpenEntry to open and ignore any provider check on a folder object and a message object, respectively.

//{57D333A0-F589-4b23-A3F9-85F82FEC153C}
DEFINE_GUID (IID_IMAPIFolderNoProvChk, 0x57D333A0, 0xF589, 0x4b23, 0xA3, 0xF9, 0x85, 0xF8, 0x2F, 0xEC, 0x15, 0x3C)

//{C3505457-7B2E-4c3b-A8D6-6DD949BB97A1}
DEFINE_GUID (IID_IMessageNoProvChk, 0xC3505457, 0x7B2E, 0x4c3b, 0xA8, 0xD6, 0x6D, 0xD9, 0x49, 0xBB, 0x97, 0xA1)

MAPI Store

This section contains constant definitions and interface identifiers used by APIs that interface with a MAPI store.

Constants

fnevIndexing

((ULONG) 0x00010000)

A store provider can specify fnevIndexing in the ulEventType member of the NOTIFICATION structure to notify the indexer that an object is ready for indexing. The info member of the NOTIFICATION structure contains an EXTENDED_NOTIFICATION structure.

FS_NONE

0x00

A client can call IFolderSupport::GetSupportMask and check for the returned bitmask. FS_NONE indicates that the folder does not support sharing.

FS_SUPPORTS_SHARING

0x01

A client can call IFolderSupport::GetSupportMask and check for the returned bitmask. FS_SUPPORTS_SHARING indicates that the folder supports sharing.

INDEXING_SEARCH_OWNER

((ULONG) 0x00000001)

Identifies the process that is pushing a notification to an indexer that an object is ready for indexing.

MNID_ID

As defined in the Microsoft Windows Software Development Kit (SDK) header file mapidefs.h.

A value for the ulKind field of the MAPINAMEID structure.

MNID_STRING

As defined in the Microsoft Windows Software Development Kit (SDK) header file mapidefs.h.

A value for the ulKind field of the MAPINAMEID structure.

MSCAP_RES_ANNOTATION

((ULONG) 0x00000001)

If a client specifies MSCAP_SEL_RESTRICTION in mscapSelector for IMSCapabilities::GetCapabilities, GetCapabilities can return this value if the store ignores invalid parameters in a restriction.

MSCAP_SECURE_FOLDER_HOMEPAGES

((ULONG) 0x00000020)

If a client specifies MSCAP_SEL_FOLDER in mscapSelector for IMSCapabilities::GetCapabilities, GetCapabilities can return this value if the store is a non-default store that supports folder homepages.

STORE_PUSHER_OK

((ULONG) 0x00800000)

A client can get the property PR_SUPPORT_MASK to determine the characteristic of a message store. If the store provider sets the STORE_PUSHER_OK flag in the bitmask, that means the MAPI Protocol Handler will not crawl the store, and the store is responsible to push any changes through notifications to the indexer to have messages indexed.

Definitions for Namespaces

The following globally unique identifiers (GUIDs) represent the namespaces of named properties. They are indexed by the MAPI Protocol Handler (PH), and are documented as read-only.

Warning

The named properties should not be used to create or modify items.

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_Address       = {0x00062004, 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_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}}; 

MNID_ID Properties

// In PSETID_Address
#define dispidWorkAddressStreet 0x8045
#define dispidWorkAddressCity 0x8046
#define dispidWorkAddressState 0x8047
#define dispidWorkAddressPostalCode 0x8048
#define dispidWorkAddressCountry 0x8049
#define dispidInstMsg 0x8062
#define dispidEmailDisplayName 0x8080
#define dispidEmailOriginalDisplayName 0x8084

// In PSETID_Appointment
#define dispidLocation 0x8208
#define dispidApptStartWhole 0x820D
#define dispidApptEndWhole 0x820E
#define dispidApptDuration 0x8213
#define dispidRecurring 0x8223
#define dispidAllAttendeesString 0x8238
#define dispidToAttendeesString 0x823B
#define dispidCCAttendeesString 0x823C

// In PSETID_Common
#define dispidReminderSet 0x8503
#define dispidSmartNoAttach 0x8514
#define dispidCommonStart 0x8516
#define dispidCommonEnd 0x8517
#define dispidRequest 0x8530
#define dispidCompanies 0x8539
#define dispidReminderNextTime 0x8560

// In PSETID_Log (also known as Journal)
#define dispidLogType 0x8700
#define dispidLogStart 0x8706
#define dispidLogDuration 0x8707
#define dispidLogEnd 0x8708MNID_STRING properties

// In PSETID_Task
#define dispidTaskStartDate 0x8104
#define dispidTaskDueDate 0x8105
#define dispidTaskActualEffort 0x8110
#define dispidTaskEstimatedEffort 0x8111
#define dispidTaskFRecur 0x8126

MNID_STRING Properties

// In PS_PUBLIC_STRINGS 
"Keywords"

// In PS_INTERNET_HEADERS
"return-path"

Interface Identifiers

//{00375ac3-ecaf-4ef8-a527-34f452fa9c67}
DEFINE_GUID(IID_IFolderSupport, 0x00375ac3, 0xecaf, 0x4ef8, 0xa5, 0x27, 0x34, 0xf4, 0x52, 0xfa, 0x9c, 0x67);
//{29F3AB10-554d-11d0-a97c-00a0c911f50a}
#define DEFINE_PRXGUID(_name, _l) DEFINE_GUID(_name, (0x29f3ab10 + _l), 0x554d, 0x11d0, 0xa9, 0x7c, 0x00, 0xa0, 0xc9, 0x11, 0xf5, 0x0a) 
DEFINE_PRXGUID(IID_IProxyStoreObject, 0x00000000L);

Use the DEFINE_OLEGUID macro defined in the Windows SDK header file guiddef.h to associate the following GUID symbolic name with its value.

//{00020393-0000-0000-C000-000000000046}
DEFINE_OLEGUID(IID_IMSCapabilities, 0x00020393, 0, 0)

Additional MAPI Constants

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

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 Using RPC over HTTP

See the PidTagRpcOverHttpFlags Canonical Property topic for constant definitions used as flags to set the property.

See the PidTagRpcOverHttpProxyAuthScheme Canonical Property topic for constant definitions used to set the property.

Identifiers

Use the DEFINE_OLEGUID macro defined in the Microsoft Windows Software Development Kit (SDK) header file guiddef.h to associate the following GUID symbolic names with their values.

//{0002038A-0000-0000-C000-000000000046}
#if !defined(INITGUID) || defined(USES_IID_IMessageRaw) 
DEFINE_OLEGUID(IID_IMessageRaw,0x0002038A, 0, 0); 
#endif

The following Identifier is for the Capone Profile section of an Address Book, which in support of multiple Exchange (MultiEx) mailboxes contains a PR_AB_CHOOSE_DIRECTORY_AUTOMATICALLY property that effectively turns off the default container specified by SetDefaultDir.

// {00020D0A-0000-0000-C000-000000000046}
DEFINE_OLEGUID(IID_CAPONE_PROF, 0x00020d0a, 0, 0);

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);

PST Override Handler Interface Identifiers

IID_IPSTOVERRIDEREQ

// {892EBC6D-24DC-4d90-BA48-C6CBEC14A86A}
DEFINE_GUID(IID_IPSTOVERRIDEREQ, 0x892ebc6d, 0x24dc, 0x4d90, 0xba, 0x48, 0xc6, 0xcb, 0xec, 0x14, 0xa8, 0x6a);

IID_IPSTOVERRIDE1

// {FBB68D34-F561-44fb-A8CA-AE36696342CA}
DEFINE_GUID(IID_IPSTOVERRIDE1, 0xfbb68d34, 0xf561, 0x44fb, 0xa8, 0xca, 0xae, 0x36, 0x69, 0x63, 0x42, 0xca);

See Also

Concepts

About MAPI Additions

About Named Properties Used by Outlook

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