Platform SDK: SMTP Server Events

IMailMsgPropertyStream::ReadBlocks

[This is preliminary documentation and subject to change.]

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

HRESULT ReadBlocks(
  [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,
  [out,size_is(dwCount)] BYTE **ppbBlock,
  [in,unique] IMailMsgNotify *pNotify
);
pMsg
A reference to a MailMsg object.
dwCount
Specifies the number of blocks to read.
pdwOffset
Specifies the list of offsets to read from. The caller must not change this list until the operation completes.
pdwLength
Specifies the list of lengths to read. The caller must not change this list until the operation completes.
ppbBlock
Specifies the buffers to read into. 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 operation will complete synchronously. If non-NULL, the operation may still complete synchronously. Check the return value for 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 object only returns properties that have been committed to physical storage. Any blocks written within an ongoing transaction are not returned by the ReadBlocks method, nor are these blocks reported when GetSize is called.

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