网站首页  词典首页

请输入您要查询的函数:

 

术语 enumjobs
释义 EnumJobs
语法:
BOOL EnumJobs(
__in HANDLE hPrinter,
__in DWORD FirstJob,
__in DWORD NoJobs,
__in DWORD Level,
__out LPBYTE pJob,
__in DWORD cbBuf,
__out LPDWORD pcbNeeded,
__out LPDWORD pcReturned
);
EnumJobs功能
该EnumJobs函数检索信息的打印作业的一组指定指定的打印机。
参数
hPrinter [in]
句柄到打印机对象的打印作业的功能枚举。使用OpenPrinter或添加打印机函数检索打印机处理。
FirstJob [in]
从零开始的范围内第一个打印作业的打印队列中的位置枚举。例如,值为0指定例举应当开始在打印队列中第一个打印作业,一个9值指定例举应当开始在打印队列中打印作业的十分之一。
NoJobs [in]
在打印作业总数枚举。
Level [in]
在缓冲区的pJob返回的信息类型。
ValueMeaning
1pJob收到的JOB_INFO_1结构的数组
2pJob收到的JOB_INFO_2结构的数组
3pJob收到的JOB_INFO_3结构的数组
pJob [out]
A到接收缓冲区的JOB_INFO_1,JOB_INFO_2,或JOB_INFO_3结构数组的指针。该缓冲区必须足够大,得到结构的数组和字符串或任何其他数据进行了结构成员点。
要确定所需的缓冲区大小,设置为0 cbBuf呼吁EnumJobs。 EnumJobs失败,GetLastError返回ERROR_INSUFFICIENT_BUFFER和pcbNeeded参数返回的大小,以字节为单位须持有的结构及其数据数组中的缓冲区。
cbBuf [in]
大小,以字节为单位,在pJob缓冲区。
pcbNeeded [out]
一个变量,它接收复制的字节数,如果函数成功指针。如果函数失败,变量接收到所需的字节数。
pcReturned [out]
一个变量,它接收的JOB_INFO_1,JOB_INFO_2,或pJob缓冲区返回JOB_INFO_3结构数量的指针。
返回值
如果函数成功,返回值是一个非零值。
如果函数失败,返回值是零。
备注
该JOB_INFO_1结构包含一般打印作业的资料; JOB_INFO_2结构更详细的信息。该JOB_INFO_3结构包含有关如何工作有联系的信息。
要确定打印作业在打印机队列号码,调用与级别参数GetPrinter功能设置为2。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinspool.h(头文件:winuser.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode和ANSI namesEnumJobsW(Unicode)和EnumJobsA(ANSI)的
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
GetJob
GetPrinter
JOB_INFO_1
JOB_INFO_2
JOB_INFO_3
OpenPrinter
SetJob
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==EnumJobs Function
The EnumJobs function retrieves information about a specified set of print jobs for a specified printer.
Syntax
BOOL EnumJobs(
__in HANDLE hPrinter,
__in DWORD FirstJob,
__in DWORD NoJobs,
__in DWORD Level,
__out LPBYTE pJob,
__in DWORD cbBuf,
__out LPDWORD pcbNeeded,
__out LPDWORD pcReturned
);
Parameters
hPrinter [in]
A handle to the printer object whose print jobs the function enumerates. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
FirstJob [in]
The zero-based position within the print queue of the first print job to enumerate. For example, a value of 0 specifies that enumeration should begin at the first print job in the print queue; a value of 9 specifies that enumeration should begin at the tenth print job in the print queue.
NoJobs [in]
The total number of print jobs to enumerate.
Level [in]
The type of information returned in the pJob buffer.
ValueMeaning
1pJob receives an array of JOB_INFO_1 structures
2pJob receives an array of JOB_INFO_2 structures
3pJob receives an array of JOB_INFO_3 structures

pJob [out]
A pointer to a buffer that receives an array of JOB_INFO_1, JOB_INFO_2, or JOB_INFO_3 structures. The buffer must be large enough to receive the array of structures and any strings or other data to which the structure members point.
To determine the required buffer size, call EnumJobs with cbBuf set to zero. EnumJobs fails, GetLastError returns ERROR_INSUFFICIENT_BUFFER, and the pcbNeeded parameter returns the size, in bytes, of the buffer required to hold the array of structures and their data.
cbBuf [in]
The size, in bytes, of the pJob buffer.
pcbNeeded [out]
A pointer to a variable that receives the number of bytes copied if the function succeeds. If the function fails, the variable receives the number of bytes required.
pcReturned [out]
A pointer to a variable that receives the number of JOB_INFO_1, JOB_INFO_2, or JOB_INFO_3 structures returned in the pJob buffer.
Return Value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero.
Remarks
The JOB_INFO_1 structure contains general print-job information; the JOB_INFO_2 structure has much more detailed information. The JOB_INFO_3 structure contains information about how jobs are linked.
To determine the number of print jobs in the printer queue, call the GetPrinter function with the Level parameter set to 2.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinspool.h (include Windows.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode and ANSI namesEnumJobsW (Unicode) and EnumJobsA (ANSI)
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
GetJob
GetPrinter
JOB_INFO_1
JOB_INFO_2
JOB_INFO_3
OpenPrinter
SetJob
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162625(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:16:24