DevEscape - Example Code

This example uses DevEscape to access facilities of a device that would otherwise be unavailable through the normal Device API set. Here, a new page in a print job is started.

#define INCL_DEV        /* Device Function definitions  */
#include <os2.h>

LONG  lResult;          /* Error code or not implemented
                           warning code                         */
HDC   hdc;              /* Device-context handle                */
LONG  plOutCount;       /* length of output buffer(input),
                           number of bytes returned(output)     */
PBYTE pbOutData;        /* output buffer                        */

/* for the NEWFRAME, input and output buffers are not used,
   so set the buffer lengths to zero(0) and set the buffers to
   NULL */
plOutCount = 0;
pbOutData = NULL;

lResult = DevEscape(hdc, DEVESC_NEWFRAME, 0L, NULL, &plOutCount,
                    pbOutData);


[Back: DevEscape - Graphic Elements and Orders]
[Next: DevEscape - Topics]