ICertAdmin2::SetConfigEntry method (certadm.h)

The SetConfigEntry method sets configuration information for a certification authority (CA).

Syntax

HRESULT SetConfigEntry(
  [in] const BSTR strConfig,
  [in] const BSTR strNodePath,
  [in] const BSTR strEntryName,
  [in] VARIANT    *pvarEntry
);

Parameters

[in] strConfig

String value that represents a valid configuration string for the CA in the form COMPUTERNAME\CANAME, where COMPUTERNAME is the Certificate Services server's network name, and CANAME is the common name of the CA, as entered during Certificate Services setup. For information about the configuration string name, see ICertConfig. This parameter can be an empty string, in which case the function sets configuration information that is not specific to a CA. This parameter cannot be NULL.

Important  SetConfigEntry does not clear the internal cache when the configuration string is changed. When you change the configuration string for the CA, you must instantiate a new ICertAdmin object and call this method again with the new configuration string.
 

[in] strNodePath

String value that represents the node path for the configuration information. This parameter can be an empty string, in which case the function retrieves configuration information from the path identified by strConfig. This parameter cannot be NULL.

[in] strEntryName

String value that represents the name of the entry whose information is being set. This value can be an empty string, in which case the default entry is the entry being set. This parameter cannot be NULL.

[in] pvarEntry

C++ Pointer to VARIANT that specifies the information to set. If this value is empty, then the indicated key will be deleted.
VB Variant that specifies the information to set. If this value is empty, then the indicated key will be deleted.

Return value

VB

If the function is successful, the return value is S_OK.

If the function fails, the return value is an HRESULT that indicates the error. For a list of common error codes, see Common HRESULT Values.

Remarks

The configuration information is stored in the registry under the following path.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\[CASANITIZEDNAME]\[strNodePath]\[strEntryName]

Where CASANITIZEDNAME is the sanitized name for the CA. For more information about sanitized names, see ICertConfig2::GetConfig.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header certadm.h (include Certsrv.h)
Library Certidl.lib
DLL Certadm.dll

See also

ICertAdmin2