The IABProvider::Shutdown method cancels a connection to an active session.
HRESULT Shutdown (
ULONG FAR * lpulFlags
);
In your implementation of IABProvider::Shutdown, perform whatever tasks you deem necessary. MAPI calls your IABProvider::Shutdown method only after you have released all of your logon objects.