ExtEscape

王朝百科·作者佚名  2010-05-18
窄屏简体版  字體: |||超大  

ExtEscape 函数

The ExtEscape function enables applications to access capabilities of a particular device that are not available through GDI.

定义

int ExtEscape(HDC hdc, int nEscape, int cbInput, LPCSTR lpszInData, int cbOutput, LPSTR lpszOutData);

参数

hdc

Handle to the device context.

nEscape

Specifies the escape function to be performed. It can be one of the following or it can be an application-defined escape function.

CHECKJPEGFORMAT - Windows 2000/XP: Checks whether the printer supports a JPEG image.

CHECKPNGFORMAT - Windows 2000/XP: Checks whether the printer supports a PNG image.

DRAWPATTERNRECT - Draws a white, gray-scale, or black rectangle.

GET_PS_FEATURESETTING - Windows 2000/XP: Gets information on a specified feature setting for a PostScript driver.

PASSTHROUGH - Allows the application to send data directly to a printer. Supported in compatibility mode and GDI-centric mode.

POSTSCRIPT_DATA - Allows the application to send data directly to a printer. Supported only in compatibility mode.

POSTSCRIPT_IDENTIFY - Windows 2000/XP: Sets a PostScript driver to GDI-centric or PostScript-centric mode.

POSTSCRIPT_INJECTION - Windows 2000/XP: Inserts a block of raw data in a PostScript job stream.

POSTSCRIPT_PASSTHROUGH - Windows 2000/XP: Sends data directly to a PostScript printer driver. Supported in compatibility mode and PS-centric mode.

QUERYESCSUPPORT - Determines whether a particular escape is implemented by the device driver.

SPCLPASSTHROUGH2 - Windows 2000/XP: Allows applications to include private procedures and other resources at the document level-save context.

cbInput

Specifies the number of bytes of data pointed to by the lpszInData parameter.

lpszInData

Pointer to the input structure required for the specified escape.

cbOutput

Specifies the number of bytes of data pointed to by the lpszOutData parameter.

lpszOutData

[out] Pointer to the structure that receives output from this escape. This parameter must not be NULL if ExtEscape is called as a query function. If no data is to be returned in this structure, set cbOutput to 0.

返回值

The return value specifies the outcome of the function. It is greater than zero if the function is successful, except for the QUERYESCSUPPORT printer escape, which checks for implementation only. The return value is zero if the escape is not implemented. A return value less than zero indicates an error.

Windows NT/2000/XP: To get extended error information, call GetLastError.

说明

Use this function to pass a driver-defined escape value to a device.

Use the Escape function to pass one of the system-defined escape values to a device, unless the escape is one of the defined escapes in nEscape. ExtEscape might not work properly with the system-defined escapes. In particular, escapes in which lpszInData is a pointer to a structure that contains a member that is a pointer will fail.

Note, that the behaviour described in this article is the expected behavior, but it is up to the driver to comply with this model.

系统要求

Windows NT/2000/XP: Included in Windows NT 3.1 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Wingdi.h; include Windows.h.

Library: Use Gdi32.lib.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航