AcxTargetCircuitGetTargetElement function (acxtargets.h)

The AcxTargetCircuitGetTargetElement function, given a valid element index value, will return the associated ACXTARGETELEMENT object.

Syntax

ACXTARGETELEMENT AcxTargetCircuitGetTargetElement(
  ACXTARGETCIRCUIT TargetCircuit,
  ULONG            ElementIndex
);

Parameters

TargetCircuit

An ACXTARGETCIRCUIT handle. For more information about ACX objects, see Summary of ACX Objects.

ElementIndex

A valid element index value.

Return value

Returns a ACXTARGETELEMENT ACX Object that is associated with the specified circuit.

Remarks

Example

    // 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 requirements

Minimum ACX version: 1.0

For more information about ACX versions, see ACX version overview.

Requirements

Requirement Value
Header acxtargets.h
IRQL <= DISPATCH_LEVEL

See also