DXGK_MONITOR_INTERFACE::pfnAcquireMonitorSourceModeSet routine

The pfnAcquireMonitorSourceModeSet function returns a handle to the monitor source mode set object that is associated with a specified monitor.

Syntax


DXGKDDI_MONITOR_ACQUIREMONITORSOURCEMODESET pfnAcquireMonitorSourceModeSet;

NTSTATUS APIENTRY pfnAcquireMonitorSourceModeSet(
  _In_   const D3DKMDT_ADAPTER hAdapter,
  _In_   const D3DDDI_VIDEO_PRESENT_TARGET_ID VideoPresentTargetId,
  _Out_  D3DKMDT_HMONITORSOURCEMODESET *phMonitorSourceModeSet,
  _Out_  const DXGK_MONITORSOURCEMODESET_INTERFACE **ppMonitorSourceModeSetInterface
)
{ ... }

Parameters

hAdapter [in]

[in] A handle that identifies a display adapter. The Microsoft DirectX graphics kernel subsystem previously provided this handle to the display miniport driver in the DxgkInterface parameter of the DxgkDdiStartDevice function.

VideoPresentTargetId [in]

[in] An integer that identifies one of the video present targets on the display adapter. The returned source mode set object describes the modes available on the monitor that is connected to this video present target.

phMonitorSourceModeSet [out]

[out] A pointer to a variable that receives a handle to a monitor source mode set object.

ppMonitorSourceModeSetInterface [out]

[out] A pointer to a variable that receives a pointer to a DXGK_MONITORSOURCEMODESET_INTERFACE structure. The structure contains pointers to functions that the display miniport driver can call to inspect and alter the monitor source mode set object.

Return value

The pfnAcquireMonitorSourceModeSet function returns one of the following values.

Return codeDescription
STATUS_SUCCESS

The function succeeded.

STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER

The handle supplied in hAdapter was invalid.

STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET

The identifier supplied in VideoPresentTargetId was invalid.

STATUS_GRAPHICS_MONITOR_NOT_CONNECTED

There is no monitor connected to the video present target identified by VideoPresentTargetId.

 

This function might also return other error codes that are defined in Ntstatus.h.

Remarks

VidPN target identifiers are assigned by the display miniport driver. The DxgkDdiQueryChildRelations function, implemented by the display miniport driver, returns an array of DXGK_CHILD_DESCRIPTOR structures, each of which contains an identifier.

When you have finished using the monitor source mode set object handle, you must release the handle by calling pfnReleaseMonitorSourceModeSet. Target mode set objects are reference counted, so if you acquire a handle several times, you must release it that same number of times.

This function is also available in the DXGK_MONITOR_INTERFACE_V2 interface beginning with Windows 7.

Requirements

Version

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

Header

D3dkmddi.h (include D3dkmddi.h)

IRQL

PASSIVE_LEVEL

See also

DXGK_MONITOR_INTERFACE_V2
DxgkDdiEnumVidPnCofuncModality

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft