The IProviderAdmin::CreateProvider method adds a service provider to the message service.
See IProviderAdmin : IUnknown.
HRESULT CreateProvider(
LPTSTR lpszProvider,
ULONG cValues,
LPSPropValue lpProps,
ULONG ulUIParam,
ULONG ulFlags,
MAPIUID FAR * lpUID
);
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 that the name matches the name of a provider in the service; if the passed name doesn't 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, then the values in the ulUIParam and ulFlags parameters are also passed to the entry point function. These additional parameters allow the service provider to display its property sheet so that the user can enter configuration settings.
MAPIUID, MSGSERVICEENTRY, SPropValue