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 (894313)



The information in this article applies to:

  • Microsoft Exchange Server 2003 Standard Edition
  • Microsoft Exchange Server 2003 Enterprise Edition
  • Microsoft Exchange 2000 Server
  • Microsoft Exchange 2000 Enterprise Server

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

...

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.

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:5/13/2005
Keywords:kbcode kbexchOWA kbprb KB894313 kbAudDeveloper