网站首页  词典首页

请输入您要查询的函数:

 

术语 enumprinterdataex
释义 EnumPrinterDataEx
语法:
DWORD EnumPrinterDataEx(
__in HANDLE hPrinter,
__in LPCTSTR pKeyName,
__out LPBYTE pEnumValues,
__in DWORD cbEnumValues,
__out LPDWORD pcbEnumValues,
__out LPDWORD pnEnumValues
);
EnumPrinterDataEx功能
枚举函数的EnumPrinterDataEx为指定的打印机和关键都值名称和数据。
打印机数据存储在注册表中。虽然列举打印机数据,不调用注册表功能,可能会改变的数据。
参数
hPrinter [in]
一个句柄,打印机其功能配置数据检索。使用OpenPrinter或添加打印机函数检索打印机处理。
pKeyName [in]
一个指向 null 结尾的字符串指针,包含指定键的值枚举。使用反斜杠(\\)作为分隔符指定一个或多个子项的路径。 EnumPrinterDataEx列举的所有核心价值观,但没有列举的指定键子项的值。使用EnumPrinterKey函数来枚举子项。
如果pKeyName为NULL或空字符串,EnumPrinterDataEx返回ERROR_INVALID_PARAMETER。
pEnumValues [out]
A到接收缓冲区的PRINTER_ENUM_VALUES结构的数组指针。每个结构包含值的名称,类型,数据,并根据价值大小的关键。
cbEnumValues [in]
大小,指出以字节为缓冲区的pcbEnumValues。如果您设置cbEnumValues为零,pcbEnumValues参数返回所需的缓冲区大小。
pcbEnumValues [out]
一个变量,它接收的字节大小检索到的配置数据,指针。如果缓冲区大小cbEnumValues指定太小,函数返回ERROR_MORE_DATA和pcbEnumValues显示所需的缓冲区大小。
pnEnumValues [out]
一个变量,它接收的PRINTER_ENUM_VALUES结构的数目指针返回pEnumValues。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是一个系统错误代码。
备注
EnumPrinterDataEx retrieves printer configuration data set by the SetPrinterDataEx and SetPrinterData functions.
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinspool.h(头文件:winuser.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode和ANSI namesEnumPrinterDataExW(Unicode)和EnumPrinterDataExA(ANSI)的
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
DeletePrinterDataEx
EnumPrinterKey
GetPrinterDataEx
OpenPrinter
PRINTER_ENUM_VALUES
SetPrinterData
SetPrinterDataEx
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==EnumPrinterDataEx Function
The EnumPrinterDataEx function enumerates all value names and data for a specified printer and key.
Printer data is stored in the registry. While enumerating printer data, do not call registry functions that might change the data.
Syntax
DWORD EnumPrinterDataEx(
__in HANDLE hPrinter,
__in LPCTSTR pKeyName,
__out LPBYTE pEnumValues,
__in DWORD cbEnumValues,
__out LPDWORD pcbEnumValues,
__out LPDWORD pnEnumValues
);
Parameters
hPrinter [in]
A handle to the printer for which the function retrieves configuration data. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
pKeyName [in]
A pointer to a null-terminated string that specifies the key containing the values to enumerate. Use the backslash ( \\ ) character as a delimiter to specify a path with one or more subkeys. EnumPrinterDataEx enumerates all values of the key, but does not enumerate values of subkeys of the specified key. Use the EnumPrinterKey function to enumerate subkeys.
If pKeyName is NULL or an empty string, EnumPrinterDataEx returns ERROR_INVALID_PARAMETER.
pEnumValues [out]
A pointer to a buffer that receives an array of PRINTER_ENUM_VALUES structures. Each structure contains the value name, type, data, and sizes of a value under the key.
cbEnumValues [in]
The size, in bytes, of the buffer pointed to by pcbEnumValues. If you set cbEnumValues to zero, the pcbEnumValues parameter returns the required buffer size.
pcbEnumValues [out]
A pointer to a variable that receives the size, in bytes, of the retrieved configuration data. If the buffer size specified by cbEnumValues is too small, the function returns ERROR_MORE_DATA and pcbEnumValues indicates the required buffer size.
pnEnumValues [out]
A pointer to a variable that receives the number of PRINTER_ENUM_VALUES structures returned in pEnumValues.
Return Value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code.
Remarks
EnumPrinterDataEx retrieves printer configuration data set by the SetPrinterDataEx and SetPrinterData functions.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinspool.h (include Windows.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode and ANSI namesEnumPrinterDataExW (Unicode) and EnumPrinterDataExA (ANSI)
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
DeletePrinterDataEx
EnumPrinterKey
GetPrinterDataEx
OpenPrinter
PRINTER_ENUM_VALUES
SetPrinterData
SetPrinterDataEx
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162689(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:15:26