IExchExtAttachedFileEvents::OnReadPattFromSzFile

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

Quick Info

See IExchExtAttachedFileEvents : IUnknown.

HRESULT OnReadPattFromSzFile(
  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 file being attached.
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 handled attaching 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 extensions or complete the work itself.

Remarks

Microsoft Exchange calls the IExchExtAttachedFileEvents::OnReadPattFromSzFile method when it is about to read an attached file's data. This can occur on initial attachment and when the contents of the attachment are being updated from a temporary file. If an error occurs, OnReadPattFromSzFile should display an error message and return an error. Microsoft Exchange will not continue to attach the file, nor will it display an additional error message, but will stop the user action that requested the attachment.