Platform SDK: SMTP Server Events

IMailMsgPropertyStream::WriteBlocks

[This is preliminary documentation and subject to change.]

Write a list of blocks from the stream with asynchronous completion.

HRESULT WriteBlocks(
  [in] IMailMsgProperties* pMsg,
  [in] DWORD dwCount,
  [in,size_is(dwCount),length_is(dwCount),unique] DWORD *pdwOffset,
  [in,size_is(dwCount),length_is(dwCount),unique] DWORD *pdwLength,
  [in,size_is(dwCount)] BYTE **ppbBlock,
  [in,unique] IMailMsgNotify *pNotify
);
pMsg
A reference to a MailMsg object.
dwCount
Specifies the number of blocks to write.
pdwOffset
Specifies the list of offsets to which to write. The caller must not change this list until the operation completes.
pdwLength
Specifies the list of lengths to write. The caller must not change this list until the operation completes.
ppbBlock
Specifies the buffers from which to write. The caller must not change this list until the operation completes.
pNotify
Interface to notify for asynchronous completion. If this value is NULL, then the method will complete synchronously. If this value is non-NULL, the method 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.

Remarks

The store driver infers which property stream the method applies to using the MailMsg object's IUnknown address, which uniquely identifies the object in memory (COM Identity rules).

See Also

IMailMsgNotify Interface

IMailMsgNotify::Notify