Platform SDK: Exchange Server

IExchExtAttachedFileEvents::OnWritePattToSzFile

Replaces or enhances the behavior of Microsoft Exchange when writing attachments from a message to a file.

Quick Info

See IExchExtAttachedFileEvents : IUnknown.

HRESULT OnWritePattToSzFile(
  LPATTACH lpAtt,   
  LPTSTR lpszFile,  
  ULONG ulFlags     
);
 

Parameters

lpAtt
[in] Pointer to the MAPI IAttach : IMAPIProp interface on the attachment.
lpszFile
[in] Pointer to a string containing the name and path of the intermediate file being written.
ulFlags
[in] Bitmask of flags. The following flag can be set:
EXCHEXT_UNICODE
The lpszFile parameter is a unicode string.

Return Values

S_OK
The extension object replaced Microsoft Exchange behavior and wrote out the file on its own. Microsoft Exchange will consider the task handled.
S_FALSE
The extension object did nothing or added additional behavior. Microsoft Exchange will continue to call extension objects or complete the work itself.

Remarks

Microsoft Exchange calls the IExchExtAttachedFileEvents::OnWritePattToSzFile method when it is about to write an attachment to a file, such as when the user chooses the Save or Open button. If an error occurs, OnWritePattToSzFile should display an error message and return an error. Microsoft Exchange will not continue to try and write out the file, nor will it display an error message, but will stop the user action that requested the file be written.