Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

When you call the IAttach::SaveChanges(KEEP_OPEN_READONLY) function in your MAPI application, Extended MAPI may unexpectedly return a MAPI_E_NO_SUPPORT value


View products that this article applies to.

Symptoms

When you call the IAttach:SaveChanges(KEEP_OPEN_READONLY) function in the MAPI application to try to commit changes that have been made to an attachment, Extended MAPI may unexpectedly return the following value:
MAPI_E_NO_SUPPORT
The following code sample demonstrates this symptom:
...

HRESULT hrRetVal = S_OK;

...

// Open attachment - for simplicity we're assuming to have valid data in pMessage and dwAttachNum

hrRetVal = pMessage->OpenAttach(dwAttachNum, NULL, MAPI_MODIFY, &pAttach);
if (hrRetVal == S_OK)
{
                // Modify attachment
                ...
                
                // Commit attachment changes 
                hrRetVal = pAttach->SaveChanges(KEEP_OPEN_READONLY);
                if (hrRetVal != S_OK)
                {
                                // When the original message has been generated using OWA 2000 or OWA 2003 
                                // we may be facing an unxpected return code of MAPI_E_NO_SUPPORT here
                                ...

                }               // if
 
                // Release attachment object

                pAttach->Release();

}               // if

...

↑ Back to the top


Cause

This behavior occurs if a user uses Microsoft Outlook Web Access (OWA) 2000 or Microsoft Outlook Web Access 2003 to create the message, to add the attachment, and to send the message. The information store handles messages that have attachments that are sent by OWA 2000 or by OWA 2003 differently than the information store handles messages that have attachments that are sent by a MAPI client like Microsoft Outlook.

The IAttach::SaveChanges() function call causes a write operation on the attachment data in the information store. However, the attachment data is read-only.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


Keywords: KB894313, kbprb, kbexchowa, kbcode

↑ Back to the top

Article Info
Article ID : 894313
Revision : 3
Created on : 10/25/2007
Published on : 10/25/2007
Exists online : False
Views : 269