IProviderAdmin::DeleteProvider
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Deletes a service provider from the message service.
HRESULT DeleteProvider(
LPMAPIUID lpUID
);
Parameters
- lpUID
[in, out] A pointer to the MAPIUID structure that contains the unique identifier that represents the provider to delete.
Return Value
S_OK
The provider was successfully deleted from the message service.MAPI_E_NOT_FOUND
The MAPIUID pointed to by the lpUID parameter was not recognized.
Remarks
The IProviderAdmin::DeleteProvider method deletes a service provider from the message service. DeleteProvider determines the service provider to delete by matching the MAPIUID structure pointed to by lpUID with the set of identifiers registered by the active service providers.
Most message services do not allow providers to be deleted while the profile is in use. If the provider to delete is in use, DeleteProvider marks it for deletion instead of removing it immediately and returns S_OK. When the provider is no longer being used, it is deleted.
DeleteProvider calls the message service's entry point function before the provider is removed from the service. The ulContext parameter is set to MSG_SERVICE_PROVIDER_DELETE. The message service entry point function performs the following tasks:
Deletes the service provider.
Deletes the service provider's profile section.
The message service entry point function is not called again after the provider has been deleted.