ICertAdmin2::SetCAProperty Method

The SetCAProperty method sets a property value for the certification authority (CA).

Syntax


C++
HRESULT SetCAProperty(
  [in]  const BSTR strConfig,
  [in]  LONG PropId,
  [in]  LONG PropIndex,
  [in]  LONG PropType,
  [in]  VARIANT *pvarPropertyValue
);

Parameters

strConfig [in]

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.

PropId [in]

Specifies one of the following property identifiers.

For information about all CA properties, including those that are read-only, see ICertAdmin2::GetCAProperty.

ValueMeaning
CR_PROP_KRACERT

The CA's key recovery agent (KRA) certificate.

Data format: binary, indexed.

CR_PROP_KRACERTCOUNT

Number of KRA certificates for the CA.

Data format: Long.

CR_PROP_KRACERTUSEDCOUNT

Number of KRA certificates used by the CA.

Data format: Long.

CR_PROP_ROLESEPARATIONENABLED

Value that specifies whether role separation is enabled.

Data format: Long.

CR_PROP_TEMPLATES

List of templates supported by the CA.

Data format: String.

 

PropIndex [in]

If the PropId parameter is indexed, the zero-based index to use when retrieving the property value. If PropId is not indexed, this value is ignored.

PropType [in]

Specifies the type of the property. This parameter can be one of the following values.

ValueMeaning
PROPTYPE_LONG

Signed Long data.

PROPTYPE_DATE

Date/Time (reserved for future use).

PROPTYPE_BINARY

Binary data.

PROPTYPE_STRING

Unicode String data.

 

pvarPropertyValue [in]
A pointer to a VARIANT that specifies the property value.

Return Value

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.


VBScript

Sub SetCAProperty( _
  ByVal strConfig, _
  ByVal PropId, _
  ByVal PropIndex, _
  ByVal PropType, _
  ByVal pvarPropertyValue _
)

Parameters

strConfig [in]

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.

PropId [in]

Specifies one of the following property identifiers.

For information about all CA properties, including those that are read-only, see ICertAdmin2::GetCAProperty.

ValueMeaning
CR_PROP_KRACERT

The CA's key recovery agent (KRA) certificate.

Data format: binary, indexed.

CR_PROP_KRACERTCOUNT

Number of KRA certificates for the CA.

Data format: Long.

CR_PROP_KRACERTUSEDCOUNT

Number of KRA certificates used by the CA.

Data format: Long.

CR_PROP_ROLESEPARATIONENABLED

Value that specifies whether role separation is enabled.

Data format: Long.

CR_PROP_TEMPLATES

List of templates supported by the CA.

Data format: String.

 

PropIndex [in]

If the PropId parameter is indexed, the zero-based index to use when retrieving the property value. If PropId is not indexed, this value is ignored.

PropType [in]

Specifies the type of the property. This parameter can be one of the following values.

ValueMeaning
PROPTYPE_LONG

Signed Long data.

PROPTYPE_DATE

Date/Time (reserved for future use).

PROPTYPE_BINARY

Binary data.

PROPTYPE_STRING

Unicode String data.

 

pvarPropertyValue [in]
A Variant that specifies the property value.

Return Value

This method does not return a value.

Requirements

Minimum supported clientNone supported
Minimum supported serverWindows Server 2003
HeaderCertadm.h (include Certsrv.h)
LibraryCertidl.lib
DLLCertadm.dll
IIDIID_ICertAdmin2 is defined as f7c3ac41-b8ce-4fb4-aa58-3d1dc0e36b39

See Also

ICertAdmin2
ICertAdmin2::GetCAProperty

Send comments about this topic to Microsoft

Build date: 11/16/2009

Tags :


Page view tracker