// parallel.h
PPARALLEL_TRY_ALLOCATE_ROUTINE PparallelTryAllocateRoutine;
BOOLEAN PparallelTryAllocateRoutine(
[in] PVOID TryAllocateContext
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The PPARALLEL_TRY_ALLOCATE_ROUTINE-typed (ISR) callback routine attempts to allocate a parallel port at IRQL = DIRQL. The system-supplied function driver for parallel ports supplies this routine.
TryAllocateContext [in]Pointer to the device extension of a functional device object that represents a parallel port.
| Return code | Description |
|---|---|
| TRUE | The parallel port was allocated. |
| FALSE | The parallel port was not allocated. |
typedef BOOLEAN ParallelTryAllocateRoutine(
_In_ PVOID TryAllocateContext
);
A kernel-mode driver connects an interrupt service routine by using an IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT, which returns a PARALLEL_INTERRUPT_INFORMATION structure. This structure includes the TryAllocatePortAtInterruptLevel member, which is a pointer to the system-supplied PPARALLEL_TRY_ALLOCATE_ROUTINE (ISR) callback.
The PPARALLEL_TRY_ALLOCATE_ROUTINE (ISR) callback is nonblocking, does not queue an allocate request, and returns immediately.
A driver uses the PPARALLEL_TRY_ALLOCATE_ROUTINE (ISR) callback in conjunction with a driver-supplied ISR. If the driver does not have a parallel port allocated when the driver's ISR is called, the driver can use this callback.
For more information about allocating a parallel port in an ISR, see Connecting an Interrupt Service Routine to a ParallelPort.
Note The PPARALLEL_TRY_ALLOCATE_ROUTINE (ISR) callback is untested. Microsoft does not recommend using a client-supplied interrupt routine. The use of interrupts might cause system instability. By default, the IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT request is disabled.
IOCTL_INTERNAL_PARALLEL_DISCONNECT_INTERRUPT
IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO
IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE
IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT
IOCTL_INTERNAL_PARALLEL_PORT_FREE
PARALLEL_INTERRUPT_INFORMATION