KsSetTargetState function (ks.h)

Sets the enabled state of a target device associated with the specified object header.

Syntax

KSDDKAPI VOID KsSetTargetState(
  [in] KSOBJECT_HEADER Header,
  [in] KSTARGET_STATE  TargetState
);

Parameters

[in] Header

Points to a header previously allocated by KsAllocateDeviceHeader.

[in] TargetState

Contains the new state of the target associated with this object header. This may be either KSTARGET_STATE_DISABLED or KSTARGET_STATE_ENABLED.

Return value

None.

Remarks

Assumes that such a target has been set with KsSetTargetDeviceObject. The target is initially disabled, and is ignored when recalculating stack depth. For WDM Streaming devices, this is called on a transition back to a Stop state, after having enabled the target and used KsRecalculateStackDepth on a transition to Acquire state. This allows the stack depth to be minimized.

Requirements

Requirement Value
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib