int Escape(hdc, nEscape, cbInput, lpszInData, lpvOutData) | |||||
HDC hdc; | /* handle of device context | */ | |||
int nEscape; | /* specifies escape function | */ | |||
int cbInput; | /* size of structure for input | */ | |||
LPCSTR lpszInData; | /* address of structure for input | */ | |||
void FAR* lpvOutData; | /* address of structure for output | */ |
The Escape function allows applications to access capabilities of a particular device that are not directly available through the graphics device interface (GDI). Escape calls made by an application are translated and sent to the driver.
hdc
Identifies the device context.
nEscape
Specifies the escape function to be performed. For a complete list of printer escapes, see the Microsoft Windows Programmer's Reference, Volume 3.
cbInput
Specifies the number of bytes of data pointed to by the lpszInData parameter.
lpszInData
Points to the input structure required for the specified escape.
lpvOutData
Points to the structure that receives output from this escape. This parameter should be NULL if no data is returned.
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.
If the function fails, the return value is one of the following:
Value | Meaning |
SP_ERROR | General error. |
SP_OUTOFDISK | Not enough disk space is currently available for spooling, and no more space will become available. |
SP_OUTOFMEMORY | Not enough memory is available for spooling. |
SP_USERABORT | User terminated the job through Print Manager. |