Video Miniport’s DriverEntry

A DriverEntry function is the initial entry point for each video miniport driver. DriverEntry is the required name for this function.

A miniport’s DriverEntry function is called by the I/O manager with two input pointers and must do the following:

  1. Call VideoPortZeroMemory to initialize a VIDEO_HW_INITIALIZATION_DATA structure on the stack.

  2. Set driver-specific and adapter-specific values in the VIDEO_HW_INITIALIZATION_DATA fields, including the miniport driver’s entry points. The following entry points must be set to a driver supplied routine:

    • HwVidFindAdapter

    • HwVidInitialize

    • HwVidStartIO

    The HwVidInterrupt, HwVidResetHw, and HwVidTimer entry points also must be set to a driver-supplied function or to NULL.

  3. Initialize the StartingDeviceNumber to zero. If a miniport driver supports more than one adapter, the video port driver uses a different key in the registry for each adapter and gives each adapter-specific key a name derived from the zero-based StartingDeviceNumber.

  4. Set up any driver-determined context data that the miniport’s DriverEntry function passes to the miniport’s HwVidFindAdapter function.

  5. Call VideoPortInitialize with the pointers that were input to the DriverEntry function and with pointers to the filled-in VIDEO_HW_INITIALIZATION_DATA and miniport-supplied context data, if any.