NTSTATUS
SoundConnectInterrupt(
IN ULONG InterruptNumber,
IN INTERFACE_TYPE BusType,
IN ULONG BusNumber,
IN PKSERVICE_ROUTINE Isr,
IN PVOID ServiceContext,
IN KINTERRUPT_MODE InterruptMode,
IN BOOLEAN ShareVector,
OUT PKINTERRUPT *Interrupt
);
The SoundConnectInterrupt function creates an interrupt object and installs an interrupt handler.
typedef BOOLEAN (*PKSERVICE_ROUTINE) ( IN struct _KINTERRUPT *Interrupt, IN PVOID ServiceContext );
Returns one of the following values.
Value |
Definition |
STATUS_SUCCESS |
Operation succeeded. |
STATUS_DEVICE_CONFIGURATION_ERROR |
Improper input parameter. |
STATUS_INSUFFICIENT_RESOURCES |
Insufficient system resources. |
Interrupt objects are of type _KINTERRUPT. These are a system-defined type that your driver doesn’t reference directly. Save the interrupt object pointer received in Interrupt, because it must be passed as input to KeSynchronizeExecution.
The ISR is responsible for clearing device interrupts. The HAL handles controller interrupts. After interrupts are cleared, the ISR should call IoRequestDPC to queue a deferred procedure call to the DPC function pointed to by the DeferredRoutine member of the SOUND_DEVICE_INIT structure. The DPC function should finish processing the interrupt.
Prior to being unloaded, the driver must release the interrupt objects by calling IoDisconnectInterrupt.
For discussions of interrupt objects and deferred procedure calls, see the Kernel-Mode Drivers Design Guide.