Partager via


HalGetBusData (Windows CE 5.0)

Send Feedback

This function retrieves configuration information about a specified slot or address on a I/O bus.

ULONG HalGetBusData(BUS_DATA_TYPEBusDataType,ULONG BusNumber,ULONG SlotNumber,PVOIDBuffer,ULONG Length );

Parameters

  • BusDataType
    [in] Type of bus data to be retrieved. The upper bound on the types supported is always MaximumBusDataType from the BUS_DATA_TYPE enumeration. Implementation of bus routines is OEM-specific. The default CEDDK.dll returns 0 for this function. The CEDDK.dll for a CEPC supports PNPISAConfiguration and PCIConfiguration bus configurations.
  • BusNumber
    [in] Zero-based and system-assigned number of the bus in systems with several buses of the same BusDataType.
  • SlotNumber
    [in] Logical slot number or location of the device. If PCIConfiguration is specified as the BusDataType, this value a PCI_SLOT_NUMBER value, which is the slot and function numbers combined.
  • Buffer
    [in] Pointer to a caller-supplied buffer for configuration information specific to BusDataType. If you specify PCIConfiguration, the buffer contains the PCI_COMMON_CONFIG information for the specified SlotNumber and function number.
  • Length
    [in] Maximum number of bytes to return in Buffer.

Return Values

Returns the number of bytes of data it wrote in the specified buffer. If the specifed BusDataType is not valid for the current platform, this function returns 0.

The following table shows the return values for this function that indicate errors when the input BusType is PCIConfiguration.

Value Description
0 The specified PCI bus does not exist.
2 The specified PCI bus exists, but there is no device at the specified PCI SlotNumber. The Buffer also contains the PCI_INVALID_VENDOR_ID value for the VendorId member of PCI_COMMON_CONFIG.

Remarks

Device drivers call this function during initialization to locate their devices on a particular I/O bus. You can use the returned configuration data, which is specific to the bus type, in later calls to other configuration and initialization functions, such as HalTranslateBusAddress.

For supported buses, HalGetBusData calls HalGetBusDataByOffset with an Offset of 0, which retrieves configuration information for the device starting at Offset 0.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: CEDDK.h.
Link Library: CEDDK.lib.

See Also

BUS_DATA_TYPE | HalGetBusDataByOffset | HalSetBusData | HalSetBusDataByOffset | HalTranslateBusAddress | PCI_COMMON_CONFIG

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.