请输入您要查询的百科知识:

 

词条 ExtEscape
释义

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.

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2024/11/16 0:45:21