HwVidStartIO Functionality

As its name suggests, a HwVidStartIO function is the entry point for incoming video requests for the miniport driver to process on the adapter. HwVidStartIO is called with pointers to a VRP and to the miniport’s per-adapter device extension.

After the corresponding display driver has a handle for the miniport’s adapter, all of the VRPs sent to the HwVidStartIO function have the IoControlCode field set to an IOCTL_VIDEO_XXX. On receipt of such a request, the HwVidStartIO function does the following:

  1. Determines what operation is requested by switching on the IoControlCode value

  2. Checks that the VRP InputBufferLength and/or OutputBufferLength indicates a buffer that is large enough to satisfy the request and returns an error if either buffer is too small

  3. Either calls an internal function to satisfy the request or satisfies it in the HwVidStartIO function

  4. Sets the Status and Information fields in the VRP and returns TRUE when it returns control.

The video port driver sets up VRPs and serializes calls to the HwVidStartIO function, which owns each input VRP until the miniport driver completes the requested operation and returns control. Every HwVidStartIO function must set status in each VRP and return a Boolean TRUE, indicating that each input request was processed.