Skip to content

Latest commit

 

History

History
145 lines (88 loc) · 5.63 KB

nf-video-videoportgetbusdata.md

File metadata and controls

145 lines (88 loc) · 5.63 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:video.VideoPortGetBusData
VideoPortGetBusData function (video.h)
The VideoPortGetBusData function returns bus-type-specific configuration information.
display\videoportgetbusdata.htm
display
05/10/2018
VideoPortGetBusData function
VideoPortGetBusData, VideoPortGetBusData function [Display Devices], VideoPort_Functions_98b5cc14-84db-4611-a651-652eb434cae6.xml, display.videoportgetbusdata, video/VideoPortGetBusData
video.h
Video.h
Desktop
Available in Windows 2000 and later versions of the Windows operating systems.
Videoprt.lib
Videoprt.sys
PASSIVE_LEVEL
Windows
VideoPortGetBusData
video/VideoPortGetBusData
APIRef
kbSyntax
DllExport
Videoprt.sys
VideoPortGetBusData

VideoPortGetBusData function

-description

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

-parameters

-param HwDeviceExtension

Pointer to the miniport driver's device extension.

-param 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.

-param SlotNumber

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

-param Buffer [out]

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

  • If Cmos is specified, the buffer contains the contents of the CMOS (bus number equals zero) or ECMOS (bus number equals one) locations, starting with the location specified for SlotNumber. A miniport driver's HwVidFindAdapter function can determine the number of the bus from the SystemIoBusNumber member of the VIDEO_PORT_CONFIG_INFO input structure.
  • If EisaConfiguration is specified, the buffer contains the CM_EISA_SLOT_INFORMATION structure, followed by zero or more CM_EISA_FUNCTION_INFORMATION structures for the specified slot.
  • If PCIConfiguration is specified, the buffer contains the PCI_COMMON_CONFIG information for the specified slot.

-param 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.

-param Length

Specifies the length, in bytes, of Buffer.

-returns

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