DXGK_VIDPNSOURCEMODESET_INTERFACE::pfnAddMode routine

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

Syntax


DXGKDDI_VIDPNSOURCEMODESET_ADDMODE pfnAddMode;

NTSTATUS APIENTRY pfnAddMode(
  _In_  D3DKMDT_HVIDPNSOURCEMODESET     hVidPnSourceModeSet,
  _In_  D3DKMDT_VIDPN_SOURCE_MODE CONST *pVidPnSourceModeInfo
)
{ ... }

Parameters

hVidPnSourceModeSet [in]

[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]

[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 codeDescription
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

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
pfnReleaseModeInfo
D3DKMDT_VIDPN_SOURCE_MODE

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft