DXGK_MONITORSOURCEMODESET_INTERFACE::pfnAddMode routine

The pfnAddMode function adds a monitor source mode to a specified monitor source mode set object.

Syntax


DXGKDDI_MONITORSOURCEMODESET_ADDMODE pfnAddMode;

NTSTATUS APIENTRY pfnAddMode(
  _In_  const D3DKMDT_HMONITORSOURCEMODESET     hMonitorSourceModeSet,
  _In_  const D3DKMDT_MONITOR_SOURCE_MODE CONST *pMonitorSourceModeInfo
)
{ ... }

Parameters

hMonitorSourceModeSet [in]

[in] A handle to a monitor source mode set object. The display miniport driver previously obtained this handle by calling the pfnAcquireMonitorSourceModeSet function of the Monitor interface.

pMonitorSourceModeInfo [in]

[in] A pointer to a D3DKMDT_MONITOR_SOURCE_MODE structure that describes the monitor source mode. The display miniport driver previously obtained this structure by calling pfnCreateNewModeInfo.

Return value

The pfnAddMode function returns one of the following values.

Return codeDescription
STATUS_SUCCESS

The function succeeded.

STATUS_NO_MEMORY

The function failed because it could not allocate enough memory.

STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE

The information supplied in pMonitorSourceModeInfo was invalid.

STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET

The handle supplied in hMonitorSourceModeSet was invalid.

STATUS_GRAPHICS_INVALID_FREQUENCY

The frequency information supplied in pMonitorSourceModeInfo was invalid.

STATUS_GRAPHICS_INVALID_ACTIVE_REGION

The active region supplied in pMonitorSourceModeInfo was invalid.

STATUS_GRAPHICS_INVALID_TOTAL_REGION

The total region supplied in pMonitorSourceModeInfo was invalid.

STATUS_GRAPHICS_MODE_ALREADY_IN_MODE_SET

The mode set already contains a mode that is identical to the mode supplied in pMonitorSourceModeInfo.

STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE

The identifier supplied in pMonitorSourceModeInfo->Id is already being used for another mode in the mode set.

STATUS_GRAPHICS_RESOURCES_NOT_RELATED

The structure pointed to by pMonitorSourceModeInfo was not created for addition to the mode set specified by hMonitorSourceModeSet.

 

Remarks

If pMonitorSourceModeInfo->Preference is equal to D3DKMDT_MP_PREFERRED, the newly added mode becomes the preferred mode of the mode set.

Requirements

Target platform

Desktop

Version

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

Header

D3dkmddi.h (include D3dkmddi.h)

IRQL

PASSIVE_LEVEL

See also

pfnCreateNewModeInfo

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft