Parallel Ports

Overview of the Parallel Ports technology.

To develop Parallel Ports, you need these headers:

For the programming guide, see Parallel Ports.

I/O control codes

Title Description
IOCTL_IEEE1284_GET_MODE IOCTL The IOCTL_IEEE1284_GET_MODE request returns the IEEE 1284 read and write protocols that are currently set for a parallel device.
IOCTL_IEEE1284_NEGOTIATE IOCTL The IOCTL_IEEE1284_NEGOTIATE request sets the read and write protocols that are used for a parallel device.
IOCTL_INTERNAL_DESELECT_DEVICE IOCTL The IOCTL_INTERNAL_DESELECT_DEVICE request deselects an IEEE 1284.3 daisy-chain device or an IEEE 1284 end-of-chain device attached to a parallel port.
IOCTL_INTERNAL_DISCONNECT_IDLE IOCTL The IOCTL_INTERNAL_DISCONNECT_IDLE request disconnects the IEEE 1284 operating modes that are set for a parallel device.
IOCTL_INTERNAL_GET_MORE_PARALLEL_PORT_INFO IOCTL The IOCTL_INTERNAL_GET_MORE_PARALLEL_PORT_INFO request returns information about a parallel port.
IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO IOCTL The IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO request returns Plug and Play information about a parallel port.
IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO IOCTL The IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO request returns information about a parallel port.
IOCTL_INTERNAL_INIT_1284_3_BUS IOCTL The IOCTL_INTERNAL_INIT_1284_3_BUS request initializes and assigns an IEEE 1284.3 device ID to all the 1284.3 daisy chain devices that are attached to a parallel port.
IOCTL_INTERNAL_LOCK_PORT IOCTL The IOCTL_INTERNAL_LOCK_PORT request allocates the parallel device's parent parallel port and selects the parallel device on the port.
IOCTL_INTERNAL_LOCK_PORT_NO_SELECT IOCTL The IOCTL_INTERNAL_LOCK_PORT_NO_SELECT request allocates the parallel device's parent parallel port, but does not select the parallel device.
IOCTL_INTERNAL_PARALLEL_CLEAR_CHIP_MODE IOCTL The IOCTL_INTERNAL_PARALLEL_CLEAR_CHIP_MODE request clears the operating mode of a parallel port.
IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT IOCTL The IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT request connects an optional interrupt service routine and an optional deferred port check routine to a parallel port.
IOCTL_INTERNAL_PARALLEL_DISCONNECT_INTERRUPT IOCTL The IOCTL_INTERNAL_PARALLEL_DISCONNECT_INTERRUPT request disconnects an interrupt service routine (and an optional deferred port check service routine) that was connected by using an IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT request.
IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE IOCTL The IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE request allocates a parallel port for exclusive access by a client.
IOCTL_INTERNAL_PARALLEL_PORT_FREE IOCTL The IOCTL_INTERNAL_PARALLEL_PORT_FREE request frees a parallel port.
IOCTL_INTERNAL_PARALLEL_SET_CHIP_MODE IOCTL The IOCTL_INTERNAL_PARALLEL_SET_CHIP_MODE request sets the operating mode of a parallel port.
IOCTL_INTERNAL_PARCLASS_CONNECT IOCTL The IOCTL_INTERNAL_PARCLASS_CONNECT request returns information about a parallel port and the callback routines that the system-supplied bus driver for parallel ports provides to operate the parallel port.
IOCTL_INTERNAL_PARCLASS_DISCONNECT IOCTL The IOCTL_INTERNAL_PARCLASS_DISCONNECT request disconnects a client from a parallel device.
IOCTL_INTERNAL_RELEASE_PARALLEL_PORT_INFO IOCTL The IOCTL_INTERNAL_RELEASE_PARALLEL_PORT_INFO request returns STATUS_SUCCESS.
IOCTL_INTERNAL_SELECT_DEVICE IOCTL The IOCTL_INTERNAL_SELECT_DEVICE request
IOCTL_INTERNAL_UNLOCK_PORT IOCTL The IOCTL_INTERNAL_UNLOCK_PORT request deselects a parallel device and frees the parallel device's parent parallel port.
IOCTL_INTERNAL_UNLOCK_PORT_NO_DESELECT IOCTL The IOCTL_INTERNAL_UNLOCK_PORT_NO_DESELECT request frees a parallel device's parent parallel port.
IOCTL_PAR_GET_DEFAULT_MODES IOCTL The IOCTL_PAR_GET_DEFAULT_MODES request returns the default write (forward) and read (reverse) IEEE 1284 protocols that the system-supplied bus driver for parallel ports uses.
IOCTL_PAR_GET_DEVICE_CAPS IOCTL The IOCTL_PAR_GET_DEVICE_CAPS request does the following
IOCTL_PAR_IS_PORT_FREE IOCTL The IOCTL_PAR_IS_PORT_FREE request determines if a parallel device's parent parallel port is free at the time the system-supplied bus driver for parallel ports processes the request.
IOCTL_PAR_QUERY_DEVICE_ID IOCTL The IOCTL_PAR_QUERY_DEVICE_ID request returns the IEEE 1284 device ID of a parallel device assigned by the system-supplied function driver for parallel ports.
IOCTL_PAR_QUERY_DEVICE_ID_SIZE IOCTL The IOCTL_PAR_QUERY_DEVICE_ID_SIZE request returns the size, in bytes, of a buffer that can hold a device's IEEE 1284 device ID and a NULL terminator.
IOCTL_PAR_QUERY_INFORMATION IOCTL The IOCTL_PAR_QUERY_INFORMATION request returns the status of an IEEE 1284 end-of-chain device.
IOCTL_PAR_QUERY_LOCATION IOCTL The IOCTL_PAR_QUERY_LOCATION request returns the "LPTn" or "LPTn.m" symbolic link name associated with a parallel device.
IOCTL_PAR_QUERY_RAW_DEVICE_ID IOCTL The IOCTL_PAR_QUERY_RAW_DEVICE_ID request returns a raw device ID, which includes the following
IOCTL_PAR_SET_INFORMATION IOCTL The IOCTL_PAR_SET_INFORMATION request resets and initializes a parallel device.
IOCTL_PAR_SET_READ_ADDRESS IOCTL The IOCTL_PAR_SET_READ_ADDRESS request sets an extended capabilities port (ECP) or enhanced parallel port (EPP) read address (channel) for a parallel device.
IOCTL_PAR_SET_WRITE_ADDRESS IOCTL The IOCTL_PAR_SET_WRITE_ADDRESS request sets an extended capabilities port (ECP) or enhanced parallel port (EPP) write address (channel) for a parallel device. The parallel port bus driver queues this request on a work queue for the parallel device.

