ICertEncodeAltName::Encode method (certenc.h)
The Encode method returns an ASN.1-encoded string of the alternate name array stored in this object. The names in the object are not encoded.
Use the Decode method to decode the encoded string into an CertEncodeAltName object.
Before using this method, you must call both the Reset method to size the array and the SetNameEntry method to set each array element.
Syntax
HRESULT Encode(
[out] BSTR *pstrBinary
);
Parameters
[out] pstrBinary
A pointer to a BSTR that receives the ASN.1-encoded alternate name extension. When done, call SysFreeString to free pbstrBinary.
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 ASN.1-encoded alternate name array.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 |