PTGetPrintDeviceCapabilities function (prntvpt.h)

Retrieves the device printer's capabilities formatted in compliance with the XML Print Schema.

Syntax

HRESULT PTGetPrintDeviceCapabilities(
  [in]            HPTPROVIDER hProvider,
  [in, optional]  IStream     *pPrintTicket,
                  IStream     *pDeviceCapabilities,
  [out, optional] BSTR        *pbstrErrorMessage
);

Parameters

[in] hProvider

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

[in, optional] pPrintTicket

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

pDeviceCapabilities

A pointer to the stream where the device print capabilities 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.The function uses this parameter only used if pPrintTicket is used.

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