PPARALLEL_TRY_ALLOCATE_ROUTINE callback function (parallel.h)
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.
Syntax
PPARALLEL_TRY_ALLOCATE_ROUTINE PparallelTryAllocateRoutine;
BOOLEAN PparallelTryAllocateRoutine(
[in] PVOID TryAllocateContext
)
{...}
Parameters
[in] TryAllocateContext
Pointer to the device extension of a functional device object that represents a parallel port.
Return value
Return code | Description |
---|---|
|
The parallel port was allocated. |
|
The parallel port was not allocated. |
Remarks
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.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | parallel.h (include Parallel.h) |
IRQL | DIRQL |
See also
IOCTL_INTERNAL_PARALLEL_DISCONNECT_INTERRUPT
IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO
IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE
IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT