网站首页  词典首页

请输入您要查询的函数:

 

术语 escape
释义 Escape
语法:
int Escape(
__in HDC hdc,
__in int nEscape,
__in int cbInput,
__in LPCSTR lpvInData,
__out LPVOID lpvOutData
);
转义函数
在逃生的功能,使应用程序的特定设备接入能力,通过GDI不直接提供。逃避拨打的申请翻译,发送到驱动程序。
参数
hdc [in]
一个句柄,设备上下文。
nEscape [in]
转义函数执行。此参数必须是一个预定义的转义值在备注一节中列出。使用ExtEscape功能,如果您的应用程序定义一个私人转义值。
cbInput [in]
对数据的字节数指向的lpvInData参数。这可以是0。
lpvInData [in]
一个输入结构指定指针规定的逃生。
lpvOutData [out]
一个结构,收到此转义输出指针。此参数应为NULL,如果不返回数据。
返回值
如果函数成功,返回值大于零,除非QUERYESCSUPPORT打印机转义,其中仅实施检查。如果逃避是没有实现,则返回值是零。
如果函数失败,返回值是一个系统错误代码。
错误
如果函数失败,返回值是下列值之一:
ValueMeaning
SP_ERRORGeneral错误。如果SP_ERROR返回,逃逸,可能为去年错误代码:
ERROR_INVALID_PARAMETER ERROR_DISK_FULL ERROR_NOT_ENOUGH_MEMORY ERROR_PRINT_CANCELLED
SP_OUTOFDISKNot足够的磁盘空间,目前可用于后台,没有更多的空间将变得可用。
SP_OUTOFMEMORYNot足够的内存可用于后台。
SP_USERABORTThe终止用户通过打印管理工作。
备注
在避cbInput 0将取决于nEscape价值和驱动程序处理逃跑的效果。
原来打印机逃脱,只有以下都可以使用。
EscapeDescription
是否是逃避,是由设备驱动程序中实现QUERYESCSUPPORTDetermines。
PASSTHROUGHAllows the application to send data directly to a printer.
以下打印机通道已经过时。他们只有与16兼容位版本的Windows。
EscapeDescription
ABORTDOCStops当前的打印作业,并清除一切的书面申请,自上次ENDDOC逃逸到设备。
这次越狱已取代了AbortDoc。
ENDDOCEnds打印作业的STARTDOC开始逃跑。
这是取代EndDoc。
GETPHYSPAGESIZERetrieves物理页的大小,并将其复制到指定的位置。
这次越狱已取代了PHYSICALWIDTH和GetDeviceCaps PHYSICALHEIGHT。
GETPRINTINGOFFSETRetrieves从物理页面左上角的偏移在实际印刷或绘图开始。
这次越狱已取代了PHYSICALOFFSETX和PHYSICALOFFSETY在GetDeviceCaps。
GETSCALINGFACTORRetrieves为x轴和y比例因子的打印机轴。
这次越狱已取代了SCALINGFACTORX和GetDeviceCaps SCALINGFACTORY。
NEWFRAMEInforms打印机应用程序已经写完的网页。
这次越狱已取代了末页结束的一页。与NEWFRAME,总是称为末页打印后的页面。
NEXTBANDInforms打印机应用程序已经写完的乐队。
带信息不再使用。
SETABORTPROCSets为打印作业中止功能。
这次越狱已取代了就是SETABORTPROC。
SETCOPYCOUNTSets的份数。
这次越狱已取代了DocumentProperties或PrinterProperties。
STARTDOCInforms打印机驱动程序,新的打印作业已经开始。
这次越狱已取代了StartDoc。
此外,起始页的功能是用来准备打印机驱动程序接收数据。
实例
有关示例,请参见创建打印机设备上下文。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
AbortDoc
DocumentProperties
EndDoc
末页
ExtEscape
GetDeviceCaps
PrinterProperties
SETABORTPROC的
StartDoc
起始页
ResetDC
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==Escape Function
The Escape function enables applications to access capabilities of a particular device not directly available through GDI. Escape calls made by an application are translated and sent to the driver.
Syntax
int Escape(
__in HDC hdc,
__in int nEscape,
__in int cbInput,
__in LPCSTR lpvInData,
__out LPVOID lpvOutData
);
Parameters
hdc [in]
A handle to the device context.
nEscape [in]
The escape function to be performed. This parameter must be one of the predefined escape values listed in the Remarks section. Use the ExtEscape function if your application defines a private escape value.
cbInput [in]
The number of bytes of data pointed to by the lpvInData parameter. This can be 0.
lpvInData [in]
A pointer to the input structure required for the specified escape.
lpvOutData [out]
A pointer to the structure that receives output from this escape. This parameter should be NULL if no data is returned.
Return Value
If the function succeeds, the return value is greater than zero, except with the QUERYESCSUPPORT printer escape, which checks for implementation only. If the escape is not implemented, the return value is zero.
If the function fails, the return value is a system error code.
Errors
If the function fails, the return value is one of the following values:
ValueMeaning
SP_ERRORGeneral error. If SP_ERROR is returned, Escape may set the last error code to:
ERROR_INVALID_PARAMETER ERROR_DISK_FULL ERROR_NOT_ENOUGH_MEMORY ERROR_PRINT_CANCELLED
SP_OUTOFDISKNot enough disk space is currently available for spooling, and no more space will become available.
SP_OUTOFMEMORYNot enough memory is available for spooling.
SP_USERABORTThe user terminated the job through Print Manager.