IOCTLs

 
IOCTL_IEEE1284_GET_MODE

The IOCTL_IEEE1284_GET_MODE request returns the IEEE 1284 read and write protocols that are currently set for a parallel device.
IOCTL_IEEE1284_NEGOTIATE

The IOCTL_IEEE1284_NEGOTIATE request sets the read and write protocols that are used for a parallel device.
IOCTL_INTERNAL_DESELECT_DEVICE

The IOCTL_INTERNAL_DESELECT_DEVICE request deselects an IEEE 1284.3 daisy-chain device or an IEEE 1284 end-of-chain device attached to a parallel port.
IOCTL_INTERNAL_DISCONNECT_IDLE

The IOCTL_INTERNAL_DISCONNECT_IDLE request disconnects the IEEE 1284 operating modes that are set for a parallel device.
IOCTL_INTERNAL_GET_MORE_PARALLEL_PORT_INFO

The IOCTL_INTERNAL_GET_MORE_PARALLEL_PORT_INFO request returns information about a parallel port.
IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO

The IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO request returns Plug and Play information about a parallel port.
IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO

The IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO request returns information about a parallel port.
IOCTL_INTERNAL_INIT_1284_3_BUS

The IOCTL_INTERNAL_INIT_1284_3_BUS request initializes and assigns an IEEE 1284.3 device ID to all the 1284.3 daisy chain devices that are attached to a parallel port.
IOCTL_INTERNAL_LOCK_PORT

