Bewerken

Delen via


DXGKDDI_VIDPN_ACQUIRESOURCEMODESET callback function (d3dkmddi.h)

The pfnAcquireSourceModeSet function returns a handle to a particular source mode set object that is contained by a specified VidPN object.

Syntax

DXGKDDI_VIDPN_ACQUIRESOURCEMODESET DxgkddiVidpnAcquiresourcemodeset;

NTSTATUS DxgkddiVidpnAcquiresourcemodeset(
  [in]  IN_CONST_D3DKMDT_HVIDPN hVidPn,
  [in]  IN_CONST_D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId,
  [out] OUT_PD3DKMDT_HVIDPNSOURCEMODESET phVidPnSourceModeSet,
  [out] DEREF_OUT_CONST_PPDXGK_VIDPNSOURCEMODESET_INTERFACE ppVidPnSourceModeSetInterface
)
{...}

Parameters

[in] hVidPn

A handle to a VidPN object. The VidPN manager previously provided this handle to the display miniport driver by calling DxgkDdiEnumVidPnCofuncModality, DxgkDdiIsSupportedVidPn, or DxgkDdiRecommendFunctionalVidPn.

[in] VidPnSourceId

An integer that identifies one of the video present sources associated with the VidPN object.

[out] phVidPnSourceModeSet

A pointer to a variable that receives a handle to the requested source mode set object.

[out] ppVidPnSourceModeSetInterface

A pointer to a variable that receives a pointer to a DXGK_VIDPNSOURCEMODESET_INTERFACE structure. The structure contains pointers to functions that the display miniport driver can call to inspect and alter the source mode set object.

Return value

The pfnAcquireSourceModeSet 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_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE The identifier supplied in VidPnSourceId was invalid.

Remarks

VidPN source identifiers are assigned by the operating system. DxgkDdiStartDevice, implemented by the display miniport driver, returns the number N of video present sources supported by the display adapter. Then the operating system assigns identifiers 0, 1, 2, ... N - 1.

When you have finished using the source mode set object handle, you must release the handle by calling pfnReleaseSourceModeSet. Source mode set objects are reference counted, so if you acquire a handle several times, you must release it that same number of times.

The lifetime of the DXGK_VIDPNSOURCEMODESET_INTERFACE structure returned in ppVidPnSourceModeSetInterface 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 D3DDDI_VIDEO_PRESENT_SOURCE_ID data type is defined in D3dukmdt.h.

The D3DKMDT_HVIDPN and D3DKMDT_HVIDPNSOURCEMODESET data types are 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

VidPN Source Mode Set Interface

pfnAssignTargetModeSet

pfnCreateNewSourceModeSet

pfnReleaseTargetModeSet