AcxTargetCircuitGetTargetElement 函数 (acxtargets.h)

AcxTargetCircuitGetTargetElement 函数(给定有效的元素索引值)将返回关联的 ACXTARGETELEMENT 对象。

语法

ACXTARGETELEMENT AcxTargetCircuitGetTargetElement(
  ACXTARGETCIRCUIT TargetCircuit,
  ULONG            ElementIndex
);

参数

TargetCircuit

ACXTARGETCIRCUIT 句柄。 有关 ACX 对象的详细信息,请参阅 ACX 对象的摘要

ElementIndex

有效的元素索引值。

返回值

返回与指定线路关联的 ACXTARGETELEMENT ACX 对象。

备注

示例

    // Search the target circuit for a volume element.
    // This sample code doesn't support downstream audioengine elements.
    // 
    for (ULONG elementIndex = 0; elementIndex < AcxTargetCircuitGetElementsCount(TargetCircuit); ++elementIndex)
    {
        ACXTARGETELEMENT targetElement = AcxTargetCircuitGetTargetElement(TargetCircuit, elementIndex);
        GUID elementType = AcxTargetElementGetType(targetElement);

        if (IsEqualGUID(elementType, KSNODETYPE_VOLUME) &&
            circuitCtx->TargetVolumeHandler == nullptr)
        {
            // Found Volume
            circuitCtx->TargetVolumeHandler = targetElement;
        }
    }

ACX 要求

最低 ACX 版本: 1.0

有关 ACX 版本的详细信息,请参阅 ACX 版本概述

要求

要求
Header acxtargets.h
IRQL <= DISPATCH_LEVEL

另请参阅