Freigeben über


NdisReadPciSlotInformation (Compact 2013)

3/26/2014

This function returns bus-specific PCI configuration information from the PCI configuration space for a device at a particular socket on the bus.

Syntax

ULONG NdisReadPciSlotInformation(
  NDIS_HANDLE NdisAdapterHandle,
  ULONG SlotNumber,
  ULONG Offset,
  PVOID Buffer,
  ULONG Length
);

Parameters

  • NdisAdapterHandle
    [in] Specifies the MiniportAdapterHandle passed in to the MiniportInitialize function and to most other MiniportXXX functions.
  • SlotNumber
    [in] Reserved. NDIS ignores this parameter.
  • Offset
    [in] Specifies the byte offset within the PCI configuration space at which to begin transferring the configuration information.
  • Buffer
    [in] Points to a caller-allocated buffer in which to return the requested configuration information.
  • Length
    [in] Specifies the size, in bytes, of the buffer at Buffer and, therefore, how many bytes of configuration information to return.

Return Value

Returns how many bytes of configuration information it returned at Buffer.

Remarks

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 NDISconfiguration functions, such as NdisMRegisterInterrupt, NdisMMapIoSpace, and NdisMRegisterIoPortRange.

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.

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Functions
MiniportInitialize
NdisFreeMemory
NdisMMapIoSpace
NdisMPciAssignResources
NdisMRegisterInterrupt
NdisMRegisterIoPortRange
NdisMSetAttributes
NdisMSetAttributesEx
NdisOpenConfiguration