## Presentation Device Driver Reference for OS/2

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

### SplPdWrite - Syntax

Description:

SplPdWrite is an API exported by port drivers. It is called by PrtWrite to send print job data to the device. If the BIDI software protocol being used requires print job data to have a wrapper around it (see BIDI_Q_SW(800Ch) in BIDI Command Structures and Command Flow), then the spooler will call the protocol converter's API, SplProtWrite. SplProtWrite will then call the port driver's SplPdWrite routine.

    #define INCL_SPL

    #define INCL_SPLBIDI

    #include <os2.h>

    HFILE    hDevice;     /*  Handle from SplPdOpen. */

    PVOID    pchData;     /*  Pointer to data buffer to write. */

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

    ULONG    pcbWritten;  /*  Pointer to count of bytes actually written to the device. */

    ULONG    rc;          /*  Return codes. */

    rc = SplPdWrite(hDevice, pchData, cbData,

           pcbWritten);