PPARALLEL_FREE_ROUTINE callback function (parallel.h)

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

Syntax

PPARALLEL_FREE_ROUTINE PparallelFreeRoutine;

void PparallelFreeRoutine(
  [in] PVOID FreeContext
)
{...}

Parameters

[in] FreeContext

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

Return value

None

Remarks

To obtain a pointer to the system-supplied PPARALLEL_FREE_ROUTINE callback, a kernel-mode driver uses an IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO request, which returns a PARALLEL_PORT_INFORMATION structure. The FreePort member of the PARALLEL_PORT_INFORMATION structure is a pointer to this callback.

The driver should allocate a parallel port before freeing it. A driver can use PPARALLEL_QUERY_WAITERS_ROUTINE to determine the number of clients that are waiting to allocate the parallel port, and PPARALLEL_TRY_ALLOCATE_ROUTINE to try to allocate the parallel port.

For more information, see Synchronizing the Use of a ParallelPort.

Requirements

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

See also

IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO

PARALLEL_PORT_INFORMATION

PPARALLEL_TRY_ALLOCATE_ROUTINE

PPARALLEL_QUERY_WAITERS_ROUTINE