PPARALLEL_QUERY_WAITERS_ROUTINE - NtDoc

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

PPARALLEL_QUERY_WAITERS_ROUTINE PparallelQueryWaitersRoutine;

ULONG PparallelQueryWaitersRoutine(
  [in] PVOID QueryAllocsContext
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

PPARALLEL_QUERY_WAITERS_ROUTINE callback

Description

The PPARALLEL_QUERY_WAITERS_ROUTINE-typed callback routine returns the number of IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE and IOCTL_INTERNAL_SELECT_DEVICE requests that are queued on the work queue of a parallel port. The system-supplied function driver for parallel ports supplies this routine.

Parameters

QueryAllocsContext [in]

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

Return value

The number of requests that are queued on the work queue of the parallel port.

Prototype

typedef ULONG (*PPARALLEL_QUERY_WAITERS_ROUTINE)(
  _In_ PVOID QueryAllocsContext
);

Remarks

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

A driver can use the PPARALLEL_QUERY_WAITERS_ROUTINE callback to adjust its use of the parallel port based on the number of other clients that are waiting for access to the parallel port. The system-supplied function driver for parallel ports queues only allocate and select requests.

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

See also

IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO

IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE

PPARALLEL_FREE_ROUTINE

IOCTL_INTERNAL_PARALLEL_PORT_FREE

PARALLEL_PORT_INFORMATION