Shutting Down a Transport Provider
Shutting Down a Transport Provider |
After you are done using a transport provider to send and receive messages, you must properly shut down and log off the transport provider. For more information about sending and receiving messages by using the transport provider, see Sending Messages by Using a Transport Provider and Receiving Messages by Using a Transport Provider.
To shut down the transport provider you must call the IXPProvider::Shutdown function. This function closes down the transport provider and calls the IXPLogon::TransportLogoff function to terminate the transport provider session for a particular user.
In this topic, these functions are demonstrated by using code examples from the MRXP Sample Transport Provider. The MRXP Sample Transport Provider implements a shared network file system transport provider using a UNC share or a local folder. For more information about downloading and installing the MRXP Sample Transport Provider, see Installing the Sample Transport Provider.
Shut Down Routine
MAPI calls the IXPProvider::Shutdown function just before it releases the transport provider so that the transport provider can close down. The function goes through a linked list of IXPLogon objects and calls the IXPLogon::TransportLogoff function to release each object.
CXPProvider::Shutdown() Example
|
Transport Logoff Routine
The IXPLogon::TransportLogoff function terminates a transport provider session for a particular user. The function removes the current instance from the linked list of IXPLogon objects.
CXPLogon::TransportLogoff
|
See Also
About the Sample Transport Provider
Installing the Sample Transport Provider
Initializing a Transport Provider
Setting Up a Transport Provider