Export (0) Print
Expand All

Shutting Down a Wrapped PST Store Provider

Published: July 16, 2012

After you finish using a wrapped Personal Folders file (PST) store provider, you must properly shut down the wrapped PST store provider. For more information about using the wrapped PST store provider, see Using a Wrapped PST Store Provider.

To shut down a wrapped PST store provider, you must call the IMSProvider::Shutdown function. This functions closes down the wrapped PST store provider in an orderly fashion.

In this topic, the IMSProvider::Shutdown function is demonstrated by using a code example from the Sample Wrapped PST Store Provider. The sample implements a wrapped PST provider that is intended to be used in conjunction with the Replication API. For more information about downloading and installing the Sample Wrapped PST Store Provider, see Installing the Sample Wrapped PST Store Provider. For more information about the Replication API, see About the Replication API.

The MAPI spooler calls the IMSProvider::Shutdown function just before it releases the wrapped PST store provider so that the wrapped PST store provider can shut down properly. The function terminates all session objects associated with the wrapped PST store provider.

STDMETHODIMP CMSProvider::Shutdown(ULONG * pulFlags) 
{ 
    HRESULT hRes = S_OK; 
    Log(true,"CMSProvider::Shutdown\n"); 
    hRes =m_pPSTMS->Shutdown(pulFlags); 
    Log(true,"CMSProvider::Shutdown returned: 0x%08X\n", hRes); 
    return hRes ;  
}

Community Additions

ADD
Show:
© 2014 Microsoft