网站首页  词典首页

请输入您要查询的函数:

 

术语 addjob
释义 AddJob
语法:
BOOL AddJob(
__in HANDLE hPrinter,
__in DWORD Level,
__out LPBYTE pData,
__in DWORD cbBuf,
__out LPDWORD pcbNeeded
);
AddJob功能
该AddJob函数将打印作业的打印,可以打印后台处理程序的计划作业清单。该函数检索该文件可以用来存储作业名称。
参数
hPrinter [in]
句柄,指定的打印作业打印机。这必须是本地打印机,打印机作为后台配置。如果hPrinter是一个句柄到远程打印机连接,或者如果打印机直接打印配置,AddJob函数失败。使用OpenPrinter或添加打印机函数检索打印机处理。
Level [in]
在打印作业的信息,数据结构,到缓冲区的功能商店指向pData版本。将此参数设置为1。
pData [out]
一个缓冲区收到ADDJOB_INFO_1数据结构和路径字符串指针。
cbBuf [in]
大小,指出以字节为缓冲区的pData。缓冲区必须足够大,以包含ADDJOB_INFO_1结构和路径字符串。
pcbNeeded [out]
一个变量,它接收的总字节大小的数据结构的ADDJOB_INFO_1加上路径字符串,指针。如果这个值小于或等于cbBuf和函数成功,这是写入到缓冲区的实际字节数指向pData。如果这个数目较cbBuf更大,缓冲区太小,您必须调用的缓冲区大小* pcbNeeded至少再大的功能。
返回值
如果函数成功,返回值是一个非零值。
如果函数失败,返回值是零。
备注
您可以调用CreateFile函数打开后台文件由ADDJOB_INFO_1结构的成员中指定的路径,然后调用WriteFile函数写入打印作业的数据给它。完成之后,调用ScheduleJob函数通知打印后台处理程序的打印作业现在可以由打印后台处理程序进行。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinspool.h(头文件:winuser.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode和ANSI namesAddJobW(Unicode)和AddJobA(ANSI)的
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
ADDJOB_INFO_1
CreateFile
OpenPrinter
ScheduleJob
WriteFile
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==AddJob Function
The AddJob function adds a print job to the list of print jobs that can be scheduled by the print spooler. The function retrieves the name of the file you can use to store the job.
Syntax
BOOL AddJob(
__in HANDLE hPrinter,
__in DWORD Level,
__out LPBYTE pData,
__in DWORD cbBuf,
__out LPDWORD pcbNeeded
);
Parameters
hPrinter [in]
A handle that specifies the printer for the print job. This must be a local printer that is configured as a spooled printer. If hPrinter is a handle to a remote printer connection, or if the printer is configured for direct printing, the AddJob function fails. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
Level [in]
The version of the print job information data structure that the function stores into the buffer pointed to by pData. Set this parameter to one.
pData [out]
A pointer to a buffer that receives an ADDJOB_INFO_1 data structure and a path string.
cbBuf [in]
The size, in bytes, of the buffer pointed to by pData. The buffer needs to be large enough to contain an ADDJOB_INFO_1 structure and a path string.
pcbNeeded [out]
A pointer to a variable that receives the total size, in bytes, of the ADDJOB_INFO_1 data structure plus the path string. If this value is less than or equal to cbBuf and the function succeeds, this is the actual number of bytes written to the buffer pointed to by pData. If this number is greater than cbBuf, the buffer is too small, and you must call the function again with a buffer size at least as large as *pcbNeeded.
Return Value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero.
Remarks
You can call the CreateFile function to open the spool file specified by the Path member of the ADDJOB_INFO_1 structure, and then call the WriteFile function to write print job data to it. After that is done, call the ScheduleJob function to notify the print spooler that the print job can now be scheduled by the spooler for printing.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinspool.h (include Windows.h)
LibraryWinspool.lib
DLLSpoolss.dll
Unicode and ANSI namesAddJobW (Unicode) and AddJobA (ANSI)
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
ADDJOB_INFO_1
CreateFile
OpenPrinter
ScheduleJob
WriteFile
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183329(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 11:25:54