NdisPciAssignResources

NDIS_STATUS
NdisPciAssignResources(
IN NDIS_HANDLE NdisMacHandle,
IN NDIS_HANDLE NdisWrapperHandle,
IN NDIS_HANDLE WrapperConfigurationContext,
IN ULONG SlotNumber,
OUT PNDIS_RESOURCE_LIST * AssignedResources
);

NdisPciAssignResources returns a list of bus-relative hardware resources (such as an IRQ, I/O ports, device memory ranges) that the PCI NIC is using.

NdisMacHandle

The handle that the NDIS interface library associates with the NIC driver. This handle is a parameter returned by NdisRegisterMac.

NdisWrapperHandle

Specifies the handle associated with the NDIS interface library. For full-NIC drivers, this handle is passed to the caller's MacAddAdapter function.

WrapperConfigurationContext

The handle passed to the caller's MacAddAdapter function.

SlotNumber

The slot number of the caller's PCI device.

AssignedResources

Points to a caller-supplied buffer in which this function returns a list of resources owned by the PCI device.

Return Value

NdisPciAssignResources returns STATUS_SUCCESS if it claimed a set of hardware resources for the caller in the registry.

Comments

Drivers of PCI devices call NdisPciAssignResources during initialization to claim hardware resources in the configuration registry.

The resource list returned by NdisPciAssignResources has been configured so that the resources used by the caller's NIC do not conflict with other devices on the PCI bus nor in the system. A driver uses this list to make subsequent calls to other NDIS initialization functions, such as NdisInitializeInterrupt and NdisMapIoSpace.

Callers of NdisPciAssignResources run at IRQL PASSIVE_LEVEL.

See Also

MacAddAdapter, NdisInitializeInterrupt, NdisMapIoSpace, NdisRegisterMac.