Platform SDK: CDO 1.2.1 |
The LoadConfiguration method loads configuration information from the specified source.
objRendApp.LoadConfiguration(eSource, bstrSection [, varSession] )
eSource setting |
Decimal value |
Meaning |
---|---|---|
CdoConfigRegistry | 1 | The standard registry key name for the CDO Rendering Library. |
CdoConfigDS | 2 | The Microsoft® Exchange directory server. |
The LoadConfiguration method is normally called twice. A newly created rendering application calls LoadConfiguration with the eSource parameter set to CdoConfigRegistry to read data from the registry, including the location of the directory server. Later, when a session is started, LoadConfiguration is called with eSource set to CdoConfigDS to read information from the protocol settings for HTTP in the directory server's database.
If the eSource parameter is CdoConfigRegistry, the bstrSection parameter should be the key to the registry section containing values for Enterprise, Site, and Server. A standard value for this key name is
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeWEB\Parameters
If the eSource parameter is set to CdoConfigDS, the bstrSection parameter is ignored because the directory server only has one configuration object. The registry information must already be loaded before you call LoadConfiguration with CdoConfigDS, since the Enterprise, Site, and Server must be set in order to read from the directory server.
When eSource is CdoConfigDS, the LoadConfiguration method normally does an anonymous Logon to obtain directory server information. If you are already logged on to a session, you can pass the Session object in the varSession parameter so that LoadConfiguration does not have to log on again. This can improve performance.
All values read in by LoadConfiguration can be retrieved with the ConfigParameter method.