PFN_CRYPT_XML_DATA_PROVIDER_READ callback function (cryptxml.h)

The PFN_CRYPT_XML_DATA_PROVIDER_READ callback function reads XML data.

Syntax

PFN_CRYPT_XML_DATA_PROVIDER_READ PfnCryptXmlDataProviderRead;

HRESULT PfnCryptXmlDataProviderRead(
  [in, out] void *pvCallbackState,
  [out]     BYTE *pbData,
  [in]      ULONG cbData,
  [out]     ULONG *pcbRead
)
{...}

Parameters

[in, out] pvCallbackState

A pointer to an application defined argument that is passed to the calling function.

[out] pbData

A pointer to the buffer that receives the data to be read.

[in] cbData

The size, in bytes, of the data to be read.

[out] pcbRead

A pointer to a variable that receives the number of bytes actually read.

Return value

The PFN_CRYPT_XML_DATA_PROVIDER_READ callback function returns a value when one of the following conditions occurs:

  • A write operation completes on the data provider
  • The number of bytes requested is read
  • An error occurs
If the function succeeds, the function returns NO_ERROR.

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

If the value of pcbRead equals zero, then there is no more data available.

Remarks

The callback function does not return a value unless the number of bytes specified in cbData is available or the last block of data has been read.

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