With the pointer that you return from your entry point function, MAPI calls a method in your provider object to begin the logon process. This method varies as follows, depending on the type of your service provider:
Note Do not attempt to set the profile section's PR_RESOURCE_FLAGS or PR_PROVIDER_DLL_NAME properties. At logon time, these properties are read-only.
Check that the properties you need for configuration are either stored in the profile or are available from the user. For more information about checking your configuration, see Verifying Service Provider Configuration.
Instantiate a logon object and return with one of the following values:
S_OK to indicate a successful logon.
MAPI_E_UNCONFIGURED to indicate that one or more of the configuration properties were unavailable.
MAPI_E_USER_CANCEL to indicate that the user canceled the configuration dialog box, causing configuration properties to be unavailable.
MAPI_E_FAILONEPROVIDER to indicate that your provider could not be configured, but that MAPI should allow it to be used regardless. Logon methods should return this value to report a non-fatal error, such as when the provider requires a password and cannot prompt the user for it because the user interface is disabled.
The preceding list of tasks describes a minimum implementation for a service provider logon method. You can include additional functionality if necessary. For example, some providers call IMAPISupport::ModifyStatusRow to update the status table in their logon method.
Note To achieve the best performance at logon time, avoid calling either IMAPISupport::PrepareSubmit or IMAPISupport::SpoolerNotify. Before these calls can complete and return control to your logon method, the MAPI spooler must be started.