driverwdmminiport

Windows 2000 wdm: no display driver calls the HwVidStartIo of my miniport driver


I am writing a graphic miniport driver for Windows NT 4.0 - 5.1. I am stuck in the situation, that HwVidStartIo of my miniport driver never gets called.

I would expect that a display driver triggers the function calls by sending requests to videoprt.sys and then videoprt.sys calls my HwVidStartIo. But somehow no display driver cares about my miniport driver.

Do I need to announce or register my miniport driver to a display driver somehow?

When the system boots the flow is like this:

  1. DriverEntry gets called
  2. HwVidFindAdapter gets called
  3. HwVidFindAdapter returns NO_ERROR/0x00
  4. HwVidFindAdapter gets called
  5. HwVidFindAdapter returns ERROR_INVALID_PARAMETER/0x57
  6. HwVidFindAdapter gets called
  7. HwVidFindAdapter returns ERROR_INVALID_PARAMETER/0x57
  8. HwVidFindAdapter gets called
  9. HwVidFindAdapter returns NO_ERROR/0x00
  10. DriverEntry returns 0x00 (return value of VideoPortInitialize)
  11. HwVidInitialize gets called
  12. HwVidInitialize returns true/0x01
  13. HwVidInitialize gets called
  14. HwVidInitialize returns true/0x01

Solution

  • Ok, I figured it out.

    My .inf-file stated:

    StartType = 3 ; 3 == SERVICE_DEMAND_START

    Which might be fine for plug and play drivers. But mine is not plug and play compatible. So I had to change it to

    StartType = 1 ; 1 == SERVICE_SYSTEM_START

    Finally I can move on.