HalGetInterruptVector

ULONG
    HalGetInterruptVector(

        IN INTERFACE_TYPE  InterfaceType,
        IN ULONG  BusNumber,
        IN ULONG  BusInterruptLevel,
        IN ULONG  BusInterruptVector,
        OUT PKIRQL  Irql,
        OUT PKAFFINITY  Affinity
        );

HalGetInterruptVector returns a mapped system interrupt vector, interrupt level, and processor affinity mask that device drivers must pass to IoConnectInterrupt.

Parameters

InterfaceType
Specifies the bus interface type, which can be one of the following: Internal, Isa, Eisa, MicroChannel,TurboChannel, or PCIBus. However, additional types of buses will be suported in future versions of Windows NT. The upper bound on the types of buses supported is always MaximumInterfaceType.
BusNumber
Specifies the zero-based and system-assigned bus number of the bus for systems with more than one bus of the same InterfaceType.
BusInterruptLevel
Specifies the bus-specific interrupt level.
BusInterruptVector
Specifies the bus-specific interrupt vector.
Irql
Points to a variable that is set to the bus-relative IRQL. On return, this is reset to the DIRQL for the mapped vector.
Affinity
Points to a variable that is set to the system-assigned affinity mask. This mask determines the set of processors on which the device can interrupt.

Return Value

HalGetInterruptVector returns the mapped system vector.

Comments

HalGetInterruptVector returns the system-assigned interrupt vector, system-assigned DIRQL, and processor affinity for the corresponding bus-relative interrupt level and/or vector of the device. Callers can obtain the input values for these parameters with HalGetBusData, HalGetBusDataByOffset, IoQueryDeviceDescription, IoAssignResources, or HalAssignSlotResources, by querying the device, or by using default values if they cannot get hardware configuration information by other means.

Each bit set in the returned processor affinity mask indicates a processor to which the interrupt can be dispatched.

A device driver calls IoConnectInterrupt to initialize and connect an interrupt object and to register its ISR. This call includes parameters for the mapped vector, Irql, and Affinity obtained from HalGetInterruptVector, along with the address of the ISR and additional interrupt information. The mapped system vector, Irql, and Affinity values that HalGetInterruptVector returns must be passed, unchanged, to IoConnectInterrupt.

Callers of HalGetInterruptVector must be running at IRQL PASSIVE_LEVEL.

See Also

HalAssignSlotResources, HalGetBusData, HalGetBusDataByOffset, IoAssignResources, IoQueryDeviceDescription, IoConnectInterrupt