ExtEscape

The ExtEscape function allows applications to access capabilities of a particular device that are not available through GDI.

int ExtEscape(
  HDC hdc,            // handle to device context
  int nEscape,        // escape function
  int cbInput,        // number of bytes in input structure
  LPCSTR lpszInData,  // pointer to input structure
  int cbOutput,       // number of bytes in output structure
  LPSTR lpszOutData   // pointer to output structure
);
 

Parameters

hdc
Handle to the device context.
nEscape
Specifies the escape function to be performed.
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
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.

Return Values

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: To get extended error information, call GetLastError.

Remarks

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. ExtEscape might not work properly with the system-defined escapes. In particular, escapes in which lpszInData points to a structure that contains a member that is a pointer will fail.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Printing and Print Spooler Overview, Printing and Print Spooler Functions, Escape, GetDeviceCaps