// ks.h
KSDDKAPI PKSDEVICE KsGetDevice(
[in] PVOID Object
);
View the official Windows Driver Kit DDI referenceNo description available.
The KsGetDevice function returns the AVStream device structure to which Object belongs.
Object [in]The object to query for the device to which it belongs.
KsGetDevice returns a pointer to a KSDEVICE structure that is the AVStream device to which Object belongs.
Object should be one of: PKSPIN, PKSFILTER, or PKSFILTERFACTORY. Callers must perform appropriate typecasting to PVOID.
Minidrivers typically do not call this function directly. There are a number of functions that perform inline calls to KsGetDevice and that perform typecasting automatically: KsFilterFactoryGetDevice, KsFilterGetDevice, and KsPinGetDevice.