Bewerken

Delen via


DXGKDDI_VIDPNSOURCEMODESET_CREATENEWMODEINFO callback function (d3dkmddi.h)

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

Syntax

DXGKDDI_VIDPNSOURCEMODESET_CREATENEWMODEINFO DxgkddiVidpnsourcemodesetCreatenewmodeinfo;

NTSTATUS DxgkddiVidpnsourcemodesetCreatenewmodeinfo(
  [in]  IN_CONST_D3DKMDT_HVIDPNSOURCEMODESET hVidPnSourceModeSet,
  [out] DEREF_OUT_PPD3DKMDT_VIDPN_SOURCE_MODE ppNewVidPnSourceModeInfo
)
{...}

Parameters

[in] hVidPnSourceModeSet

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.

[out] ppNewVidPnSourceModeInfo

A pointer to a variable that receives a pointer to a D3DKMDT_VIDPN_SOURCE_MODE structure allocated by the VidPN manager.

Return value

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

The pfnCreateNewModeInfo function allocates a D3DKMDT_VIDPN_SOURCE_MODE structure, sets its Id member to a newly generated identifier, and sets its Type member to D3DKMDT_RMT_UNINITIALIZED.

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

When you populate a D3DKMDT_VIDPN_SOURCE_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_SOURCE_MODE structure, you must overwrite the Id members of all the D3DKMDT_VIDPN_SOURCE_MODE structures you obtain from pfnCreateNewModeInfo. Unless you have a specific reason for overwriting the Id members (for example, tracking source modes with your own numbering scheme), you should leave them as set by pfnCreateNewModeInfo.

The D3DKMDT_HVIDPNSOURCEMODESET 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_SOURCE_MODE

pfnAddMode

pfnReleaseModeInfo