Platform SDK: SMTP Server Events

IMailMsgPropertyStream::GetSize

[This is preliminary documentation and subject to change.]

Get the number of bytes in the stream with asynchronous completion.

HRESULT GetSize(
  [in] IMailMsgProperties* pMsg,
  [out] DWORD *pdwSize,
  [in,unique] IMailMsgNotify *pNotify
);
pMsg
A reference to a MailMsg object for which to get the property stream's size.
pdwSize
On successful return or completion of asynchronous processing, this address contains the stream size in bytes. The caller must not change this memory location until the operation completes.
pNotify
Notification interface through which the processing thread should notify (call back) the caller when asynchronous operation has completed. If NULL is passed, then the method will complete synchronously. Even if this value is non-NULL, the method may still complete synchronously. Check the return value for S_OK instead of MAILMSG_S_PENDING.

Return Values

Value Description
S_OK Success. Operation completed synchronously.
MAILMSG_S_PENDING
Success. The operation is pending and running asynchronously (on a separate thread), and that thread will call the notify callback method when the operation completes.

Remarks

Store driver objects do not report blocks that have not been committed to physical storage when calculating the stream size.

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