PPARALLEL_QUERY_WAITERS_ROUTINE callback function (parallel.h)
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.
Syntax
PPARALLEL_QUERY_WAITERS_ROUTINE PparallelQueryWaitersRoutine;
ULONG PparallelQueryWaitersRoutine(
[in] PVOID QueryAllocsContext
)
{...}
Parameters
[in] QueryAllocsContext
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.
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.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | parallel.h (include Parallel.h) |
IRQL | <=DISPATCH_LEVEL |
See also
IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO
IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE