Compartilhar via


IMsgServiceAdmin::GetProviderTable

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.

Provides access to the provider table, a listing of the service providers in the profile.

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

Parameters

  • ulFlags
    [in] Always NULL.

  • lppTable
    [out] A 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 the address book, message store, and transport providers currently installed in the profile.

Unlike the provider table returned through the IProviderAdmin::GetProviderTable method, 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.

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, use the following procedure:

  1. Call the IMAPITable::Restrict method to impose a property restriction that matches the PR_RESOURCE_TYPE (PidTagResourceType) property with MAPI_TRANSPORT_PROVIDER.

  2. Call the IMAPITable::SortTable method to sort the table by the PR_PROVIDER_ORDINAL (PidTagProviderOrdinal) column.

  3. Call the IMAPITable::QueryRows method 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 (PidTagServiceUid) 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:

  • Sets the string type to Unicode for data returned for the initial active columns of the provider table by the IMAPITable::QueryColumns method. The initial active columns for a provider table are those columns the QueryColumns method returns before the provider that contains the table calls the IMAPITable::SetColumns method.

  • Sets the string type to Unicode for data returned for the initial active rows of the provider table by QueryRows. The initial active rows for a provider table are those rows QueryRows returns before the provider that contains the table calls SetColumns.

  • Controls the property types of the sort order returned by the IMAPITable::QuerySortOrder method before the client that contains the provider table calls the IMAPITable::SortTable method.

See Also

Reference

IMsgServiceAdmin::GetMsgServiceTable

IMsgServiceAdmin::MsgServiceTransportOrder

IProviderAdmin::GetProviderTable

IMsgServiceAdmin : IUnknown