Previous Next

NdisImmediateReadPciSlotInformation

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. Drivers should call NdisReadPciSlotInformation instead.

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

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

Parameters

WrapperConfigurationContext
Specifies the handle passed to the caller’s MiniportInitialize function.
SlotNumber
Reserved. NDIS ignores this parameter.
Offset
Specifies the byte offset within the PCI configuration space at which to begin transferring the configuration information.
Buffer
Pointer 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.

Headers

Declared in Ndis.h. Include Ndis.h.

Comments

NdisImmediateReadPciSlotInformation helps a miniport driver find a NIC that it supports on a PCI bus, possibly before MiniportInitialize calls the NdisXxxConfiguration 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 NdisQueryAdapterResources or 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, NdisMQueryAdapter Resources NdisOpenConfiguration, NdisReadPciSlotInformation