This function returns bus-specific PCI configuration information from the PCI configuration space for a device at a particular socket on the bus.
Header file: | Ndis.h |
Windows CE versions: | 2.0 and later |
ULONG NdisReadPciSlotInformation(
IN NDIS_HANDLE NdisAdapterHandle, IN ULONG SlotNumber,
IN ULONG Offset, IN PVOID Buffer, IN ULONG Length );
Returns how many bytes of configuration information it returned at Buffer.
This function helps a driver find an NIC that it supports on a PCI bus. When it does, the driver can call the NdisMPciAssignResources function to determine the bus-relative configuration parameters that it can use in subsequent calls to other NDIS configuration functions, such as NdisMRegisterInterrupt, NdisMMapIoSpace, and NdisMRegisterIoPortRange.
This function returns the same bus-relative PCI configuration information as NdisImmediateReadPciSlotInformation. However, callers of this function pass the MiniportAdapterHandle passed to the MiniportInitialize function, rather than the WrapperConfigurationContext handle.
The caller is responsible for releasing the memory at Buffer when the driver has consumed the configuration information with NdisFreeMemory.
Miniport drivers call this function from their MiniportInitialize functions.
A driver that calls this function can run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL PASSIVE_LEVEL.
NdisFreeMemory, NdisMMapIoSpace, NdisMPciAssignResources, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMSetAttributes, NdisMSetAttributesEx, NdisOpenConfiguration