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.
int Escape( HDC hdc, int iEscape, int cjIn, LPCSTR pvIn, LPVOID pvOut );
A handle to the device context.
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.
The number of bytes of data pointed to by the lpvInData parameter. This can be 0.
A pointer to the input structure required for the specified escape.
A pointer to the structure that receives output from this escape. This parameter should be NULL if no data is returned.
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.
Of the original printer escapes, only the following can be used.
|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.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||wingdi.h (include Windows.h)|