KsGetObjectFromFileObject - NtDoc

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

KSDDKAPI PVOID KsGetObjectFromFileObject(
  [in] PFILE_OBJECT FileObject
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

KsGetObjectFromFileObject function

Description

The KsGetObjectFromFileObject function returns the AVStream object cast to PVOID from FileObject.

Parameters

FileObject [in]

A pointer to the FILE_OBJECT structure for which to determine the associated AVStream object.

Return value

KsGetObjectFromFileObject returns a pointer to the AVStream object associated with FileObject (cast to PVOID). For example, this pointer may point to a KSFILTER or a KSPIN.

Remarks

The KsGetObjectFromFileObject function does not check that the file object is associated with a KS object. If it is not, this may result in a memory access error. Driver developers should consider using structured exception handling to catch a possible exception.

See also

KsGetFilterFromFileObject

KsGetObjectTypeFromFileObject

KsGetPinFromFileObject

KsPinGetConnectedPinFileObject