Platform SDK: SMTP Server Events

IMailMsgProperties::WriteContent

[This is preliminary documentation and subject to change.]

Write content into the MailMsg object with optional asynchronous completion.

HRESULT WriteContent(
   [in] DWORD dwOffset,
   [in] DWORD dwLength,
   [out] DWORD *pdwLength,
   [out,size_is(dwLength),length_is(*pdwLength)] BYTE *pbBlock,
   [in] IMailMsgNotify *pNotify
);
dwOffset
Specifies the offset from which to write.
dwLength
Specifies the length in bytes to write.
pdwLength
Receives the number of bytes written.
pbBlock
Reference to a caller-allocated memory buffer containing the content to write.
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 operation completed synchronously.
MAILMSG_S_PENDING Success. The operation is pending, and pNotify->Notify will be called with the result of the operation when it completes.

See Also

IMailMsgNotify Interface

IMailMsgNotify::Notify