Remarks
The effect of passing 0 for cbInput will depend on the value of nEscape and on the driver that is handling the escape.
Of the original printer escapes, only the following can be used.
EscapeDescription
QUERYESCSUPPORTDetermines whether a particular escape is implemented by the device driver.
PASSTHROUGHAllows the application to send data directly to a printer.

The following printer escapes are obsolete. They are provided only for compatibility with 16-bit versions of Windows.
EscapeDescription
ABORTDOCStops the current print job and erases everything the application has written to the device since the last ENDDOC escape.
This escape has been superseded by AbortDoc .
ENDDOCEnds a print job started by the STARTDOC escape.
This is superseded by EndDoc .
GETPHYSPAGESIZERetrieves the physical page size and copies it to the specified location.
This escape has been superseded by PHYSICALWIDTH and PHYSICALHEIGHT in GetDeviceCaps .
GETPRINTINGOFFSETRetrieves the offset from the upper-left corner of the physical page where the actual printing or drawing begins.
This escape has been superseded by PHYSICALOFFSETX and PHYSICALOFFSETY in GetDeviceCaps.
GETSCALINGFACTORRetrieves the scaling factors for the x-axis and the y-axis of a printer.
This escape has been superseded by SCALINGFACTORX and SCALINGFACTORY in GetDeviceCaps.
NEWFRAMEInforms the printer that the application has finished writing to a page.
This escape has been superseded by EndPage which ends a page. Unlike NEWFRAME, EndPage is always called after printing a page.
NEXTBANDInforms the printer that the application has finished writing to a band.
Band information is no longer used.
SETABORTPROCSets the Abort function for a print job.
This escape has been superseded by SetAbortProc .
SETCOPYCOUNTSets the number of copies.
This escape has been superseded by DocumentProperties or PrinterProperties .
STARTDOCInforms a printer driver that a new print job is starting.
This escape has been superseded by StartDoc .

In addition, the StartPage function is used to prepare the printer driver to receive data.
Examples
For an example, see Creating a Printer Device Context .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
AbortDoc
DocumentProperties
EndDoc
EndPage
ExtEscape
GetDeviceCaps
PrinterProperties
SetAbortProc
StartDoc
StartPage
ResetDC
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162701(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:28:57