ICertEncodeAltName::GetName method (certenc.h)
The GetName method returns the specified name from the alternate name array.
Syntax
HRESULT GetName(
[in] LONG NameIndex,
[out] BSTR *pstrName
);
Parameters
[in] NameIndex
A zero-based index that specifies the index of the alternate name entry to retrieve.
To retrieve the object identifier (OID) of a CERT_ALT_NAME_OTHER_NAME name, combine the index value with EAN_NAMEOBJECTID (defined as 0x80000000) with a bitwise-OR operation. Otherwise, the binary value is retrieved. To determine the type of name, call the ICertEncodeAltName::GetNameChoice method.
[out] pstrName
A pointer to a BSTR that receives the alternate name. When you have finished using the BSTR, free it by calling the SysFreeString function.
Return value
C++
If the method succeeds, the method returns S_OK.If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.
VB
The return value is the alternate name at the specified index. The return value is a Unicode string.Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | certenc.h (include Certsrv.h) |
Library | Certidl.lib |
DLL | Certenc.dll |