## Presentation Device Driver Reference for OS/2

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

### SplPdOpen - Parameters

pszPortName (PSZ) - input Local port name.

Following is an example of a port name:

         LPT1

phDevice (PHFILE) - output Returned port-driver handle for the device.

pDeviceFlags (PULONG) - output Flag returns type of device being opened.

Values are as follows:

HANDTYPE_FILE 0x0000

HANDTYPE_DEVICE 0x0001

HANDTYPE_PIPE 0x0002

HANDTYPE_LPTDEVICE 0x0004

HANDTYPE_COMDEVICE 0x0008

HANDTYPE_NETWORK 0x8000

pPrtOpenStruct (PVOID) - input Pointer to a parameter structure that describes the job being sent to the print device.

Some fields may be derived from the DevOpenDC() parameter DEVOPENSTRUC. See Data Types for details on the PRTOPENSTRUCT0 data structure.

rc (ULONG) - returns Return codes.

0 Success

5(ERROR_ACCESS_DENIED) Not authorized to open printer port.

8(ERROR_NOT_ENOUGH_MEMORY) Not enough memory to satisfy request.

29(ERROR_WRITE_FAULT) Failure attempting to write to the device. This could happen if a BIDI_START_JOB bracket is sent during open time, and the print device does not accept the start job command.

87(ERROR_INVALID_PARAMETER) An invalid parameter was specified; most likely an invalid pointer was passed to PrtOpen.

99(ERROR_DEVICE_IN_USE) Device is in use by another application.

240(ERROR_VC_DISCONNECTED) Unable to connect to the remote printer.