Platform SDK: SMTP Server Events

IMailMsgBind::GetBinding

[This is preliminary documentation and subject to change.]

Gets the binding file handle cache context.

HRESULT GetBinding(
  [out] PFIO_CONTEXT *ppFIOContentFile,
  [in,unique] IMailMsgNotify *pNotify
);
ppFIOContentFile
Receives the reference to the current FIO_CONTEXT file context structure.
pNotify
Interface through which to asynchronously notify caller when the operation has completed. If this value is NULL, then the method will complete synchronously. Even 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 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.

Remarks

A MailMsg object that is bound to a store driver object has an internally cached FIO_CONTEXT context structure. This structure contains a file handle (HANDLE) used to persist the content of the message to some physical storage location, usually the file system. To perform I/O operations directly on this backing file, you retrieve the context using GetBinding. For example, when the SMTP service has determined that a message is to be delivered to the local Drop directory, it retrieves a reference to the associated FIO_CONTEXT structure using the GetBinding method.

See Also

IMailMsgNotify Interface

IMailMsgNotify.Notify