Every video miniport driver must have at least one HwVidFindAdapter routine. It is possible to have a different HwVidFindAdapter routine for each different I/O bus type. If a driver implements bus specific HwVidFindAdapter routines, the HwFindAdapter member of VIDEO_HW_INITIALIZATION_DATA, in addition to the AdapterInterfaceType of VIDEO_PORT_CONFIG_INFO, must be changed before each call to VideoPortInitialize.
The video port driver fills in as much VIDEO_PORT_CONFIG_INFO as it can from the miniport’s VIDEO_HW_INITIALIZATION_DATA before calling its HwVidFindAdapter routine with a pointer to the configuration information buffer. In particular, VideoPortInitialize always sets the following:
This value specifies a particular I/O bus in multibus machines with more than one bus of the given AdapterInterfaceType.
In general, the HwVidFindAdapter function is responsible for the following:
First, a HwVidFindAdapter function should check whether the Length of the input ConfigInfo buffer has enough room for data that the miniport driver needs to find, configure, and initialize its video adapter. In effect, this is a check on the version of the VIDEO_PORT_CONFIG_INFO structure being used by the port driver.