IProviderAdmin::DeleteProvider

The IProviderAdmin::DeleteProvider method deletes a service provider from the message service.

Quick Info

See IProviderAdmin : IUnknown.

HRESULT DeleteProvider(
  LPMAPIUID lpUID  
);
 

Parameters

lpUID
[in] [out] Pointer to the MAPIUID structure holding the unique identifier representing the provider to delete.

Return Values

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:

The message service entry point function is not called again after the provider has been deleted.

See Also

MAPIUID, MSGSERVICEENTRY