The IOCTL_INTERNAL_LOCK_PORT request allocates the parallel device's parent parallel port and selects the parallel device on the port.
IOCTL_INTERNAL_LOCK_PORT_NO_SELECT

The IOCTL_INTERNAL_LOCK_PORT_NO_SELECT request allocates the parallel device's parent parallel port, but does not select the parallel device.
IOCTL_INTERNAL_PARALLEL_CLEAR_CHIP_MODE

The IOCTL_INTERNAL_PARALLEL_CLEAR_CHIP_MODE request clears the operating mode of a parallel port.
IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT

The IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT request connects an optional interrupt service routine and an optional deferred port check routine to a parallel port.
IOCTL_INTERNAL_PARALLEL_DISCONNECT_INTERRUPT

The IOCTL_INTERNAL_PARALLEL_DISCONNECT_INTERRUPT request disconnects an interrupt service routine (and an optional deferred port check service routine) that was connected by using an IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT request.
IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE

The IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE request allocates a parallel port for exclusive access by a client.
IOCTL_INTERNAL_PARALLEL_PORT_FREE

The IOCTL_INTERNAL_PARALLEL_PORT_FREE request frees a parallel port.
IOCTL_INTERNAL_PARALLEL_SET_CHIP_MODE

The IOCTL_INTERNAL_PARALLEL_SET_CHIP_MODE request sets the operating mode of a parallel port.
IOCTL_INTERNAL_PARCLASS_CONNECT

The IOCTL_INTERNAL_PARCLASS_CONNECT request returns information about a parallel port and the callback routines that the system-supplied bus driver for parallel ports provides to operate the parallel port.
IOCTL_INTERNAL_PARCLASS_DISCONNECT

The IOCTL_INTERNAL_PARCLASS_DISCONNECT request disconnects a client from a parallel device.
IOCTL_INTERNAL_RELEASE_PARALLEL_PORT_INFO

The IOCTL_INTERNAL_RELEASE_PARALLEL_PORT_INFO request returns STATUS_SUCCESS.
IOCTL_INTERNAL_SELECT_DEVICE

The IOCTL_INTERNAL_SELECT_DEVICE request:Allocates the parallel portThe system-supplied function driver for parallel ports allocates the parallel port if the client does not set the PAR_HAVE_PORT_KEEP_PORT flag in the CommandFlags member of the input PARALLEL_1284_COMMAND structure. Otherwise, the parallel port function driver does not allocate the parallel port.Selects an IEEE 1284.3 daisy chain parallel device or an end-of-chain device attached to the parallel portAlthough a client can select an end-of-chain device using a select device request, Microsoft recommends using an IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE request instead. The parallel port function driver selects the end-of-chain device before it allocates the parallel port to a client.
IOCTL_INTERNAL_UNLOCK_PORT

The IOCTL_INTERNAL_UNLOCK_PORT request deselects a parallel device and frees the parallel device's parent parallel port.
IOCTL_INTERNAL_UNLOCK_PORT_NO_DESELECT

The IOCTL_INTERNAL_UNLOCK_PORT_NO_DESELECT request frees a parallel device's parent parallel port.
IOCTL_PAR_GET_DEFAULT_MODES

The IOCTL_PAR_GET_DEFAULT_MODES request returns the default write (forward) and read (reverse) IEEE 1284 protocols that the system-supplied bus driver for parallel ports uses.
IOCTL_PAR_GET_DEVICE_CAPS

