IObjectId::InitializeFromName method (certenroll.h)
The InitializeFromName method initializes the object from a CERTENROLL_OBJECTID enumeration value. This method is web enabled.
Syntax
HRESULT InitializeFromName(
[in] CERTENROLL_OBJECTID Name
);
Parameters
[in] Name
A CERTENROLL_OBJECTID enumeration value.
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 OID information could not be found. |
|
The algorithm name is not recognized. |
|
The object is already initialized. |
Remarks
Every CERTENROLL_OBJECTID value is associated with an ASN.1 object identifier. For example, the value XCN_OID_ECDSA_SHA1 is associated with a string that contains 1.2.840.10045.4.1. This is the dotted decimal representation of the iso(1)member-body(2)us(840)10045 signatures(4)sha1(1) object identifier.
The InitializeFromName method searches the registry for information associated with the ASN.1 object identifier. If information is found, the method internally populates a CRYPT_OID_INFO structure and associates it with the object. The method also uses the local information to initialize, if possible, the display name of the object.
You can call the following properties to retrieve information about an initialized IObjectId object:
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 |