// parallel.h
PPARALLEL_QUERY_WAITERS_ROUTINE PparallelQueryWaitersRoutine;
ULONG PparallelQueryWaitersRoutine(
[in] PVOID QueryAllocsContext
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
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.
QueryAllocsContext [in]Pointer to the device extension of a functional device object (FDO) that represents a parallel port.
The number of requests that are queued on the work queue of the parallel port.
typedef ULONG (*PPARALLEL_QUERY_WAITERS_ROUTINE)(
_In_ PVOID QueryAllocsContext
);
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.
IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO
IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE
IOCTL_INTERNAL_PARALLEL_PORT_FREE