Platform SDK: Certificate Services

ICertEncodeLongArray::Decode [C++]

CCertEncodeLongArray.Decode [Visual Basic]

The Decode method decodes an ASN-encoded Long array and stores the resulting array of Long values in the COM object.

[C++]
HRESULT Decode(
  BSTR const strBinary
);
[Visual Basic]
objEncodeLongArray.Decode( strBinary As String )

Parameters

[C++,Visual Basic] strBinary
[in] An ASN-encoded Long array.
[Visual Basic] objEncodeLongArray
Object expression that resolves to an ICertEncodeLongArray object.

Return Values

[C++] The return value is an HRESULT. A value of S_OK indicates the method was successful.

[Visual Basic] None.

Remarks

This method will place the decoded contents of strBinary into the object's array of Long values. If the object's array already contains Long values, this existing content will be freed, and the array will be loaded with the decoded values.

Example Code [C++]

// bstrEncode is a previously encoded BSTR.
hr = pEncodeLongArray->Decode(bstrEncode);
if (FAILED(hr))
{
    printf("Failed pEncodeLongArray->Decode [%x]\n", hr);
    goto error;
}
// Successfully decoded.
// ...

// Done processing.
if (NULL != bstrEncode)
    SysFreeString(bstrEncode);

Requirements

  Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with the Windows NT 4.0 Option Pack).
  Header: Declared in Certenc.h; include Certsrv.h.
  Library: Use Certidl.lib.

See Also

ICertEncodeLongArray