注册 ISR

驱动程序使用 IoConnectInterruptEx 例程为中断注册 ISR。 IoConnectInterruptEx 是 Windows Vista 和更高版本的操作系统的一部分。 IoConnectInterruptEx 采用单个 Parameters 参数,该参数是指向 IO_CONNECT_INTERRUPT_PARAMETERS 结构的指针。 对于 Windows Server 2003、Windows XP 和 Windows 2000,驱动程序可以使用 Windows 驱动程序工具包 (WDK) 中包含的 Iointex.lib 库。

在 Windows Vista 及更高版本上, IoConnectInterruptEx 提供了几种用于注册 ISR 的不同方法。 为 Parameters-Version> 指定的值确定方法,如下所示:

在 Windows Vista 之前的操作系统上,只能使用 CONNECT_FULLY_SPECIFIED。 如果指定CONNECT_LINE_BASED或CONNECT_MESSAGE_BASED, IoConnectInterruptEx 将返回错误。 可以使用此行为来确定是在 Windows Vista 还是早期系统上运行。 有关详细信息,请参阅 在 Windows Vista 之前使用 IoConnectInterruptEx