NdisMRegisterInterruptEx function (ndis.h)

NDIS miniport drivers call the NdisMRegisterInterruptEx function to register an interrupt.

Syntax

NDIS_STATUS NdisMRegisterInterruptEx(
  [in]  NDIS_HANDLE                              MiniportAdapterHandle,
  [in]  NDIS_HANDLE                              MiniportInterruptContext,
  [in]  PNDIS_MINIPORT_INTERRUPT_CHARACTERISTICS MiniportInterruptCharacteristics,
  [out] PNDIS_HANDLE                             NdisInterruptHandle
);

Parameters

[in] MiniportAdapterHandle

The miniport adapter handle that NDIS passed to the MiniportInitializeEx function.

[in] MiniportInterruptContext

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.

[in] MiniportInterruptCharacteristics

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.

[out] NdisInterruptHandle

A pointer to an NDIS handle. NDIS writes the handle for the newly created interrupt object to the address that the NdisInterruptHandle pointer specifies.

Return value

NdisMRegisterInterruptEx can return one of the following values:

Return code Description
NDIS_STATUS_SUCCESS
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.
NDIS_STATUS_RESOURCES
NdisMRegisterInterruptEx failed due to insufficient resources.
NDIS_STATUS_XXX or NT_STATUS_XXX
The attempt to initialize the interrupt object failed for reasons other than those in the preceding list.

Remarks

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:

MiniportInterrupt

MiniportInterruptDPC

MiniportDisableInterruptEx

MiniportEnableInterruptEx

If the NIC supports message-signaled interrupts (MSI), the miniport driver should specify entry points for the following MSI service functions:

MiniportMessageInterrupt

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.

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
DDI compliance rules Init_DeRegisterInterrupt(ndis), Init_RegisterInterrupt(ndis), Irql_Interrupt_Function(ndis), NdisMDeregisterInterruptEx(ndis)

See also

MiniportDisableInterruptEx

MiniportDisableMessageInterrupt

MiniportEnableInterruptEx

MiniportEnableMessageInterrupt

MiniportInitializeEx

MiniportInterrupt

MiniportInterruptDPC

MiniportMessageInterrupt

MiniportMessageInterruptDPC

NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS

NdisMDeregisterInterruptEx

NdisMSetMiniportAttributes