Platform SDK: SMTP Server Events

IMailMsgStoreDriver::Delete

[This is preliminary documentation and subject to change.]

Delete a property stream and content PFIO_CONTEXT with optional asynchronous completion.

HRESULT Delete(
  [in] IMailMsgProperties *pMsg,
  [in,unique] IMailMsgNotify *pNotify
);
pMsg
A reference to the MailMsg object to delete. 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.
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 argument list.

Error status codes returned from the method depend upon the implementation of the store driver object, and could include various FACILITY_WIN32 file I/O error codes, etc.

Remarks

Before calling this method, all outstanding references of the property stream interface must be released, and all outstanding references to the content file handle context must be closed.

See Also

IMailMsgNotify Interface

IMailMsgNotify.Notify