HRESULT EndMessage(
ULONG ulMsgRef, ULONG FAR * lpulFlags );
Parameters
ulMsgRef
[in] A 32-bit reference value, specific to a message, obtained in an earlier call to the IXPLogon::SubmitMessage method.
lpulFlags
[out] Bitmask of flags that indicates to the MAPI spooler what it should do with the message. If no flags are set, the message has been sent. The following flags can be set:
END_DONT_RESEND
The transport provider has all the information it needs about this message for now. When the transport provider requires more information or when it has completed sending the message, it notifies the MAPI spooler by calling the IMAPISupport::SpoolerNotify method with the NOTIFY_SENTDEFERRED flag and by passing the message's entry identifier.
END_RESEND_LATER
The transport provider isn't sending the message now for reasons that are not error conditions and should be called again later to send the message.
END_RESEND_NOW
The transport provider needs to restart the message passed to it in an IMessage::SubmitMessage method call.
Return Values
S_OK
The call succeeded and has returned the expected value or values.
Remarks
The MAPI spooler calls the IXPLogon::EndMessage method after completing the processing involved in providing extended delivery or nondelivery information.
Once this call returns, the value in the ulMsgRef parameter is no longer valid for this message. The transport provider can reuse the same value on a future message.
All objects opened by the transport provider during the transfer of a message should be released before returning from the EndMessage call, with the exception of the message object the MAPI spooler passes to the transport provider. The message object passed by the MAPI spooler is invalid after the EndMessage call.