The IOCTL_PAR_GET_DEVICE_CAPS request does the following:Specifies the protocols that the system-supplied bus driver for parallel ports must not use with a parallel deviceReturns the operating protocols that the parallel device supportsFor more information, see Setting and Clearing a Communication Mode for a Parallel Device.
IOCTL_PAR_IS_PORT_FREE

The IOCTL_PAR_IS_PORT_FREE request determines if a parallel device's parent parallel port is free at the time the system-supplied bus driver for parallel ports processes the request.
IOCTL_PAR_QUERY_DEVICE_ID

The IOCTL_PAR_QUERY_DEVICE_ID request returns the IEEE 1284 device ID of a parallel device assigned by the system-supplied function driver for parallel ports.
IOCTL_PAR_QUERY_DEVICE_ID_SIZE

The IOCTL_PAR_QUERY_DEVICE_ID_SIZE request returns the size, in bytes, of a buffer that can hold a device's IEEE 1284 device ID and a NULL terminator.
IOCTL_PAR_QUERY_INFORMATION

The IOCTL_PAR_QUERY_INFORMATION request returns the status of an IEEE 1284 end-of-chain device.
IOCTL_PAR_QUERY_LOCATION

The IOCTL_PAR_QUERY_LOCATION request returns the "LPTn" or "LPTn.m" symbolic link name associated with a parallel device.
IOCTL_PAR_QUERY_RAW_DEVICE_ID

The IOCTL_PAR_QUERY_RAW_DEVICE_ID request returns a raw device ID, which includes the following:_a two-byte prefix that specifies the size, in bytes, of the device's IEEE 1284 device ID; the IEEE 1284 device ID; and a NULL terminator.
IOCTL_PAR_SET_INFORMATION

The IOCTL_PAR_SET_INFORMATION request resets and initializes a parallel device.
IOCTL_PAR_SET_READ_ADDRESS

The IOCTL_PAR_SET_READ_ADDRESS request sets an extended capabilities port (ECP) or enhanced parallel port (EPP) read address (channel) for a parallel device.
IOCTL_PAR_SET_WRITE_ADDRESS

The IOCTL_PAR_SET_WRITE_ADDRESS request sets an extended capabilities port (ECP) or enhanced parallel port (EPP) write address (channel) for a parallel device. The parallel port bus driver queues this request on a work queue for the parallel device.

Functions

 
PDETERMINE_IEEE_MODES

The PDETERMINE_IEEE_MODES-typed callback routine determines which IEEE 1284 protocols a parallel device supports. The system-supplied bus driver for parallel ports supplies this routine.
PNEGOTIATE_IEEE_MODE

The PNEGOTIATE_IEEE_MODE-typed callback routine selects the fastest forward and reverse protocols that the system-supplied bus driver for parallel ports supports from among those specified by the caller.
PPARALLEL_CLEAR_CHIP_MODE

The PPARALLEL_CLEAR_CHIP_MODE-typed callback routine clears the operating mode of a parallel port by resetting the communication mode of the host chipset to IEEE 1284-compatibility mode.
PPARALLEL_DESELECT_ROUTINE

The PPARALLEL_DESELECT_ROUTINE-typed callback routine deselects either an IEEE 1284.3 daisy chain device or an IEEE 1284 end-of-chain device that is attached to a parallel port.
PPARALLEL_FREE_ROUTINE

The PPARALLEL_FREE_ROUTINE-typed callback routine frees a parallel port. The system-supplied function driver for parallel ports supplies this routine.
PPARALLEL_IEEE_FWD_TO_REV

The PPARALLEL_IEEE_FWD_TO_REV-typed callback routine changes the transfer mode from forward to reverse. The system-supplied bus driver for parallel ports supplies this routine.
PPARALLEL_IEEE_REV_TO_FWD

The PPARALLEL_IEEE_REV_TO_FWD-typed callback routine changes the transfer mode from reverse to forward. The system-supplied bus driver for parallel ports supplies this routine.
PPARALLEL_QUERY_WAITERS_ROUTINE

