IX509EnrollmentHelper::Initialize method (certenroll.h)

The Initialize method initializes an IX509EnrollmentHelper object.

Syntax

HRESULT Initialize(
  [in] X509CertificateEnrollmentContext Context
);

Parameters

[in] Context

An X509CertificateEnrollmentContext enumeration value that specifies the nature of the end entity for which the issued certificate is intended. This can be one of the following values.

Value Meaning
ContextUser
The certificate is intended for an end user.
ContextMachine
The certificate is intended for a computer.
ContextAdministratorForceMachine
The certificate is being requested by an administrator acting on the 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 Description
HRESULT_FROM_WIN32(ERROR_ALREADY_INITIALIZED
The object has already been initialized.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header certenroll.h

See also

IX509EnrollmentHelper