// ks.h
KSDDKAPI PDEVICE_OBJECT KsPinGetConnectedPinDeviceObject(
[in] PKSPIN Pin
);
View the official Windows Driver Kit DDI referenceNo description available.
The KsPinGetConnectedPinDeviceObject function returns the device object at the top of the device stack corresponding to the sink pin attached to the source pin Pin.
Pin [in]A pointer to a KSPIN structure that is the source pin for which to obtain the connected sink pin's device object.
If Pin is a source pin, KsPinGetConnectedPinDeviceObject returns a pointer to the DEVICE_OBJECT structure at the top of the device stack on which the sink pin resides. Otherwise, it returns NULL.
The returned device object is not necessarily the functional device object (FDO) for the device on which the sink resides, since there might exist an upper level filter driver. It is, however, the device object to which IOCTLs destined for the sink pin are sent.