大网数据广告活动
打印与设备

BindPTProviderThunk function

· 52CE 我爱测

Opens an instance of a print ticket provider.

[This function is not supported and might be disabled or deleted in future versions of Windows. PTOpenProviderEx provides equivalent functionality and should be used instead.]

Opens an instance of a print ticket provider.

Syntax

HRESULT BindPTProviderThunk(
  _In_  LPTSTR      pszPrinterName,
  _In_  INT         maxVersion,
  _In_  INT         prefVersion,
  _Out_ HPTPROVIDER *phProvider,
  _Out_ INT         *usedVersion
);

Parameters

pszPrinterName [in]

The full name of a print queue.

maxVersion [in]

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

prefVersion [in]

The version of the Print Schema requested by the caller.

phProvider [out]

A pointer to a handle to the print ticket provider.

usedVersion [out]

The version of the Print Schema that the print ticket provider will use.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code. For more information about COM error codes, see Error Handling.

Remarks

Before calling this function, the calling thread must initialize COM by calling CoInitializeEx.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
DLL Prntvpt.dll

See also

Print Schema

PTOpenProviderEx

Printing

Print Spooler API Functions

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。