IX509PublicKey::Initialize method (certenroll.h)
The Initialize method initializes the object from a public key algorithm object identifier (OID) and from byte arrays that contain a public key and the associated parameters, if any. The byte arrays are represented by Unicode-encoded strings.
Syntax
HRESULT Initialize(
[in] IObjectId *pObjectId,
[in] BSTR strEncodedKey,
[in] BSTR strEncodedParameters,
[in] EncodingType Encoding
);
Parameters
[in] pObjectId
Pointer to an IObjectId interface that represents the algorithm OID.
[in] strEncodedKey
A BSTR variable that contains the public key.
[in] strEncodedParameters
A BSTR variable that contains the parameters associated with the public key. For more information, see the EncodedParameters property.
[in] Encoding
An EncodingType enumeration value that specifies the type of Unicode-encoding applied to the arguments specified in the strEncodedKey and strEncodedParameters parameters. The default value is XCN_CRYPT_STRING_BASE64.
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 object has already been initialized. |
Remarks
The Initialize method initializes the following property values:
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 |