Expand Minimize

IoConnectInterruptEx routine

The IoConnectInterruptEx routine registers an interrupt-handling routine for a device's interrupts.


NTSTATUS IoConnectInterruptEx(


Parameters [in, out]

Pointer to an IO_CONNECT_INTERRUPT_PARAMETERS structure that specifies the device and interrupt-handling routine. On return, IoConnectInterruptEx updates this structure to hold information about the device's interrupts.

Return value

The routine returns STATUS_SUCCESS on success, or the appropriate NTSTATUS error value on failure. Possible error values include:

Return codeDescription

The operation is invalid for the specified device. For example, Parameters->Version = CONNECT_LINE_BASED, and the system has assigned multiple interrupt messages to the device.


The caller specified an invalid parameter. This error occurs, for example, when the caller specified NULL for the device's device object.


The caller specified an invalid value for the Version member of the structure that Parameters points to. Parameters->Version must be one of CONNECT_LINE_BASED, CONNECT_MESSAGE_BASED, or CONNECT_FULLY_SPECIFIED.


The caller specified an invalid value for the tenth member of the structure that Parameters points to. This error occurs, for example, when Parameters->FullySpecified.ProcessorEnableMask does not have any bits set.


One of the arguments was not found. For example, the specified device has no interrupts, or the specified interrupt vector is not assigned to any device.



IoConnectInterruptEx can be used to register an interrupt-handling routine for both traditional line-based interrupts (such as that supported by the PCI bus), and the newer message-signaled interrupts (such as that supported by PCI versions 2.2 and 3.0).

Drivers register an InterruptService routine for line-based interrupts, and an InterruptMessageService routine for message-signaled interrupts. For more information about how to specify the members of Parameters in each case, see IO_CONNECT_INTERRUPT_PARAMETERS.

IoConnectInterruptEx updates the members of Parameters to provide information about the device's interrupts. For more information about the information provided by IoConnectInterruptEx, see IO_CONNECT_INTERRUPT_PARAMETERS.

Use IoDisconnectInterruptEx to unregister a routine registered with IoConnectInterruptEx.

The driver should not program its device to generate interrupts until it has connected its ISR. Thus, the ISR cannot fire before IoConnectInterruptEx returns. However, there are certain devices, such as buttons, that are not programmable. For those devices, the driver should be prepared to handle the ISR as soon as it calls IoConnectInterruptEx. The interrupt line may already be asserted when IoConnectInterruptEx is called and can fire immediately after the line is enabled at the interrupt controller, before the IoConnectInterruptEx call unwinds.

For more information about registering an interrupt-handling routine, see Registering an ISR.


Target platform



Available on Windows Vista and later versions of the Windows operating system. Drivers that must also work on Windows 2000, Windows XP, or Windows Server 2003 can instead link to Iointex.lib to use the routine.


Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)





DDI compliance rules


See also




Send comments about this topic to Microsoft

© 2015 Microsoft