IX509Enrollment::Initialize method (certenroll.h)
The Initialize method initializes the enrollment object and creates a default PKCS #10 request. This method is web enabled.
Syntax
HRESULT Initialize(
[in] X509CertificateEnrollmentContext Context
);
Parameters
[in] Context
An X509CertificateEnrollmentContext enumeration value that specifies whether the requested enrollment is for a user, a computer, or an administrator acting on behalf of a computer.
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 |
---|---|
|
The enrollment object has already been initialized. |
Remarks
The Initialize method creates a new key pair and initializes empty collections for the attributes, extensions and critical extensions associated with the request.
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 |