IExchExtAttachedFileEvents::QueryDisallowOpenPatt

Prevents a file attachment from being opened directly without writing it first to an intermediate file.

Quick Info

See IExchExtAttachedFileEvents : IUnknown.

HRESULT QueryDisallowOpenPatt(
  LPATTACH lpAtt  
);
 

Parameters

lpAtt
[in] Pointer to the MAPI IAttach : IMAPIProp interface on the attachment.

Return Values

S_OK
The extension object will prevent other extensions or Microsoft Exchange from opening the attachment directly without writing it to a file first.
S_FALSE
The extension object did nothing. Microsoft Exchange will call other extension objects if opening the attachment directly ought to be disallowed.

Remarks

Microsoft Exchange calls the IExchExtAttachedFileEvents::QueryDisallowOpenPatt method when it is about to open the attachment directly without writing it first to an intermediate file. An extension object might elect to disallow opening attachments directly if it has encrypted or modified the attachment and should decrypt or restore it to an intermediate file.

If an error occurs, QueryDisallowOpenPatt should display an error message and return an error. Microsoft Exchange will not continue to try to open the file, nor will it display an error message, but will stop the user action that requested the attachment be opened.