Previous Next

NdisMPciAssignResources

This function is obsolete for Windows XP and later. Windows XP supports this function for legacy drivers; however, the Windows XP DDK will not build an NDIS driver that calls this function. NDIS 5.1 driver must use NdisMQueryAdapterResources instead of NdisMPciAssignResources.

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.

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

Parameters

MiniportHandle
Specifies the MiniportAdapterHandle passed in to MiniportInitialize and to most other MiniportXxx functions.
SlotNumber
Reserved. NDIS ignores this parameter.
AssignedResources
Pointer 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.

Headers

Declared in Ndis.h. Include Ndis.h.

Comments

NdisMPciAssignResources claims a set of hardware resources in the registry for a miniport driver’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 2000 and later 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.

NDIS 5.1 miniport drivers must call NdisMQueryAdapterResources instead of NdisMPciAssignResources.

Callers of NdisMPciAssignResources run at IRQL = PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisImmediateReadPciSlotInformation, NdisMMapIoSpace, NdisMQueryAdapterResources, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisReadPciSlotInformation