Microsoft KB Archive/908074

= How to use Extended MAPI to manage messages in an OST when the client is in cached Exchange mode in Office Outlook 2003 =

Article ID: 908074

Article Last Modified on 12/20/2005

-

APPLIES TO


 * Microsoft Office Outlook 2003

-



INTRODUCTION
This article describes how to use Extended MAPI to manage messages in an offline store (OST) when the client is in cached Exchange mode in Microsoft Office Outlook 2003.



MORE INFORMATION
When the client is in cached Exchange mode, messages in the OST can be in one of two states:
 * The whole message. This includes the header and the body.
 * The message with only its header downloaded.

When you request an IMessage interface for a message in an OST and the client is in cached Exchange mode, use the IID_IMessageRaw GUID. If you use the IID_IMessage GUID to request an IMessage interface, and the message has only its header downloaded, a synchronization is forced. The sychronization tries to download the whole message.

If you use the IID_IMessageRaw GUID or the IID_IMessageGUID GUID to request an IMessage interface, the interfaces that are returned are identical in use. The IMessage interface that was requested by using the IID_IMessageRaw GUID will return an e-mail message as it exists in the OST, and synchronization is not forced.

If the OpenEntry method returns the MAPI_E_INTERFACE_NOT_SUPPORTED error code, the message store does not support accessing the message in raw mode. In this situation, try the OpenEntry method again by passing the IID_IMessage GUID.

Note Although cached mode is similar to remote mail headers in classic offline mode, the default behavior is different. Remote mail header messages are not downloaded when they are accessed. This GUID will not work with remote mail headers.

The following is the definition of the IID_IMESSAGE_RAW GUID. DEFINE_OLEGUID(IID_IMessageRaw,    0x0002038A, 0, 0); When you call the OpenEntry method, pass the IID_IMessageRaw GUID instead of the IID_IMessage GUID. HRESULT HrOpenRawMessage (  LPMDB lpMSB,    ULONG cbEntryID,    LPENTRYID lpEntryID,    ULONG ulFlags,    LPMESSAGE* lpMessage ) {  ULONG ulObjType = NULL;
 * 1) if !defined(INITGUID) || defined(USES_IID_IMessageRaw)
 * 1) endif

HRESULT hRes = lpMDB->OpenEntry(     cbEntryID,      lpEntryID,      IID_IMessageRaw,      ulFlags,      &ulObjType,      (LPUNKNOWN*) lpMessage));

return hRes; }

Keywords: kbinfo kbhowto KB908074

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.