Skip to content

Latest commit

 

History

History
103 lines (73 loc) · 3.36 KB

nf-prntvpt-ptopenproviderex.md

File metadata and controls

103 lines (73 loc) · 3.36 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:prntvpt.PTOpenProviderEx
PTOpenProviderEx function (prntvpt.h)
Opens an instance of a print ticket provider. (PTOpenProviderEx)
PTOpenProviderEx
PTOpenProviderEx function [Windows GDI]
_win32_PTOpenProviderEx
gdi.ptopenproviderex
prntvpt/PTOpenProviderEx
gdi\ptopenproviderex.htm
xps
0e65170b-66f6-4238-bdde-0a0b7108a686
12/05/2018
PTOpenProviderEx, PTOpenProviderEx function [Windows GDI], _win32_PTOpenProviderEx, gdi.ptopenproviderex, prntvpt/PTOpenProviderEx
prntvpt.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Prntvpt.lib
Prntvpt.dll
Windows
19H1
PTOpenProviderEx
prntvpt/PTOpenProviderEx
c++
APIRef
kbSyntax
DllExport
prntvpt.dll
PTOpenProviderEx

PTOpenProviderEx function

-description

Opens an instance of a print ticket provider.

-parameters

-param pszPrinterName [in]

A pointer to the full name of a print queue.

-param dwMaxVersion

The latest version of the Print Schema that the caller supports.

-param dwPrefVersion

The version of the Print Schema requested by the caller.

-param phProvider [out]

A pointer to a handle for the provider.

-param pUsedVersion [out]

A pointer to the version of the Print Schema that the print ticket provider will use.

-returns

If the operation succeeds, the return value is S_OK, otherwise the HRESULT contains an error code.

For more information about COM error codes, see Error Handling.

-remarks

Note  This is a blocking or synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation—factors that are difficult to predict when writing an application. Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.
 
The pszPrinterName parameter must be the full name, not the truncated name as it may appear in a DEVMODE.

The first version of the Print Schema was released with Windows Vista and is version 1. If the print ticket provider does not support prefVersion, PTOpenProviderEx successfully opens a handle and returns an earlier version in usedVersion.

To avoid a resource leak, phProvider must be closed with PTCloseProvider.

-see-also

Print Schema

Print Spooler API Functions

Printing