网站首页  词典首页

请输入您要查询的函数:

 

术语 writeprinter
释义 WritePrinter
语法:
BOOL WritePrinter(
__in HANDLE hPrinter,
__in LPVOID pBuf,
__in DWORD cbBuf,
__out LPDWORD pcWritten
);
WritePrinter功能
该WritePrinter函数通知打印后台处理程序的数据应写入到指定的打印机。
参数
hPrinter [in]
句柄到打印机。使用OpenPrinter或添加打印机函数检索打印机处理。
pBuf [in]
对一个字节数组,其中包含应写入打印机数据的指针。
cbBuf [in]
大小,以字节数组的。
pcWritten [out]
一个一个值,它接收的是被写入打印机数据的字节数的指针。
返回值
如果函数成功,返回值是一个非零值。
如果函数失败,返回值是零。
备注
对于打印作业顺序如下:
开始一个打印作业,请发送StartDocPrinter。
首先每个页面,请StartPagePrinter。
将数据写入到页面,请WritePrinter。
要结束的每一页,请EndPagePrinter。
重复2,3和4需要尽可能多页。
要结束打印作业,请EndDocPrinter。
当一个高层次的文件(如Adobe PDF或Microsoft Word文件)或其他打印机的数据(如氯化磷,聚苯乙烯,或HPGL)直接发送到打印机时,打印设置文件中定义接管Windows打印设置的先例。文件与StartPrintDocpDocInfo参数pDatatype的“原始输出”必须充分描述由硬件理解的语言的DEVMODE式打印作业设置。
当在后台文件页面超过大约350 MB的,它可能无法打印,而不是发出错误信息。例如,这在打印时可能会发生大的EMF文件。页面大小限制取决于包括可用虚拟内存量的因素很多,由调用程序分配的内存量,以及碎片的数量在这个过程中堆。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinspool.h(头文件:winuser.h)
LibraryWinspool.lib
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
EndDocPrinter
EndPagePrinter
OpenPrinter
StartDocPrinter
StartPagePrinter
WritePrinter
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==WritePrinter Function
The WritePrinter function notifies the print spooler that data should be written to the specified printer.
Syntax
BOOL WritePrinter(
__in HANDLE hPrinter,
__in LPVOID pBuf,
__in DWORD cbBuf,
__out LPDWORD pcWritten
);
Parameters
hPrinter [in]
A handle to the printer. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
pBuf [in]
A pointer to an array of bytes that contains the data that should be written to the printer.
cbBuf [in]
The size, in bytes, of the array.
pcWritten [out]
A pointer to a value that receives the number of bytes of data that were written to the printer.
Return Value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero.
Remarks
The sequence for a print job is as follows:
To begin a print job, call StartDocPrinter .
To begin each page, call StartPagePrinter .
To write data to a page, call WritePrinter.
To end each page, call EndPagePrinter .
Repeat 2, 3, and 4 for as many pages as necessary.
To end the print job, call EndDocPrinter .
When a high-level document (such as an Adobe PDF or Microsoft Word file) or other printer data (such PCL, PS, or HPGL) is sent directly to a printer, the print settings defined in the document take precedent over Windows print settings. Documents output with the StartPrintDocpDocInfo parameter pDatatype of "RAW" must fully describe the DEVMODE -style print job settings in the language understood by the hardware.
When a page in a spooled file exceeds approximately 350 MB, it can fail to print and not send an error message. For example, this can occur when printing large EMF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinspool.h (include Windows.h)
LibraryWinspool.lib
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
EndDocPrinter
EndPagePrinter
OpenPrinter
StartDocPrinter
StartPagePrinter
WritePrinter
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd145226(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:30:01