Hardware Dev Center

DXGK_VIDPNTOPOLOGY_INTERFACE::pfnEnumPathTargetsFromSource routine

The pfnEnumPathTargetsFromSource function returns the identifier of one of the video present targets associated with a specified video present source.



NTSTATUS APIENTRY pfnEnumPathTargetsFromSource(
  _In_  const D3DKMDT_HVIDPNTOPOLOGY           hVidPnTopology,
  _In_  const D3DDDI_VIDEO_PRESENT_SOURCE_ID   VidPnSourceId,
  _In_  const D3DKMDT_VIDPN_PRESENT_PATH_INDEX VidPnPresentPathIndex,
  _Out_       D3DDDI_VIDEO_PRESENT_TARGET_ID   *pVidPnTargetId
{ ... }


hVidPnTopology [in]

[in] A handle to a VidPN topology object. The display miniport driver previously obtained this handle by calling the pfnGetTopology function of the DXGK_VIDPN_INTERFACE interface.

VidPnSourceId [in]

[in] An integer that identifies a particular video present source.

VidPnPresentPathIndex [in]

[in] A zero-based index into the set of paths that contain the source identified by VidPnSourceId.

pVidPnTargetId [out]

[out] A pointer to a variable that receives the target identifier.

Return value

The pfnEnumPathTargetsFromSource function returns one of the following values:

Return codeDescription

The function succeeded.


The handle supplied in hVidPnTopology was invalid.


The pointer supplied in pVidPnTargetId was in valid.



VidPnPresentPathIndex is not an index into the set of all paths in the topology identified by hVidPnTopology. It is an index into a subset of all the paths in the topology: specifically, the subset of all paths that contain the source identified by VidPnSourceId.

To enumerate (in a given topology) all the targets associated with a particular source, perform the following steps.

Call pfnGetNumPathsFromSource to determine the number N of paths that contain the source of interest. Think of those paths as an indexed set with indices 0, 1, ... N - 1.

For each index 0 though N - 1, pass the source identifier and the index to pfnEnumPathTargetsFromSource.

A topology is a collection paths, each of which contains a (source, target) pair. It is possible for a particular source to appear in more than one path. For example, one source can be paired with two distinct targets in the case of a clone view.

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.

VidPN target identifiers are assigned by the display miniport driver. DxgkDdiQueryChildRelations, implemented by the display miniport driver, returns an array of DXGK_CHILD_DESCRIPTOR structures, each of which contains an identifier.

The D3DKMDT_HVIDPNTOPOLOGY and D3DKMDT_VIDPN_PRESENT_PATH_INDEX data types are defined in D3dkmdt.h.

The D3DDDI_VIDEO_PRESENT_SOURCE_ID and D3DDDI_VIDEO_PRESENT_TARGET_ID data types are defined in D3dukmdt.h.


Target platform



Available in Windows Vista and later versions of the Windows operating systems.


D3dkmddi.h (include D3dkmddi.h)



See also




Send comments about this topic to Microsoft

© 2015 Microsoft