NdisImmediateReadPciSlotInformation

ULONG
    NdisImmediateReadPciSlotInformation(
        IN NDIS_HANDLE
 WrapperConfigurationContext,
        IN ULONG SlotNumber,
        IN ULONG Offset,
        IN PVOID Buffer,
        IN ULONG Length
        );

NdisImmediateReadPciSlotInformation returns a specified range of PCI configuration information in a caller-supplied buffer.

Parameters

WrapperConfigurationContext
Specifies the handle passed to the caller’s MiniportInitialize function.
SlotNumber
Specifies the slot number of the NIC on the I/O bus.
Offset
Specifies the byte offset within the PCI configuration space at which to begin transferring the configuration information.
Buffer
Points to a caller-allocated buffer in which to return the requested configuration information.
Length
Specifies the size in bytes of the buffer at Buffer and, therefore, how many bytes of configuration information to return.

Return Value

NdisImmediateReadPciSlotInformation returns the number of bytes it wrote at Buffer. 

Comments

NdisImmediateReadPciSlotInformation helps a miniport driver find a NIC that it supports on a PCI bus, possibly before MiniportInitialize calls the Ndis..Configuration functions to get configuration information stored in the registry. This function cannot be called after the driver has claimed hardware resources in the registry for its NIC with NdisMPciAssignResources.

NdisImmediateReadPciSlotInformation returns the same bus-relative PCI configuration information as NdisReadPciSlotInformation. However, callers of NdisReadPciSlotInformation pass the adapter handle, rather than the WrapperConfigurationContext handle that is valid only during NIC driver initialization.

Callers of NdisImmediateReadPciSlotInformation can run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisMPciAssignResources, NdisOpenConfiguration, NdisReadPciSlotInformation