ExtEscape是一種系統要求為Windows NT/2000/XP的計算機函式。
基本介紹
- 外文名:ExtEscape
- 類別:函式
- 系統要求:Windows NT/2000/XP
- 參數:hdc
簡介,系統要求,
簡介
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.