DxgkCbQueryMonitorInterface routine

The DxgkCbQueryMonitorInterface function returns a pointer to a DXGK_MONITOR_INTERFACE structure. The structure contains pointers to functions that the display miniport driver can call to obtain other interfaces that provide access to monitor descriptors, modes, and frequency ranges.

Syntax


DXGKCB_QUERYMONITORINTERFACE DxgkCbQueryMonitorInterface;

NTSTATUS APIENTRY DxgkCbQueryMonitorInterface(
  _In_  const HANDLE                         hAdapter,
  _In_  const DXGK_MONITOR_INTERFACE_VERSION MonitorInterfaceVersion,
  _Out_ const DXGK_MONITOR_INTERFACE         **ppMonitorInterface
)
{ ... }

Parameters

hAdapter [in]

[in] A handle that represents a display adapter. The VidPN manager provided this handle to the display miniport driver in a call to DxgkDdiRecommendFunctionalVidPn, DxgkDdiIsSupportedVidPn, DxgkDdiEnumVidPnCofuncModality, or DxgkDdiCommitVidPn.

MonitorInterfaceVersion [in]

[in] A value from the DXGK_MONITOR_INTERFACE_VERSION enumeration that specifies the version of the monitor interface being requested.

ppMonitorInterface [out]

[out] A pointer to a variable that receives a pointer to the DXGK_MONITOR_INTERFACE structure.

Return value

DxgkCbQueryMonitorInterface returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes defined in Ntstatus.h.

Examples

The following code example shows how to acquire the monitor-management interface from the Microsoft DirectX graphics kernel subsystem (Dxgkrnl.sys) and use the monitor-management interface to retrieve the monitor-frequency-range-set object.


DXGK_MONITOR_INTERFACE*  pDxgkMonitorInterface = NULL;
HANDLE  hDeviceHandle = NULL;
D3DKMDT_HMONITORFREQUENCYRANGESET  hFreqRangeSet = NULL;
DXGK_MONITORFREQUENCYRANGESET_INTERFACE*  pFreqRangeSetInterface = NULL;
D3DKMDT_MONITOR_FREQUENCY_RANGE*  pFreqRange = NULL;
PHW_DEVICE_EXTENSION  pHwDeviceExtension = NULL;
DXGKRNL_INTERFACE*  pDxgKrnlCallback = NULL;

// The adapter handle is an address of the hardware device extension.
pHwDeviceExtension = ((PHW_DEVICE_EXTENSION*)hAdapter)[0];

pDxgKrnlCallback = &(pHwDeviceExtension->ddiCallback);

hDeviceHandle = pDxgKrnlCallback->DeviceHandle;

Status = pDxgKrnlCallback->DxgkCbQueryMonitorInterface(hDeviceHandle,
  DXGK_MONITOR_INTERFACE_VERSION_V1,
 &pDxgkMonitorInterface);

Status = pDxgkMonitorInterface->pfnGetMonitorFrequencyRangeSet(hDeviceHandle,
  0 | HW_ID_DISPLAY_CHILD,
 &hFreqRangeSet,
 &pFreqRangeSetInterface);

Requirements

Target platform

Desktop

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dkmddi.h (include Dispmprt.h)

IRQL

<= APC_LEVEL

See also

Monitor Interface

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft