IMsgServiceAdmin::GetProviderTable

The IMsgServiceAdmin::GetProviderTable method provides access to the provider table — a listing of the service providers in the profile.

Quick Info

See IMsgServiceAdmin : IUnknown.

HRESULT GetProviderTable(
  ULONG ulFlags,              
  LPMAPITABLE FAR * lppTable  
);
 

Parameters

ulFlags
[in] Bitmask of flags that controls the type of the string columns returned in the table. The following flag can be set:
MAPI_UNICODE
The string columns are in Unicode format. If the MAPI_UNICODE flag is not set, the string columns are in ANSI format.
lppTable
[out] Pointer to a pointer to the provider table.

Return Value

S_OK
The provider table was successfully returned.

Remarks

The IMsgServiceAdmin::GetProviderTable method provides access to the MAPI provider table, a table that lists all of the address book, message store, transport, and message hook providers currently installed in the profile.

Unlike the provider table returned through IProviderAdmin::GetProviderTable, the provider table returned through IMsgServiceAdmin::GetProviderTable cannot include additional rows that represent information associated with one or more service providers in the profile.

Providers that have been deleted, or are in use but have been marked for deletion, are not included in the provider table. Provider tables are static, meaning that subsequent additions to or deletions from the profile are not reflected in the table.

If the profile has no providers, GetProviderTable returns a table with zero rows and the S_OK return value.

Setting the MAPI_UNICODE flag in the ulFlags parameter affects the format of the columns returned from the following IMAPITable methods:

IMAPITable::QueryColumns

IMAPITable::QueryRows

This flag also controls the property types in the sort order returned by the IMAPITable::QuerySortOrder method.

For a complete list of the columns in the provider table, see Provider Table.

Notes to Callers

    To retrieve the rows of a provider table in transport order
  1. Call IMAPITable::Restrict to impose a property restriction that matches the PR_RESOURCE_TYPE property with MAPI_TRANSPORT_PROVIDER.
  2. Call IMAPITable::SortTable to sort the table by the PR_PROVIDER_ORDINAL column.
  3. Call IMAPITable::QueryRows to get the rows of the table.

An alternative to these calls is to make a single call to the HrQueryAllRows function with all of the appropriate data structures passed in.

If you retrieve the PR_SERVICE_UID columns in each of the rows, you can use this array of MAPIUID structures to set the transport order in a call to IMsgServiceAdmin::MsgServiceTransportOrder.

Setting the MAPI_UNICODE flag in the ulFlags parameter does the following:

See Also

IMsgServiceAdmin::GetMsgServiceTable, IMsgServiceAdmin::MsgServiceTransportOrder, IProviderAdmin::GetProviderTable