// parallel.h
PPARALLEL_DESELECT_ROUTINE PparallelDeselectRoutine;
NTSTATUS PparallelDeselectRoutine(
[in] PVOID DeselectContext,
[in] PVOID DeselectCommand
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
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. The system-supplied function driver for parallel ports supplies this routine.
DeselectContext [in]Pointer to the device extension of a functional device object (FDO) that represents a parallel port.
DeselectCommand [in]Pointer to a PARALLEL_1284_COMMAND structure. The caller specifies the following members:
Specifies the 1284.3 device ID (zero or 1).
Specifies a bitwise OR of zero or more of the following flags:
| Value | Description |
|---|---|
| PAR_END_OF_CHAIN_DEVICE | Specifies an end-of-chain device. |
| PAR_HAVE_PORT_KEEP_PORT | Specifies that the port be kept allocated. |
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The device was deselected. |
| STATUS_INVALID_PARAMETER | The specified device ID is invalid. |
| STATUS_UNSUCCESSFUL | The system-supplied function driver for parallel ports could not deselect the device. |
typedef NTSTATUS (*PPARALLEL_DESELECT_ROUTINE)(
_In_ PVOID DeselectContext,
_In_ PVOID DeselectCommand
);
To obtain a pointer to the system-supplied PPARALLEL_DESELECT_ROUTINE callback, a kernel-mode driver uses an IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO request, which returns a PARALLEL_PNP_INFORMATION structure. The DeselectDevice member of the PARALLEL_PNP_INFORMATION structure is a pointer to this callback.
A kernel-mode driver can use an IOCTL_INTERNAL_DESELECT_DEVICE request or the PPARALLEL_CLEAR_CHIP_MODE callback to deselect a device on a parallel port represented by a parallel port. To deselect a device, a caller should have the parallel port allocated. If the caller does not set the PAR_HAVE_PORT_KEEP_PORT flag, the system-supplied function driver for parallel ports frees the parallel port after deselecting the device.
For more information, see Selecting and Deselecting an IEEE 1284 Device Attached to a ParallelPort.
IOCTL_INTERNAL_DESELECT_DEVICE