Platform SDK: MAPI

Reconfiguring a Transport Provider

You can use a transport provider's status object to change some of the properties of the provider. The range of properties that can be changed depends on the properties that are included with the provider's property sheet and how those properties are defined.

To reconfigure an active transport provider

  1. Call IMAPISession::GetStatusTable to access the status table.
  2. Locate the row for the transport provider to be reconfigured by creating a property restriction that matches PR_DISPLAY_NAME with the name of the target provider.
  3. Call IMAPITable::FindRow to retrieve the appropriate row.
  4. Check that the STATUS_SETTINGS_DIALOG and STATUS_VALIDATE_STATE flags are set in the target transport provider's PR_RESOURCE_METHODS property.

    If STATUS_SETTINGS_DIALOG is not set, the transport provider does not display a configuration property sheet. If STATUS_VALIDATE_STATE is not set, you cannot perform dynamic reconfiguration.

  5. If STATUS_SETTINGS_DIALOG is set, call IMAPIStatus::SettingsDialog to display the transport provider's property sheet and allow the user to make changes.
  6. After the user has finished with the reconfiguration, call IMAPIStatus::ValidateState if STATUS_VALIDATE_STATE is set, passing CONFIG_CHANGED.