KsGetObjectFromFileObject function (ks.h)

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

Syntax

KSDDKAPI PVOID KsGetObjectFromFileObject(
  [in] PFILE_OBJECT FileObject
);

Parameters

[in] FileObject

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.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib
IRQL Any level

See also

KsGetFilterFromFileObject

KsGetObjectTypeFromFileObject

KsGetPinFromFileObject

KsPinGetConnectedPinFileObject