PPARALLEL_DESELECT_ROUTINE callback function (parallel.h)

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.

Syntax

PPARALLEL_DESELECT_ROUTINE PparallelDeselectRoutine;

NTSTATUS PparallelDeselectRoutine(
  [in] PVOID DeselectContext,
  [in] PVOID DeselectCommand
)
{...}

Parameters

[in] DeselectContext

Pointer to the device extension of a functional device object (FDO) that represents a parallel port.

[in] DeselectCommand

Pointer to a PARALLEL_1284_COMMAND structure. The caller specifies the following members:

ID

Specifies the 1284.3 device ID (zero or 1).

CommandFlags

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 value

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.

Remarks

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.

Requirements

Requirement Value
Target Platform Desktop
Header parallel.h (include Parallel.h)
IRQL <=DISPATCH_LEVEL

See also

IOCTL_INTERNAL_SELECT_DEVICE

PPARALLEL_TRY_SELECT_ROUTINE

IOCTL_INTERNAL_DESELECT_DEVICE

PARALLEL_PNP_INFORMATION