Partager via


IProviderAdmin::DeleteProvider

Applies to: Office 2010 | Outlook 2010 | Visual Studio

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.

See Also

Reference

MAPIUID

MSGSERVICEENTRY

IProviderAdmin : IUnknown