Platform SDK: SMTP Server Events

IMailMsgStoreDriver::ReOpen

[This is preliminary documentation and subject to change.]

Re-open a property stream and/or content file for a MailMsg object with optional asynchronous completion.

HRESULT ReOpen(
   [in] IMailMsgProperties *pMsg,
   [out] IMailMsgPropertyStream **ppStream,
   [out] PFIO_CONTEXT * ppFIOContentFile,
   [in,unique] IMailMsgNotify *pNotify
);
pMsg
Specifies the message for which to re-open the content and property stream. The store obtains the associated content and stream storage information (file names or some other unique store identifier) for this MailMsg object using the MailMsg IMMPID_MPV_STORE_DRIVER_HANDLE property. The store driver will check the CLSID signature stored in this property, and will only re-open the content and/or property stream for the message if the CLSID in the signature is the CLSID of the store driver object.
ppStream
Receives the property stream. If this parameter is NULL, the property stream will not be re-opened.
ppFIOContentFile
Receives the PFIO_CONTEXT context for the content. If this parameter is NULL, the content file will not be re-opened.
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 method 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.
NTE_BAD_SIGNATURE The signature stored in the IMMPID_MPV_STORE_DRIVER_HANDLE property does not match the CLSID of this store driver object.
E_FAIL Failure. The store driver object has not been initialized.
E_POINTER Error. NULL passed in ppEnum.

Remarks

If the property stream is being re-opened, all references to the property stream interface must have been previously released. Similarly, if the content file is being re-opened, all instances of the content handle must have previously been closed.

See Also

IMailMsgNotify Interface

IMailMsgNotify.Notify

IMailMsgStoreDriver.CloseContentFile