PTGetPrintDeviceResources function (prntvpt.h)

It retrieves the print devices resources for a printer formatted in compliance with the XML Print Schema.

Syntax

HRESULT PTGetPrintDeviceResources(
  [in]            HPTPROVIDER hProvider,
  [in]            LPCWSTR     pszLocaleName,
  [in]            IStream     *pPrintTicket,
                  IStream     *pDeviceResources,
  [out, optional] BSTR        *pbstrErrorMessage
);

Parameters

[in] hProvider

A handle to an open device provider whose print device resources are to be retrieved. This handle is returned by the PTOpenProvider or the PTOpenProviderEx function.

[in] pszLocaleName

Optional pointer to the locale name. This parameter can be NULL.

[in] pPrintTicket

A pointer to a stream with its seek position at the beginning of the print ticket content. This parameter can be NULL.

pDeviceResources

A pointer to the stream where the device print resources will be written, starting at the current seek position.

[out, optional] pbstrErrorMessage

A pointer to a PDC file or string that specifies what, if anything, is invalid about pPrintTicket. If it is valid, this value is NULL.

Return value

If the operation succeeds, the return value is S_OK. Otherwise, returns an error message.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1703 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header prntvpt.h
Library Prntvpt.lib
DLL Prntvpt.dll

See also

PTGetPrintCapabilities

PTGetPrintDeviceCapabilities