DEVESC_RAWDATA
GreEscape DEVESC_RAWDATA sends device-specific data directly to the spooler or device.
- Simulation support
- This function is mandatory for hardcopy drivers and must be implemented in order to have a valid OS/2 hardcopy driver. For other drivers, it is simulated by a handling routine in the graphics engine.
Syntax
GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction);
Parameters
- hdc (HDC) - input
- Device context handle.
- lEscape (LONG) - input
- DEVESC_RAWDATA escape code.
- cInCount (LONG) - input
- Number of bytes pointed to by pInData.
- pInData (PBYTE) - input
- Pointer to raw data.
- pcOutCount (PLONG) - input
- The handling routine ignores this parameter.
- pOutData (PLONG) - input
- The handling routine ignores this parameter.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreEscape.
Returns
- rc (LONG) - returns
- Return Code.
- The handling routine returns:
- DEV_OK
- Successful
- DEVESC_NOTIMPLEMENTED
- Escape not implemented for specified code
- DEVESC_ERROR
- Error
Remarks
The action taken by the handling routine is determined by the DC type. For example, an OD_DIRECT DC would send the raw data directly to the device using the PrtXXX APIs. See File System Emulation.
This escape code is metafiled and recorded.
As a general rule, an application should use DEVESC_RAWDATA only for a complete document or frame within a document. DEVESC_RAWDATA must not be mixed with other drawing functions. If DEVESC_RAWDATA and other drawing functions are called in a single frame, the results are dependent on the implementation. For example, the presentation driver might choose to print the raw data and ignore the other drawing calls.
Note: For an OD_QUEUED device with PM_Q_STD data, the spooler records this call in the buffer, but does not pass it on to the presentation driver.
Source Code Sample
Declaration:
#define INCL_GRE_DEVICE #include <os2.h> HDC hdc; /* Device context handle. */ LONG lEscape; /* DEVESC_RAWDATA escape code. */ LONG cInCount; /* Number of bytes pointed to by pInData. */ PBYTE pInData; /* Pointer to raw data. */ PLONG pcOutCount; /* The handling routine ignores this parameter. */ PLONG pOutData; /* The handling routine ignores this parameter. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreEscape. */ LONG rc; /* Return Code. */ rc = GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction);