KsGetParent - NtDoc

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

KSDDKAPI PVOID KsGetParent(
  [in] PVOID Object
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

KsGetParent function

Description

The KsGetParent function acquires the parent of the given object.

Parameters

Object [in]

A pointer to the AVStream object for which to find the parent. Must be a pointer to one of the following types: KSDEVICE, KSFILTERFACTORY, KSFILTER, or KSPIN. Callers must manually typecast the object to a PVOID.

Return value

KsGetParent returns the parent of Object as a PVOID. Callers must manually cast this return value to whatever the type of the parent of Object is.

Remarks

For a graphical representation of AVStream parent/child relationships, see the diagram in AVStream Object Hierarchy.

The object hierarchy is only guaranteed stable while the appropriate mutex is held, in this case the device mutex. For more information, see Mutexes in AVStream.

Minidrivers rarely use this function directly. Callers of KsGetParent must manually perform typecasts to and from PVOID. There are a number of inline versions that do the casting for you: KsFilterFactoryGetParentDevice, KsFilterGetParentFilterFactory, and KsPinGetParentFilter.

See also

KSDEVICE

KSFILTER

KSFILTERFACTORY

KSPIN

KsFilterFactoryGetParentDevice

KsFilterGetParentFilterFactory

KsPinGetParentFilter