// d3dkmddi.h
DXGKDDI_VIDPNTARGETMODESET_ADDMODE DxgkddiVidpntargetmodesetAddmode;
NTSTATUS DxgkddiVidpntargetmodesetAddmode(
[in] IN_D3DKMDT_HVIDPNTARGETMODESET hVidPnTargetModeSet,
[in] IN_PD3DKMDT_VIDPN_TARGET_MODE_CONST pVidPnTargetModeInfo
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The pfnAddMode function adds a VidPN target mode to a specified VidPN target mode set object.
hVidPnTargetModeSet [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.
pVidPnTargetModeInfo [in]A pointer to a D3DKMDT_VIDPN_TARGET_MODE structure that describes the target mode. The display miniport driver previously obtained this structure by calling pfnCreateNewModeInfo.
The pfnAddMode function returns one of the following values:
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The function succeeded. |
| STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET | The handle supplied in hVidPnTargetModeSet was invalid. |
To add a mode to a target mode set, the display miniport driver performs the following steps.
The VidPN manager allocates a D3DKMDT_VIDPN_TARGET_MODE structure when you call pfnCreateNewModeInfo. If you add the mode described by that structure to a target mode set, you do not need to explicitly release the structure; pfnAddMode releases it.
If you obtain a D3DKMDT_VIDPN_TARGET_MODE structure by calling pfnCreateNewModeInfo and then decide not to add that mode to a target mode set, you must explicitly release the structure by calling pfnReleaseModeInfo.
The D3DKMDT_HVIDPNTARGETMODESET data type is defined in D3dkmdt.h.