// 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 referenceNo description available.
The VideoPortGetBusData function returns bus-type-specific configuration information.
HwDeviceExtensionPointer to the miniport driver's device extension.
BusDataTypeSpecifies 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.
SlotNumberSpecifies 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:
OffsetSpecifies the offset, in bytes, into the PCI configuration space that should be retrieved If BusDataType is PCIConfiguration; otherwise zero. See Remarks for more information.
LengthSpecifies the length, in bytes, of Buffer.
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. |
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.
VideoPortGetRegistryParameters