Table of contents
Collapse the table of content
Expand the table of content

Porting Interrupt Registration to NDIS 6.0

Last Updated: 11/17/2016

NDIS 6.0 drivers do not call the NdisMRegisterInterrupt function. Instead, NDIS 6.0 drivers call the NdisMRegisterInterruptEx function and pass it a pointer to the NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure.

In NDIS 5.x, the miniport driver defines interrupt-related function entry points in the NDIS_MINIPORT_CHARACTERISTICS structure. NDIS 6.0 drivers define the entry points for these functions in the NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure.

An NDIS 6.0 miniport driver supplies the following interrupt-related functions.





The following code example shows how a miniport driver can initialize this structure.

        RtlZeroMemory(&Interrupt, sizeof(Interrupt));

        Interrupt.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_INTERRUPT;
        Interrupt.Header.Revision = NDIS_MINIPORT_INTERRUPT_REVISION_1;
        Interrupt.Header.Size = sizeof(NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS);

        Interrupt.InterruptHandler = MiniportInterrupt;
        Interrupt.InterruptDpcHandler = MiniportInterruptDpc;
        Interrupt.DisableInterruptHandler = MiniportDisableInterruptEx;
        Interrupt.EnableInterruptHandler = MiniportEnableInterruptEx;

        Status = NdisMRegisterInterruptEx(Adapter->AdapterHandle,
                                          &Adapter->NdisInterruptHandle );

The miniport driver passes a handle to NdisMRegisterInterruptEx in the MiniportInterruptContext member of the NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure. NDIS passes this handle to the driver's interrupt-related functions.

To deregister an interrupt, a miniport driver calls the NdisMDeregisterInterruptEx function instead of the NdisMDeregisterInterrupt function.

For more information about registering interrupts, see Registering and Deregistering Interrupts.

© 2017 Microsoft