Previous Next

NdisReadPciSlotInformation

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

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

Parameters

NdisAdapterHandle
Specifies the MiniportAdapterHandle passed to MiniportInitialize and to most other MiniportXxx functions.
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

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

Headers

Declared in Ndis.h. Include Ndis.h.

Comments

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 can run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL = PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisFreeMemory, NdisMMapIoSpace, NdisMQueryAdapterResources, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMSetAttributes, NdisMSetAttributesEx, NdisOpenConfiguration