// d3dkmddi.h
DXGKDDI_VIDPN_CREATENEWTARGETMODESET DxgkddiVidpnCreatenewtargetmodeset;
NTSTATUS DxgkddiVidpnCreatenewtargetmodeset(
[in] IN_CONST_D3DKMDT_HVIDPN hVidPn,
[in] IN_CONST_D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId,
[out] OUT_PD3DKMDT_HVIDPNTARGETMODESET phNewVidPnTargetModeSet,
[out] DEREF_OUT_CONST_PPDXGK_VIDPNTARGETMODESET_INTERFACE ppVidPnTargetModeSetInterace
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The pfnCreateNewTargetModeSet function creates a new target mode set object within a specified VidPN object.
hVidPn [in]A handle to a VidPN object. The VidPN manager previously provided this handle to the display miniport driver by calling DxgkDdiEnumVidPnCofuncModality, DxgkDdiIsSupportedVidPn, or DxgkDdiRecommendFunctionalVidPn.
VidPnTargetId [in]An integer that identifies one of the video present targets associated with the VidPN object.
phNewVidPnTargetModeSet [out]A pointer to a variable that receives a handle to the newly created target mode set object.
ppVidPnTargetModeSetInterace [out]A pointer to a variable that receives a pointer to a DXGK_VIDPNTARGETMODESET_INTERFACE structure. The structure contains pointers to functions that the display miniport driver can call to inspect and alter the target mode set object.
The pfnCreateNewTargetModeSet function returns one of the following values:
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The function succeeded. |
| STATUS_GRAPHICS_INVALID_VIDPN | The handle supplied in hVidPn was invalid. |
| STATUS_NO_MEMORY | The VidPN manager was unable to allocate the memory required to create the new target mode set object. |
To assign a new target mode set to a particular target in a VidPN implementation, perform the following steps:
If you obtain a handle by calling pfnCreateNewTargetModeSet and then pass that handle to pfnAssignTargetModeSet, you do not need to release the handle by calling pfnReleaseTargetModeSet.
If you obtain a handle by calling pfnCreateNewTargetModeSet and then you decide not to assign the new target mode set to a target, you must release the newly obtained handle by calling pfnReleaseTargetModeSet.
The lifetime of the DXGK_VIDPNTARGETEMODESET_INTERFACE structure returned in ppVidPnTargetModeSetInterface is owned by the operating system. Using this ownership scheme, the operating system can switch to newer implementations at run time without breaking clients of the interface.
The D3DKMDT_HVIDPN and D3DKMDT_HVIDPNTARGETMODESET data types are defined in D3dkmdt.h.
VidPN Target Mode Set Interface