Microsoft Windows CE 3.0  

NdisReadPciSlotInformation

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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

ULONG NdisReadPciSlotInformation(
IN NDIS_HANDLE
NdisAdapterHandle
,
IN ULONG
SlotNumber
,
IN ULONG
Offset
,
IN PVOID
Buffer
,
IN ULONG

Length
);

Parameters

NdisAdapterHandle
Specifies the MiniportAdapterHandlepassed in to the MiniportInitializefunction and to most other Miniport XXXfunctions.
SlotNumber
Specifies the slot number of an NIC on the I/O bus.
Offset
Specifies the byte offset within the PCI configuration space at which to begin transferring the configuration information.
Buffer
Points to a caller-allocated buffer in which to return the requested configuration information.
Length
Specifies the size, in bytes, of the buffer at Bufferand, therefore, how many bytes of configuration information to return.

Return Values

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 NdisMPciAssignResourcesfunction 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 MiniportAdapterHandlepassed to the MiniportInitializefunction, rather than the WrapperConfigurationContexthandle.

The caller is responsible for releasing the memory at Bufferwhen the driver has consumed the configuration information with NdisFreeMemory.

Miniport drivers call this function from their MiniportInitializefunctions.

A driver that calls this function can run at IRQL <= DISPATCH_LEVEL. Usually, callers are running at IRQL PASSIVE_LEVEL.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

NdisFreeMemory, NdisMMapIoSpace, NdisMPciAssignResources, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMSetAttributes, NdisMSetAttributesEx, NdisOpenConfiguration



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.