PPARALLEL_FREE_ROUTINE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// parallel.h

PPARALLEL_FREE_ROUTINE PparallelFreeRoutine;

VOID PparallelFreeRoutine(
  [in] PVOID FreeContext
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-parallel-pparallel_free_routine)

PPARALLEL_FREE_ROUTINE callback

Description

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

Parameters

FreeContext [in]

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

Prototype

typedef VOID (*PPARALLEL_FREE_ROUTINE)(
  _In_ PVOID FreeContext
);

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.

See also

IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO

PARALLEL_PORT_INFORMATION

PPARALLEL_TRY_ALLOCATE_ROUTINE

PPARALLEL_QUERY_WAITERS_ROUTINE