CryptXmlEncode function (cryptxml.h)

The CryptXmlEncode function encodes signature data by using the supplied XML writer callback function.

Syntax

HRESULT CryptXmlEncode(
  [in]      HCRYPTXML                    hCryptXml,
            CRYPT_XML_CHARSET            dwCharset,
  [in]      const CRYPT_XML_PROPERTY     *rgProperty,
  [in]      ULONG                        cProperty,
  [in, out] void                         *pvCallbackState,
  [in]      PFN_CRYPT_XML_WRITE_CALLBACK pfnWrite
);

Parameters

[in] hCryptXml

The handle of the object to be serialized. The handle can be of Signature, Object, or Reference types.

dwCharset

A value of the CRYPT_XML_CHARSET enumeration that specifies the character set of the encoded XML.

[in] rgProperty

A pointer to an array of CRYPT_XML_PROPERTY structures that contain additional properties.

[in] cProperty

A ULONG value that specifies the number of entries in the array pointed to by the rgProperty parameter.

[in, out] pvCallbackState

A pointer to an application defined argument that is passed to the XML writer callback function pointed to by the pfnWrite parameter.

[in] pfnWrite

An XML writer callback function to receive the application defined argument pointed to by the pvCallbackState parameter.

Return value

If the function succeeds, the function returns zero.

If the function fails, it returns an HRESULT value that indicates the error.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header cryptxml.h
Library Cryptxml.lib
DLL Cryptxml.dll