## Presentation Device Driver Reference for OS/2

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

### SplProtWrite - Parameters

hDevice (HFILE) - input Handle from SplPdOpen to pass to SplPdWrite.

pszDeviceName (PSZ) - input Device name.

Port name being written to.

pfnPdWrite (PFN) - input Address of port driver function SplPdWrite.

pfnBaseProtWrite (PFN) - input Base protocol converter address for ProtWrite routine.

This is NULL unless the protocol converter is an extension to the base protocol converter. If not NULL, the extension protocol converter can call the base converter at this address to let the base converter process the command.

pchData (PVOID) - input Pointer to the data buffer to write.

cbInData (ULONG) - input Length of information in pchData, in bytes.

pcbWritten (PULONG) - output Pointer to count of bytes actually written to the device.

This value can be updated even when an unsuccessful return code is given, if some of the data was sent to the printer.

rc (ULONG) - returns Return codes.

0 Success

Note: *pcbWritten is updated with the number of bytes sent to the printer. If all bytes were not written, it should be considered an error.

6(ERROR_INVALID_HANDLE) Invalid handle given.

28(ERROR_OUT_OF_PAPER) The printer is out of paper.

29(ERROR_WRITE_FAULT) Failure attempting to write to the device.

32(ERROR_SHARING_VIOLATION) Another thread has access to this port using this handle. This situation can occur if another thread is in the process of a PrtWrite using this Prt handle.

87(ERROR_INVALID_PARAMETER) An invalid buffer given.