Share via


HalGetBusData

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

ULONG HalGetBusData( 
  BUS_DATA_TYPE BusDataType, 
  ULONG BusNumber, 
  ULONG SlotNumber, 
  PVOID Buffer, 
  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 always returns 0 for this function. The sample CEPC CEDDK.dll supports only PNPISAConfiguration and PCIConfiguration.
  • 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 given SlotNumber and function number.
  • Length
    [in] Maximum number of bytes to return in Buffer.

Return Values

This function returns the number of bytes of data it wrote in the given buffer. If the given 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 given 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 bus-type-specific configuration data 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 | Implementing CEDDK.dll

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.