RtSetBusDataByOffset

RtSetBusDataByOffset sets bus-configuration data for a device on a dynamically configurable I/O bus with a published, standard interface.

Syntax

ULONG RtSetBusDataByOffset(
    BUS_DATA_TYPE BusDataType,
    ULONG BusNumber,
    ULONG SlotNumber,
    PVOID pBuffer,
    ULONG Offset,
    ULONG Length
);

Parameters

BusDataType

The type of bus data to be set. Currently, its value can be Pos, or PCIConfiguration. The upper boundary on the bus types supported is always MaximumBusDataType.

BusNumber

The zero-based and system-assigned number of the bus in systems with more than one bus of the same BusDataType.

SlotNumber

The logical slot number. When PCIConfiguration is specified, this is a PCI_SLOT_NUMBER-TYPE value.

pBuffer

A pointer to a caller-supplied buffer with configuration information specific to BusDataType.
When PCIConfiguration is specified, the buffer contains some or all of the PCI_COMMON_CONFIG information for the given SlotNumber. The specified Offset and Length determine how much information is supplied. Certain members of PCI_COMMON_CONFIG have read-only values, and the caller is responsible for preserving the system-supplied values of read-only members.

For information on the PCI_COMMON_CONFIG data type, see the MSDN page at https://msdn.microsoft.com/en-us/library/windows/hardware/ff537455(v=vs.85).aspx

Offset

The byte offset in the PCI_COMMON_CONFIG structure at which the caller-supplied configuration values begin. Callers can use the system-defined constant PCI_COMMON_HDR_LENGTH to specify the device-specific area of PCI_COMMON_CONFIG.

Length

The number of bytes in the buffer.

Return Value

The number of bytes of data successfully set for the given SlotNumber if the function succeeds, 0 (zero) if the given BusDataType is not valid for the current platform or if the supplied information is invalid

Remarks

When accessing the device-specific area of the PCI configuration space, RtSetBusDataByOffset guarantees the following:

For more information consult the Windows Driver Development Kit.

Requirements

Minimum Supported Version RTX64 2013
Header Rtapi.h
Library RtApi.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

HalSetBusDataByOffset (in the Windows Driver Development Kit)

RtGetBusDataByOffset

RtTranslateBusAddress

PCI_COMMON_CONFIG (MSDN)