DXGKDDI_VIDPNTARGETMODESET_CREATENEWMODEINFO callback function

The pfnCreateNewModeInfo function returns a pointer to a D3DKMDT_VIDPN_TARGET_MODE structure that the display miniport driver populates before calling pfnAddMode.

Syntax


DXGKDDI_VIDPNTARGETMODESET_CREATENEWMODEINFO pfnCreateNewModeInfo;

NTSTATUS APIENTRY pfnCreateNewModeInfo(
  _In_  const D3DKMDT_HVIDPNTARGETMODESET hVidPnTargetModeSet,
  _Out_       D3DKMDT_VIDPN_TARGET_MODE   **ppNewVidPnTargetModeInfo
)
{ ... }

Parameters

hVidPnTargetModeSet [in]

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

ppNewVidPnTargetModeInfo [out]

[out] A pointer to a variable that receives a pointer to a D3DKMDT_VIDPN_TARGET_MODE structure allocated by the VidPN manager.

Return value

The pfnCreateNewModeInfo function returns one of the following values:

Return codeDescription
STATUS_SUCCESS

The function succeeded.

STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET

The handle supplied in hVidPnTargetModeSet was invalid.

 

Remarks

The pfnCreateNewModeInfo function allocates a D3DKMDT_VIDPN_TARGET_MODE structure and sets its Id member to a newly generated identifier.

After you call pfnCreateNewModeInfo to obtain a D3DKMDT_VIDPN_TARGET_MODE structure, you must do one, but not both, of the following:

When you populate a D3DKMDT_VIDPN_TARGET_MODE structure, you have the option of overwriting the Id member that was generated and set by pfnCreateNewModeInfo. However, if you overwrite the Id member of any D3DKMDT_VIDPN_TARGET_MODE structure, you must overwrite the Id members of all the D3DKMDT_VIDPN_TARGET_MODE structures you obtain from pfnCreateNewModeInfo. Unless you have a specific reason for overwriting the Id members (for example, tracking target modes with your own numbering scheme), you should leave them as set by pfnCreateNewModeInfo.

The D3DKMDT_HVIDPNTARGETMODESET 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

pfnAddMode
pfnReleaseModeInfo
D3DKMDT_VIDPN_TARGET_MODE

 

 

Send comments about this topic to Microsoft

Show: