NdisMPciAssignResources

NDIS_STATUS
   NdisMPciAssignResources(
       IN NDIS_HANDLE
MiniportHandle,
       IN ULONG SlotNumber,
       OUT PNDIS_RESOURCE_LIST *AssignedResources
       );

NdisMPciAssignResources returns a list of bus-relative hardware resources, such as IRQ, I/O ports, and device memory ranges, claimed in the registry for a PCI NIC.

Parameters

MiniportHandle

Specifies the MiniportAdapterHandle passed in to MiniportInitialize and to most other MiniportXxx functions.

SlotNumber

Specifies the slot number of the driver’s NIC on the PCI bus.

AssignedResources

Points to a caller-supplied variable in which this function returns a pointer to a list of the hardware resources the NIC can use.

Return Value

NdisMPciAssignResources returns NDIS_STATUS_SUCCESS.

Comments

NdisMPciAssignResources claims a set of hardware resources in the registry for a miniport’s PCI NIC to use, thereby preventing conflicting claims on the same resources from other devices in the machine.

The buffer specified at AssignedResources is formatted as an NDIS_RESOURCE_LIST, which is equivalent to the CM_PARTIAL_RESOURCE_LIST on Windows NT platforms. See the Kernel-Mode Driver Reference for details of this structure.

The bus-relative configuration parameters returned in this buffer can be used in the MiniportInitialize function’s subsequent calls to NdisXxx functions such as NdisMRegisterInterrupt, NdisMMapIoSpace, and/or NdisMRegisterIoPortRange.

Callers of NdisMPciAssignResources run at IRQL PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisImmediateReadPciSlotInformation, NdisMMapIoSpace, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisReadPciSlotInformation