Escape function (wingdi.h)
The Escape function enables an application to access the system-defined device capabilities that are not available through GDI. Escape calls made by an application are translated and sent to the driver.
Syntax
int Escape(
[in] HDC hdc,
[in] int iEscape,
[in] int cjIn,
[in] LPCSTR pvIn,
[out] LPVOID pvOut
);
Parameters
[in] hdc
A handle to the device context.
[in] iEscape
The escape function to be performed. This parameter must be one of the predefined escape values listed in Remarks. Use the ExtEscape function if your application defines a private escape value.
[in] cjIn
The number of bytes of data pointed to by the lpvInData parameter. This can be 0.
[in] pvIn
A pointer to the input structure required for the specified escape.
[out] pvOut
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.
Remarks
Of the original printer escapes, only the following can be used.
Escape | Description |
---|---|
QUERYESCSUPPORT | Determines whether a particular escape is implemented by the device driver. |
PASSTHROUGH | Allows the application to send data directly to a printer. |
For information about printer escapes, see ExtEscape.
Use the StartPage function to prepare the printer driver to receive data.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |