Partager via


IMsgServiceAdmin::AdminProviders

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.

Returns a pointer that provides access to a provider administration object.

HRESULT AdminProviders(
  LPMAPIUID lpUID,
  ULONG ulFlags,
  LPPROVIDERADMIN FAR * lppProviderAdmin
);

Parameters

  • lpUID
    [in] A pointer to the MAPIUID structure that contains the unique identifier for the message service to be administered.

  • ulFlags
    [in] Always NULL.

  • lppProviderAdmin
    [out] A pointer to a pointer to a provider administration object.

Return Value

  • S_OK
    The provider administration object was successfully returned.

  • MAPI_E_NOT_FOUND
    The MAPIUID pointed to by lpUID does not exist.

Remarks

The IMsgServiceAdmin::AdminProviders method provides access to a provider administration object. A provider administration is an object that supports the IProviderAdmin interface and enables clients to do the following:

  • Add service providers to a message service.

  • Delete service providers from a message service.

  • Open profile sections.

  • Access the message service provider table.

The types of changes that can actually be made to a message service while the profile is in use depend on the message service. However, most message services do not support changes such as adding and deleting providers while the profile is in use.

Notes to Callers

To retrieve the MAPIUID structure for the message service to administer, retrieve the PR_SERVICE_UID (PidTagServiceUid) property column from the message service's row in the message service table. For more information, see the procedure outlined in the IMsgServiceAdmin::CreateMsgService method.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

MsgServiceTableDlg.cpp

CMsgServiceTableDlg::OnDisplayItem

MFCMAPI uses the IMsgServiceAdmin::AdminProviders method to open a provider administration object for a service.

See Also

Reference

IProviderAdmin : IUnknown

MAPIUID

IMsgServiceAdmin : IUnknown

Concepts

MFCMAPI as a Code Sample