DXGKDDI_VIDPNSOURCEMODESET_ADDMODE callback function

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

Syntax

DXGKDDI_VIDPNSOURCEMODESET_ADDMODE DxgkddiVidpnsourcemodesetAddmode;

NTSTATUS DxgkddiVidpnsourcemodesetAddmode(
  IN_D3DKMDT_HVIDPNSOURCEMODESET hVidPnSourceModeSet,
  IN_PD3DKMDT_VIDPN_SOURCE_MODE_CONST pVidPnSourceModeInfo
)
{...}

Parameters

hVidPnSourceModeSet

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

pVidPnSourceModeInfo

[in] A pointer to a D3DKMDT_VIDPN_SOURCE_MODE structure that describes the 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 code Description
STATUS_SUCCESS
The function succeeded.
STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET
The handle supplied in hVidPnSourceModeSet was invalid.

Remarks

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

Call pfnCreateNewModeInfo to obtain a pointer to a D3DKMDT_VIDPN_SOURCE_MODE structure. The pnfCreateNewModeInfo function allocates the structure, fills in the Id member with a newly generated source mode identifier, and sets the Type member to D3DKMDT_RMT_UNINITIALIZED.

Populate the D3DKMDT_VIDPN_SOURCE_MODE structure (except for the Id member) with information about the mode, including the mode's type and format.

Call pfnAddMode to add the mode to a source mode set.

The VidPN manager allocates a D3DKMDT_VIDPN_SOURCE_MODE structure when you call pfnCreateNewModeInfo. If you add the mode described by that structure to a source mode set, you do not need to explicitly release the structure; pfnAddMode releases it.

If you obtain a D3DKMDT_VIDPN_SOURCE_MODE structure by calling pfnCreateNewModeInfo and then decide not to add that mode to a source mode set, you must explicity release the structure by calling pfnReleaseModeInfo.

The D3DKMDT_HVIDPNSOURCEMODESET data type is defined in D3dkmdt.h.

Requirements

   
Windows version Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3dkmddi.h (include D3dkmddi.h)
IRQL PASSIVE_LEVEL

See Also

D3DKMDT_VIDPN_SOURCE_MODE

pfnCreateNewModeInfo

pfnReleaseModeInfo