MINIPORT_DISABLE_INTERRUPT callback function (ndis.h)
NDIS can call a miniport driver's MiniportDisableInterruptEx handler to disable interrupts for diagnostic and troubleshooting purposes.
Syntax
MINIPORT_DISABLE_INTERRUPT MiniportDisableInterrupt;
void MiniportDisableInterrupt(
[in] NDIS_HANDLE MiniportInterruptContext
)
{...}
Parameters
[in] MiniportInterruptContext
A handle to a block of context information. The miniport driver supplied this handle in the MiniportInterruptContext parameter that the miniport driver passed to the NdisMRegisterInterruptEx function.
Return value
None
Remarks
A miniport driver must provide a MiniportDisableInterruptEx handler if the driver calls the NdisMRegisterInterruptEx function to register an interrupt.
Miniport drivers should disable and enable interrupts as explained in the MiniportInterrupt and MiniportInterruptDpc reference pages.
NDIS calls the
MiniportEnableInterruptEx and
MiniportDisableInterruptEx functions to enable and disable interrupts for diagnostic and
troubleshooting purposes. Typically,
MiniportEnableInterruptEx and
MiniportDisableInterruptEx access miniport driver resources that are shared by the
MiniportInterrupt function.
Therefore, NDIS calls these handlers at DIRQL.
Examples
To define a MiniportDisableInterruptEx function, you must first provide a function declaration that identifies the type of function you're defining. Windows provides a set of function types for drivers. Declaring a function using the function types helps Code Analysis for Drivers, Static Driver Verifier (SDV), and other verification tools find errors, and it's a requirement for writing drivers for the Windows operating system.For example, to define a MiniportDisableInterruptEx function that is named "MyDisableInterruptEx", use the MINIPORT_DISABLE_INTERRUPT type as shown in this code example:
MINIPORT_DISABLE_INTERRUPT MyDisableInterruptEx;
Then, implement your function as follows:
_Use_decl_annotations_
VOID
MyDisableInterruptEx(
NDIS_HANDLE MiniportInterruptContext
)
{...}
The MINIPORT_DISABLE_INTERRUPT function type is defined in the Ndis.h header file. To more accurately identify errors when you run the code analysis tools, be sure to add the Use_decl_annotations annotation to your function definition. The Use_decl_annotations annotation ensures that the annotations that are applied to the MINIPORT_DISABLE_INTERRUPT function type in the header file are used. For more information about the requirements for function declarations, see Declaring Functions by Using Function Role Types for NDIS Drivers.
For information about Use_decl_annotations, see Annotating Function Behavior.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported in NDIS 6.0 and later. |
Target Platform | Windows |
Header | ndis.h (include Ndis.h) |
IRQL | See Remarks section |