Platform SDK: SMTP Server Events

IMailMsgProperties::CopyContentToFileEx

[This is preliminary documentation and subject to change.]

Copy the entire content to a specified file with optional asynchronous completion.

[local] HRESULT CopyContentToFileEx(
  [in] PFIO_CONTEXT pFIOCopy,
  [in] BOOL fDotStuffed,
  [in,unique] IMailMsgNotify *pNotify
);
pFIOCopy
Specifies the previously opened file into which to copy the contents. The file handle within the FIO_CONTEXT must have been opened with the FILE_FLAG_OVERLAPPED flag and associated with the FIO_CONTEXT structure using the AssociateFile function.
fDotStuffed
Indicates whether the FIO_CONTEXT contains dot-stuffed data. Dot-stuffed data has all periods escaped as a sequence of two periods.
pNotify
Interface to notify for asynchronous completion. If this value is NULL, then the operation will complete synchronously. Even if this value is non-NULL, the operation may still complete synchronously (i.e. it may return S_OK instead of MAILMSG_S_PENDING).

Return Values

Value Description
S_OK Success. The method completed synchronously.
MAILMSG_S_PENDING Success. The operation will complete asynchronously. When it completes, you will be notified through the interface you passed using the pNotify parameter. The result of the operation will be returned with the notification callback method.

Remarks

This method is identical to the IMailMsgProperties::CopyContentToFile method except for the BOOL argument.

This method is marked with the [local] IDL attribute. This means no proxy/stub code is generated for the header file, and the method can only be called on an interface in the same apartment (i.e. no marshalling can occur).

See Also

IMailMsgNotify, IMailMsgNotify::Notify,

IMailMsgProperties::CopyContentToFile, IMailMsgProperties::CopyContentToFileAtOffset, IMailMsgProperties::CopyContentToStream, AssociateFile