IX509PrivateKey::ContainerNamePrefix property

The ContainerNamePrefix property specifies or retrieves a prefix added to the name of the key container.

This property is read/write.

Syntax


HRESULT put_ContainerNamePrefix(
  [in]  BSTR Value
);

HRESULT get_ContainerNamePrefix(
  [out] BSTR *pValue
);

Property value

A BSTR variable that contains the prefix. The prefix must contain less than 65636 characters.

Error codes

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Name/valueMeaning
CERTSRV_E_PROPERTY_EMPTY

The property value could not be found.

HRESULT_FROM_WIN32(ERROR_FILE_READ_ONLY)

The key is open, and the property value cannot be set.

Remarks

A prefix can contain any string limited to the maximum length of the key container name and to legal container name characters. For example, if you do not call the ContainerName property to specify a key container name, one is automatically created when the Create method is called, and the prefix to the container name will be the string "lp". For another example, if you are creating a test harness and want to differentiate key containers by the programs that generated them, you can use the name of the executable as the prefix.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

CertEnroll.h

DLL

CertEnroll.dll

See also

IX509PrivateKey

 

 

Community Additions

ADD
Show: