NdisMPciAssignResources

This function 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.

At a Glance

Header file: Ndis.h
Windows CE versions: 2.0 and later

Syntax

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

Parameters

MiniportHandle
Specifies the MiniportAdapterHandle passed in to the MiniportInitialize function and to most other MiniportXXX functions.
SlotNumber
Specifies the slot number of the driver’s NIC on the PCI bus.
AssignedResources
Pointer to a list of the hardware resources the NIC can use.

Return Values

Returns NDIS_STATUS_SUCCESS.

Remarks

This function claims a set of hardware resources in the registry for a miniport’s PCI NIC to use, thus 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 structure, which is equivalent to the CM_PARTIAL_RESOURCE_LIST structure on Windows NT platforms.

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.

A driver that calls this function runs at IRQL PASSIVE_LEVEL.

See Also

NdisMMapIoSpace, NdisReadPciSlotInformation