Creating an Interrupt Object
[This topic applies to UMDF 1.x.]
A UMDF driver that handles a device's hardware interrupts must create a framework interrupt object for each interrupt that each device can support.
To create a framework interrupt object, your driver must initialize a WUDF_INTERRUPT_CONFIG structure and pass it to the IWDFDevice3::CreateInterrupt method. This method registers the following driver-supplied event callback functions:
Enables a hardware interrupt.
Disables a hardware interrupt.
The interrupt service routine (ISR) for the interrupt.
The worker routine for the interrupt.
The framework calls the driver's IDriverEntry::OnDeviceAdd callback function before the Plug and Play (PnP) manager has assigned system resources, such as interrupt vectors, to the device. After the PnP manager assigns resources, the framework stores interrupt resources in the device's interrupt object. (Drivers that don't support Plug and Play cannot use interrupt objects.)
Message-signaled interrupts (MSIs) are supported in Windows Vista and later versions of the operating system. To enable the operating system to support MSIs for your device, your driver's INF file must set some values in the registry. For information about how to set these values, see Enabling Message-Signaled Interrupts in the Registry.
If a device can support a certain number of MSI messages, the PnP manager will try to assign that number of messages to the device. If the PnP manager cannot assign all of the messages that the device can support, it will assign only one message to the device.
Your driver should create a framework interrupt object for each interrupt vector or MSI message that the device can support. If the PnP manager doesn't grant the device all of the interrupt resources that the device can support, the extra interrupt objects won't be used, and their callback functions won't be called.