To add or delete service providers in a message service, use the IProviderAdmin interface. You can retrieve an IProviderAdmin pointer by calling IMsgServiceAdmin::AdminProviders. The provider table, accessable through IProviderAdmin::GetProviderTable, lists information about the service providers currently installed in the message service. Clients and service providers can use the provider table to access the name of the provider DLL file, for example, or the MAPIUID, display name, and type of the provider as well as information about the message service. See Provider Table for more information.
Another technique for adding a service provider, specifically a message store provider, to a profile involves constructing an entry identifier for the provider. Because constructing an entry identifier requires knowledge of its format, this technique can only be used if the service provider has made its entry identifier format public.
With the newly constructed entry identifier, a client can call IMAPISession::OpenMsgStore. MAPI automatically creates a profile section in the profile for the service provider, but does not add it to a message service.
Some message services do not allow this type of dynamic modification; whether or not it is supported is up to the message service. Another feature that may or may not be supported is the ability to directly access a message service's private profile sections. If the message service you are using permits such access, it will publish the GUID that represents the private section in MAPISVC.INF. You can pass this GUID in a call to IProviderAdmin::OpenProfileSection to access the profile section.