NdisReadPciSlotInformation 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.

NdisReadPciSlotInformation obtains bus-specific PCI configuration information from the PCI configuration space for a device.

Syntax

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

Parameters

  • NdisAdapterHandle [in]
    Specifies the MiniportAdapterHandle passed to MiniportInitialize 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 [out]
    Pointer 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

NdisReadPciSlotInformation returns how many bytes of configuration information it returned at Buffer.

Remarks

Miniport drivers call this function from their MiniportInitialize functions. When a driver has consumed the configuration information, it is responsible for releasing the memory at Buffer with NdisFreeMemory.

Callers of NdisReadPciSlotInformation must run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL = PASSIVE_LEVEL.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisMGetBusDatainstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL (See Remarks section)

See also

MiniportInitialize

NdisFreeMemory

NdisMMapIoSpace

NdisMQueryAdapterResources

NdisMRegisterInterrupt

NdisMRegisterIoPortRange

NdisMSetAttributes

NdisMSetAttributesEx

NdisOpenConfiguration

 

 

Send comments about this topic to Microsoft