DXGKDDI_VIDPNTARGETMODESET_ADDMODE callback function (d3dkmddi.h)

The pfnAddMode function adds a VidPN target mode to a specified VidPN target mode set object.

Syntax

DXGKDDI_VIDPNTARGETMODESET_ADDMODE DxgkddiVidpntargetmodesetAddmode;

NTSTATUS DxgkddiVidpntargetmodesetAddmode(
  [in] IN_D3DKMDT_HVIDPNTARGETMODESET hVidPnTargetModeSet,
  [in] IN_PD3DKMDT_VIDPN_TARGET_MODE_CONST pVidPnTargetModeInfo
)
{...}

Parameters

[in] hVidPnTargetModeSet

A handle to a VidPN target mode set object. The display miniport driver previously obtained this handle by calling the pfnAcquireTargetModeSet function of the DXGK_VIDPN_INTERFACE interface.

[in] pVidPnTargetModeInfo

A pointer to a D3DKMDT_VIDPN_TARGET_MODE structure that describes the target mode. The display miniport driver previously obtained this structure by calling pfnCreateNewModeInfo.

Return value

The pfnAddMode function returns one of the following values:

Return code Description
STATUS_SUCCESS The function succeeded.
STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET The handle supplied in hVidPnTargetModeSet was invalid.

Remarks

To add a mode to a target mode set, the display miniport driver performs the following steps.

  1. Call pfnCreateNewModeInfo to obtain a pointer to a D3DKMDT_VIDPN_TARGET_MODE structure. The pnfCreateNewModeInfo function allocates the structure and fills in the Id member with a newly generated target mode identifier.
  2. The Info member of the D3DKMDT_VIDPN_TARGET_MODE structure is a D3DKMDT_VIDEO_SIGNAL_MODE structure. Populate that structure with information about the mode.
  3. Call pfnAddMode to add the mode to a target mode set.
The VidPN manager allocates a D3DKMDT_VIDPN_TARGET_MODE structure when you call pfnCreateNewModeInfo. If you add the mode described by that structure to a target mode set, you do not need to explicitly release the structure; pfnAddMode releases it.

If you obtain a D3DKMDT_VIDPN_TARGET_MODE structure by calling pfnCreateNewModeInfo and then decide not to add that mode to a target mode set, you must explicitly release the structure by calling pfnReleaseModeInfo.

The D3DKMDT_HVIDPNTARGETMODESET data type is defined in D3dkmdt.h.

Requirements

Requirement Value
Minimum supported client Windows Vista
Target Platform Desktop
Header d3dkmddi.h (include D3dkmddi.h)
IRQL PASSIVE_LEVEL

See also

D3DKMDT_VIDPN_TARGET_MODE

pfnCreateNewModeInfo

pfnReleaseModeInfo