IMsgServiceAdmin::AdminProviders

Applies to: Outlook 2013 | Outlook 2016

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

IProviderAdmin : IUnknown

MAPIUID

IMsgServiceAdmin : IUnknown

MFCMAPI as a Code Sample