Provider Table

A provider table contains information about service providers. There are two different provider tables, both implemented by MAPI and used by clients. The first table, accessed by calling the IMsgServiceAdmin::GetProviderTable method, holds information about all of the providers for the current profile. The second table, accessed through IProviderAdmin::GetProviderTable, creates a table that stores information about all of the service providers for a message service.

These two tables have another difference. The provider table available through IMsgServiceAdmin::GetProviderTable contains only rows that represent service providers while the table available through IProviderAdmin::GetProviderTable may include rows that represent additional information associated with a service provider. This extra information is added to the profile with the "Sections" keyword of MAPISVC.INF. When a provider has extra profile sections, it stores the MAPIUIDs for these sections in the PR_SERVICE_EXTRA_UIDS property. PR_SERVICE_EXTRA_UIDS is saved in the message service profile section.

The following properties make up the required column set in both types of provider tables:

PR_INSTANCE_KEY PR_DISPLAY_NAME
PR_PROVIDER_DISPLAY PR_PROVIDER_DLL_NAME
PR_PROVIDER_ORDINAL PR_PROVIDER_UID
PR_RESOURCE_FLAGS PR_RESOURCE_TYPE
PR_SERVICE_NAME PR_SERVICE_UID

The provider table can be used to display the current transport order or to change it. To display the current order, build a restriction to retrieve only those rows with the PR_RESOURCE_TYPE property set to MAPI_TRANSPORT_PROVIDER. Then use PR_PROVIDER_ORDINAL as a sort key to sort the table and retrieve all the rows with either the IMAPITable::QueryRows method or the HrQueryAllRows function.

To change the transport order, apply the same restriction and retrieve the rows. Then create an array of values from the PR_PROVIDER_UID property that represents the unique identifiers for the transport providers. When the identifiers are in the desired order, pass them to the IMsgServiceAdmin::MsgServiceTransportOrder method.

Once a provider table has been made accessible, it will not reflect subsequent changes, such as the addition or deletion of a provider.