The IProviderAdmin::CreateProvider method adds a service provider to the message service. The lpszProvider parameter must point to the name of a provider that belongs to the message service. CreateProvider does not verify whether the name matches the name of a provider in the service; if the passed name does not match a service name, the call succeeds, but the results are unpredictable. Most message services do not allow providers to be added or deleted while the profile is in use.
After all of the available information about the service provider has been added to the profile from the Mapisvc.inf file, CreateProvider calls the message service's entry point function with the ulContext parameter set to MSG_SERVICE_PROVIDER_CREATE. If MAPI_DIALOG is set in the CreateProvider method's ulFlags parameter, the values in the ulUIParam and ulFlags parameters are also passed to the entry point function. These additional parameters enable the service provider to display its property sheet so the user can enter configuration settings.