Platform SDK: SMTP Server Events

IMailMsgProperties::CopyContentToFileAtOffset

[This is preliminary documentation and subject to change.]

Copy the content to a file at a given offset with optional asynchronous completion.

[local]
HRESULT CopyContentToFileAtOffset(
  [in] PFIO_CONTEXT pFIOCopy,
  [in] DWORD dwOffset,
  [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.
dwOffset
The offset within the file into which to copy the message contents.
pNotify
Callback interface used to asynchronously notify you that the method has 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. In this case, the method returns S_OK instead of MAILMSG_S_PENDING.

Return Values

Value Description
S_OK Success. The operation 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.

See Also

IMailMsgNotify Interface, IMailMsgNotify.Notify, AssociateFile