Skip to content

Latest commit

 

History

History
136 lines (107 loc) · 5.49 KB

nf-certenroll-ialternativename-initializefromothername.md

File metadata and controls

136 lines (107 loc) · 5.49 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:certenroll.IAlternativeName.InitializeFromOtherName
IAlternativeName::InitializeFromOtherName (certenroll.h)
Initializes the object from an object identifier (OID) and the associated raw data (byte array).
IAlternativeName interface [Security]
InitializeFromOtherName method
IAlternativeName.InitializeFromOtherName
IAlternativeName::InitializeFromOtherName
InitializeFromOtherName
InitializeFromOtherName method [Security]
InitializeFromOtherName method [Security]
IAlternativeName interface
certenroll/IAlternativeName::InitializeFromOtherName
security.ialternativename_initializefromothername_method
security\ialternativename_initializefromothername_method.htm
security
cd697085-0e8e-4a18-a7c5-77cd4927f664
12/05/2018
IAlternativeName interface [Security],InitializeFromOtherName method, IAlternativeName.InitializeFromOtherName, IAlternativeName::InitializeFromOtherName, InitializeFromOtherName, InitializeFromOtherName method [Security], InitializeFromOtherName method [Security],IAlternativeName interface, certenroll/IAlternativeName::InitializeFromOtherName, security.ialternativename_initializefromothername_method
certenroll.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
CertEnroll.dll
Windows
19H1
IAlternativeName::InitializeFromOtherName
certenroll/IAlternativeName::InitializeFromOtherName
c++
APIRef
kbSyntax
COM
CertEnroll.dll
IAlternativeName.InitializeFromOtherName

IAlternativeName::InitializeFromOtherName

-description

The InitializeFromOtherName method initializes the object from an object identifier (OID) and the associated raw data (byte array). This method is provided to support the otherName field in the Abstract Syntax Notation One (ASN.1) AlternativeNames extension declaration.

----------------------------------------------------------------------
-- AlternativeNames 
-- XCN_OID_SUBJECT_ALT_NAME2 (2.5.29.17)
----------------------------------------------------------------------

AltNames ::= SEQUENCE --#public-- OF GeneralName
GeneralNames ::= AltNames

GeneralName ::= CHOICE 
{
   otherName               [0] IMPLICIT OtherName,
   rfc822Name              [1] IMPLICIT IA5STRING,
   dNSName                 [2] IMPLICIT IA5STRING,
   x400Address             [3] IMPLICIT SeqOfAny,       -- Not supported
   directoryName           [4] EXPLICIT ANY,    
   ediPartyName            [5] IMPLICIT SeqOfAny,
   uniformResourceLocator  [6] IMPLICIT IA5STRING,
   iPAddress               [7] IMPLICIT OCTETSTRING,
   registeredID            [8] IMPLICIT EncodedObjectID -- Not supported
}

OtherName ::= SEQUENCE 
{
   type                    EncodedObjectID,
   value                   [0] EXPLICIT NOCOPYANY 
}

-parameters

-param pObjectId [in]

Pointer to an IObjectId interface that represents an OID.

-param Encoding [in]

An EncodingType enumeration value that identifies the type of Unicode encoding applied to the strRawData parameter.

-param strRawData [in]

A BSTR variable that contains the name associated with the OID.

-param ToBeWrapped [in]

A VARIANT_BOOL variable that identifies whether the input string contained in the strRawData parameter is encoded and saved as an octet string (byte array).

-returns

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
HRESULT_FROM_WIN32(ERROR_ALREADY_INITIALIZED)
The object is already initialized.

-remarks

You can use this function to initialize an IAlternativeName object from an OID and an associated string value. The string is Unicode encoded. If you specify true for the ToBeWrapped parameter, the string is encoded by using Distinguished Encoding Rules (DER). You can retrieve the OID by calling the ObjectId property. You can retrieve the encoded string or, if ToBeWrapped is true, the DER-encoded byte array by calling the RawData property to retrieve the encoded byte array.

-see-also

IAlternativeName