Initializing a Wrapped PST Store Provider
|Initializing a Wrapped PST Store Provider|
To implement a wrapped Personal Folders file (PST) store provider, you must initialize the wrapped PST store provider by using the MSProviderInit function as an entry point. After the provider's DLL is initialized, the MSGSERVICEENTRY function configures the wrapped PST store provider.
In this topic, the MSProviderInit function and the MSGSERVICEENTRY function are demonstrated by using code examples 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.
After you have initialized a wrapped PST store provider, you must implement functions so that MAPI and the MAPI spooler can log on to the message store provider. For more information, see Logging On to a Wrapped PST Store Provider.
All wrapped PST store providers must implement the MSProviderInit function as an entry point to initialize the provider's DLL. MSProviderInit checks to see if the version number of the service provider interface,
ulMAPIVer, is compatible with the current version number,
CURRENT_SPI_VERSION. The function saves the MAPI memory management routines into the
g_lpFreeBuffer parameters. These memory management routines should be used throughout the wrapped PST store implementation for memory allocation and deallocation.
Service Entry Routine
The MSGSERVICEENTRY function is the message service entry point where the wrapped PST store provider is configured. The function calls
GetMemAllocRoutines() to get the MAPI memory management routines. The function uses the
lpProviderAdmin parameter to locate the profile section for the provider and sets the properties in the profile.