KsSetTargetState - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ks.h

KSDDKAPI VOID KsSetTargetState(
  [in] KSOBJECT_HEADER Header,
  [in] KSTARGET_STATE  TargetState
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ks-kssettargetstate)

KsSetTargetState function

Description

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

Parameters

Header [in]

Points to a header previously allocated by KsAllocateDeviceHeader.

TargetState [in]

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.