The HPProviderInit entry point should create a message hook provider object, initialize it, and return a pointer to it in the lppSpoolerHook pointer parameter. Initializing the spooler hook object is usually accomplished by:
Storing the MAPI session pointer, instance handle, and memory allocation routine pointers that are passed in by MAPI.
Getting the hook provider's configuration information out of its profile section.
Verifying that its configuration information is complete and correctly formatted.
Connecting to any other MAPI service providers needed — such as store providers — by getting pointers to them from MAPI through the session pointer.
Initializing any rules or filters that should be started when the hook provider is loaded.