Table of contents
GDI
TOC
Collapse the table of content
Expand the table of content

Communicating with the Driver of a Child Device

Last Updated: 2/14/2017

A video miniport driver and the driver of a child device can mutually define an interface that allows the child driver to communicate with its hardware through the parent miniport driver. The child driver obtains this interface by sending an IRP_MN_QUERY_INTERFACE request to the video port driver for the parent miniport driver. Upon receiving such a request, the video port driver calls the miniport driver's HwVidQueryInterface function, if it is defined, and the miniport driver returns a pointer to the interface. The driver of the child device can then call into the miniport driver through the functions exposed by HwVidQueryInterface at any time.

If the miniport driver does not implement HwVidQueryInterface or fails the call, the video port driver passes the request to the parent of the miniport driver's device. If a child driver sends an IRP_MN_QUERY_INTERFACE to another child of the miniport driver and the other child driver does not implement HwVidQueryInterface or fails the call, the video port driver returns an error.

Because the child driver can call into the miniport driver without the video port driver's knowledge, the miniport driver must synchronize access to itself in all of the functions exposed by HwVidQueryInterface. It does this by calling VideoPortAcquireDeviceLock and VideoPortReleaseDeviceLock to grab and release the video port driver-maintained device lock, respectively.

A child device is enumerated by HwVidGetVideoChildDescriptor.

Send comments about this topic to Microsoft

© 2017 Microsoft