ICspStatus::Initialize method (certenroll.h)

The Initialize method initializes the object from a cryptographic provider and an associated algorithm. This method is web enabled.

Syntax

HRESULT Initialize(
  [in]           ICspInformation *pCsp,
  [in, optional] ICspAlgorithm   *pAlgorithm
);

Parameters

[in] pCsp

Pointer to an ICspInformation interface that represents information about the provider.

[in, optional] pAlgorithm

Pointer to an ICspAlgorithm interface that represents an algorithm supported by the provider identified in the pCsp parameter. This parameter is optional and can be NULL.

Return value

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.

Return code/value Description
HRESULT_FROM_WIN32(ERROR_ALREADY_INITIALIZED)
The object is already initialized.

Remarks

The Initialize method saves the ICspInformation and ICspAlgorithm objects you specify in the CspInformation and CspAlgorithm properties. The method also creates an empty IX509EnrollmentStatus object and saves it in the EnrollmentStatus property.

An ICspStatuses collection is typically initialized by an IX509CertificateRequestPkcs10 object. The Initialize method has been provided so that you can create ICspStatus objects to add to a custom collection.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header certenroll.h
DLL CertEnroll.dll

See also

ICspStatus

ICspStatuses