ICertificatePolicy::Initialize method (certenroll.h)

The Initialize method initializes the object from an object identifier (OID).


HRESULT Initialize(
  [in] IObjectId *pValue


[in] pValue

Pointer to an IObjectId interface that represents the OID.

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 pointer to the IObjectId interface is NULL.
The object is already initialized.


You must use an initialized IObjectId object when calling this method. All of the IObjectId initialization methods search the registry and static memory on the local computer and Active Directory on the domain server for the first OID that matches the specified initialization parameters. You can retrieve the OID by calling the ObjectId property.

When you call the Initialize method, an empty IPolicyQualifiers object is created. You can retrieve the object by calling the PolicyQualifiers property. You can use the object to define policy qualifiers if you are creating a CertificatePolicies extension.


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