NDIS miniport drivers call the NdisMRegisterInterruptEx function to register an interrupt.
NDIS_STATUS NdisMRegisterInterruptEx( NDIS_HANDLE MiniportAdapterHandle, NDIS_HANDLE MiniportInterruptContext, PNDIS_MINIPORT_INTERRUPT_CHARACTERISTICS MiniportInterruptCharacteristics, PNDIS_HANDLE NdisInterruptHandle );
The miniport adapter handle that NDIS passed to the MiniportInitializeEx function.
A pointer to a block of context information. The miniport driver allocates this memory to store information about the interrupt. NDIS passes the context information block in subsequent calls to other functions that are associated with the interrupt.
A pointer to an NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure that the miniport driver created. The driver initializes this structure with handler entry points and configuration parameters that define the interrupt characteristics.
A pointer to an NDIS handle. NDIS writes the handle for the newly created interrupt object to the address that the NdisInterruptHandle pointer specifies.
NdisMRegisterInterruptEx can return one of the following values:
||NDIS initialized the interrupt object and supplied a valid interrupt handle at NdisInterruptHandle . NDIS claimed hardware resources and set up the functions that it calls when an interrupt occurs.|
||NdisMRegisterInterruptEx failed due to insufficient resources.|
||The attempt to initialize the interrupt object failed for reasons other than those in the preceding list.|
A miniport driver must call NdisMRegisterInterruptEx from its MiniportInitializeEx function if it manages a NIC that generates interrupts.
MiniportInitializeEx must call the NdisMSetMiniportAttributes function before calling NdisMRegisterInterruptEx.
The miniport driver must specify entry points for the following interrupt service functions:MiniportDisableInterruptEx
If the NIC supports message-signaled interrupts (MSI), the miniport driver should specify entry points for the following MSI service functions:MiniportMessageInterruptDPC MiniportDisableMessageInterrupt MiniportEnableMessageInterrupt
If a driver specifies entry points for MSI, it must also specify entry points for the non-MSI interrupt service functions. Also, if NdisMRegisterInterruptEx returns NDIS_STATUS_SUCCESS, the driver must examine the value of the InterruptType member of the NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure to determine the type of interrupts NDIS granted. If NDIS cannot grant MSI support, it will grant support for line based interrupts.
When interrupts are enabled on the NIC, a driver's MiniportInterrupt(or MiniportMessageInterrupt) function can be called at any time after the driver calls NdisMRegisterInterruptEx, even before NdisMRegisterInterruptEx returns. Therefore, a driver should not call NdisMRegisterInterruptEx until it is ready to handle an interrupt.
Drivers call the NdisMDeregisterInterruptEx function to release resources that were previously allocated with NdisMRegisterInterruptEx.
|Minimum supported client||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Init_DeRegisterInterrupt, Init_RegisterInterrupt, Irql_Interrupt_Function, NdisMDeregisterInterruptEx|
See AlsoMiniportDisableMessageInterrupt MiniportEnableMessageInterrupt NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS