PPARALLEL_SET_CHIP_MODE callback function (parallel.h)

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.

Syntax

PPARALLEL_SET_CHIP_MODE PparallelSetChipMode;

NTSTATUS PparallelSetChipMode(
  [in] PVOID SetChipContext,
  [in] UCHAR ChipMode
)
{...}

Parameters

[in] SetChipContext

Pointer to the device extension of a parallel port's functional device object (FDO).

[in] ChipMode

Specifies the operating mode of a parallel port. (For more information about operating modes, see the modes that are defined for the enhanced capabilities register (ECR) in the parallel.h file that is included in the Microsoft Windows Driver Kit [WDK].)

Return value

Return code Description
STATUS_SUCCESS
The specified operating mode was set.
STATUS_INVALID_DEVICE_STATE
The mode is not cleared.
STATUS_NO_SUCH_DEVICE
The specified operating mode is not valid.

Remarks

To obtain a pointer to the system-supplied PPARALLEL_SET_CHIP_MODE callback, a kernel-mode driver uses an IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO request, which returns a PARALLEL_PNP_INFORMATION structure. The TrySetChipMode member of the PARALLEL_PNP_INFORMATION structure is a pointer to this callback.

A caller uses the PPARALLEL_SET_CHIP_MODE callback in conjunction with the PPARALLEL_CLEAR_CHIP_MODE callback.

To set a new mode, a caller must first clear the current mode.

For more information, see Setting and Clearing the Communication Mode on a ParallelPort.

Requirements

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

See also

IOCTL_INTERNAL_PARALLEL_SET_CHIP_MODE

IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO

PARALLEL_PNP_INFORMATION

IOCTL_INTERNAL_PARALLEL_CLEAR_CHIP_MODE

PPARALLEL_CLEAR_CHIP_MODE