NdisMPciAssignResources function
Note NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.
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.
Syntax
NDIS_STATUS NdisMPciAssignResources(
_In_ NDIS_HANDLE MiniportHandle,
_In_ ULONG SlotNumber,
_Out_ PNDIS_RESOURCE_LIST *AssignedResources
);
Parameters
MiniportHandle [in]
Specifies the MiniportAdapterHandle passed in to MiniportInitialize and to most other MiniportXxx functions.SlotNumber [in]
Reserved. NDIS ignores this parameter.AssignedResources [out]
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.
Remarks
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.
Requirements
Target platform |
Universal |
Version |
Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP. Windows XP supports this function for legacy drivers. However, the Windows XP Driver Development Kit (DDK) will not build an NDIS driver that calls this function. NDIS 5.1 driver must use NdisMQueryAdapterResourcesinstead of NdisMPciAssignResources. |
Header |
Ndis.h (include Ndis.h) |
Library |
Ndis.lib |
IRQL |
PASSIVE_LEVEL |
See also
NdisImmediateReadPciSlotInformation