The PPARALLEL_QUERY_WAITERS_ROUTINE-typed callback routine returns the number of IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE and IOCTL_INTERNAL_SELECT_DEVICE requests that are queued on the work queue of a parallel port.
PPARALLEL_READ

The PPARALLEL_READ-typed callback routine reads data from a parallel device. The system-supplied bus driver for parallel ports supplies this routine.
PPARALLEL_SET_CHIP_MODE

The PPARALLEL_SET_CHIP_MODE-typed callback routine sets the operating mode of a parallel port. The system-supplied function driver for parallel ports supplies this routine.
PPARALLEL_TRY_ALLOCATE_ROUTINE

The PPARALLEL_TRY_ALLOCATE_ROUTINE-typed (ISR) callback routine attempts to allocate a parallel port at IRQL = DIRQL. The system-supplied function driver for parallel ports supplies this routine.
PPARALLEL_TRY_SELECT_ROUTINE

The PPARALLEL_TRY_SELECT_ROUTINE-typed callback routine selects an IEEE 1284.3 daisy chain device or an IEEE 1284 end-of-chain device that is attached to a parallel port. The system-supplied function driver for parallel ports supplies this routine.
PPARALLEL_WRITE

The PPARALLEL_WRITE-typed callback routine writes data to a parallel device. The system-supplied bus driver for parallel ports supplies this routine.
PTERMINATE_IEEE_MODE

The PTERMINATE_IEEE_MODE-typed callback routine terminates the current IEEE operating mode and sets the mode to IEEE 1284-compatible. The system-supplied bus driver for parallel ports supplies this routine.

Structures

 
MORE_PARALLEL_PORT_INFORMATION

The MORE_PARALLEL_PORT_INFORMATION structure specifies information about the system interface that supports the operation of a parallel port.
PAR_DEVICE_ID_SIZE_INFORMATION

The PAR_DEVICE_ID_SIZE_INFORMATION structure specifies the size, in bytes, of a buffer that can hold the IEEE 1284 device ID of a parallel device and a NULL terminator.
PAR_QUERY_INFORMATION

The PAR_QUERY_INFORMATION structure specifies the operating status of a parallel port.
PAR_SET_INFORMATION

The PAR_SET_INFORMATION structure specifies the initial operating status of a parallel port.
PARALLEL_1284_COMMAND

The PARALLEL_1284_COMMAND structure specifies information that a client uses to select and deselect an IEEE 1284.3 daisy-chain device or an IEEE 1284 end-of-chain device.
PARALLEL_CHIP_MODE

The PARALLEL_CHIP_MODE structure specifies the operating mode of a parallel port.
PARALLEL_INTERRUPT_INFORMATION

The PARALLEL_INTERRUPT_INFORMATION structure specifies information that a kernel-mode driver can use in the context of an ISR that the driver connects to a parallel port.
PARALLEL_INTERRUPT_SERVICE_ROUTINE

The PARALLEL_INTERRUPT_SERVICE_ROUTINE structure specifies interrupt services that a kernel-mode driver can connect to the operation of a parallel port.
PARALLEL_PNP_INFORMATION

The PARALLEL_PNP_INFORMATION structure specifies information about the capabilities of a parallel port.
PARALLEL_PORT_INFORMATION

The PARALLEL_PORT_INFORMATION structure specifies information about the resources assigned to a parallel port, the capabilities of the parallel port, and pointers to callback routines that a kernel-mode driver can use to operate the parallel port.
PARCLASS_INFORMATION

The PARCLASS_INFORMATION structure specifies information about a parallel port, pointers to callback routines to operate a parallel port, and pointers to callback routines to read and write to a parallel device.
PARCLASS_NEGOTIATION_MASK

The PARCLASS_NEGOTIATION_MASK structure specifies the read and write protocols that a driver selects for a parallel device.