ICertEncodeAltName::SetNameEntry method (certenc.h)
The SetNameEntry method sets a name at a specified index of the alternate name array.
Before using this method, you must call ICertEncodeAltName::Reset so that the object knows how many elements are in the array.
Syntax
HRESULT SetNameEntry(
[in] LONG NameIndex,
[in] LONG NameChoice,
[in] const BSTR strName
);
Parameters
[in] NameIndex
Zero-based index that specifies the index of the alternate name entry to set.
If the NameChoice parameter is CERT_ALT_NAME_OTHER_NAME, OR (|) the index value with EAN_NAMEOBJECTID (defined as 0x80000000) to set the OID. Otherwise, the binary value is set.
[in] NameChoice
Specifies the name choice. The name choice indicates the type of the alternate name so that it can be used correctly. It must be one of the following values.
Value | Meaning |
---|---|
|
The name is a directory name. |
|
The name is an IA5 string specifying a DNS (Domain Name System) name in the format host.entity.domain. |
|
The name is an octet string that represents an Internet Protocol address. |
|
The name is a registered object identifier (OID). |
|
The name is an email address. |
|
The name is an IA5 string that contains a URL in the format Service://HostName/Path. |
|
The name consists of an object identifier (OID) and a binary BLOB. |
[in] strName
Specifies the alternate name.
Return value
VB
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.
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 |