## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### SplPdAbortDoc - Syntax

Description:

SplPdAbortDoc is an API exported by port drivers. It is called by PrtAbort and PrtAbortDoc for document-abort processing. If FLG_COMPLETE_DATA is set, all prior data for this job is sent to the printer. If FLG_COMPLETE_DATA is not set, all current write requests for this job are flushed and then the buffer of data is sent to reset the printer.

FLG_COMPLETE_DATA is always set if the printer driver calls PrtAbort, because some older printer drivers send the reset sequence to the printer using PrtWrite, then call PrtAbort to abort the job. In this case, the printer driver relies on only PrtWrite returning after the data was sent to the printer.

    #define INCL_SPL

    #define INCL_SPLBIDI

    #include <os2.h>

    HFILE    hDevice;  /*  Handle from SplPdOpen. */

    PVOID    pchData;  /*  Pointer to data buffer to write after flushing all current write data. */

    ULONG    cbData;   /*  Length of data, in bytes. */

    ULONG    ulFlags;  /*  Abort processing flags. */

    ULONG    rc;       /*  Return codes. */

    rc = SplPdAbortDoc(hDevice, pchData, cbData,

           ulFlags);