VideoPortGetBusData - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// video.h

VIDEOPORT_DEPRECATED VIDEOPORT_API ULONG VideoPortGetBusData(
        PVOID         HwDeviceExtension,
        BUS_DATA_TYPE BusDataType,
        ULONG         SlotNumber,
  [out] PVOID         Buffer,
        ULONG         Offset,
        ULONG         Length
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-video-videoportgetbusdata)

VideoPortGetBusData function

Description

The VideoPortGetBusData function returns bus-type-specific configuration information.

Parameters

HwDeviceExtension

Pointer to the miniport driver's device extension.

BusDataType

Specifies the type of bus configuration data to return. The value of this parameter can be Cmos, EisaConfiguration, or PCIConfiguration. However, additional types of bus configuration might be supported in the future. The upper bound on the types supported is always MaximumBusDataType.

SlotNumber

Specifies the location of the device on the bus for a Cmos BusDataType; zero for all other bus types.

Buffer [out]

Pointer to a buffer into which VideoPortGetBusData returns the configuration information. The contents of the buffer depend on the BusDataType, as follows:

Offset

Specifies the offset, in bytes, into the PCI configuration space that should be retrieved If BusDataType is PCIConfiguration; otherwise zero. See Remarks for more information.

Length

Specifies the length, in bytes, of Buffer.

Return value

VideoPortGetBusData returns the number of bytes of configuration information it has written in Buffer. If the given BusDataType is not valid for the current platform, this function generally returns zero.

Return code Description
0 The PCI bus does not exist.
2 The PCI bus exists, but Buffer contains the value PCI_INVALID_VENDOR_ID at the PCI_COMMON_CONFIG VendorId member.

Remarks

To obtain only a part of the configuration information, the miniport driver should set Offset to the byte offset of the information needed, and set Length to the number of bytes of the information needed. For example, if only the command register is needed, set Offset to the offset of this register, and set Length to sizeof(USHORT).

The driver should call VideoPortGetAccessRanges rather than VideoPortGetBusData to retrieve its hardware resources.

See also

CM_EISA_FUNCTION_INFORMATION

CM_EISA_SLOT_INFORMATION

HwVidQueryDeviceCallback

PCI_COMMON_CONFIG

PCI_SLOT_NUMBER

VIDEO_PORT_CONFIG_INFO

VideoPortGetAccessRanges

VideoPortGetDeviceBase

VideoPortGetDeviceData

VideoPortGetRegistryParameters