Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

WDM: no display driver calls the HwVidStartIo of my miniport driver

UltrasickUltrasick Member Posts: 7

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

Also, when I start the display program from the control panel, I get the following message:

The currently selected graphics driver cannot be used. It was written for a previous version of Windows, and is no longer compatible with this version of Windows.

The system has been started using the default VGA driver.


This is really frustrating. I have no idea what Windows wants from me. Does someone know what I could do to figure out?

Thank you.


  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,559
    edited December 2021

    I've forgotten the details now, and I am trying to find them, but yes, you have to do a registry tweak to tell the system which display drivers your miniport is compatible with. What operating system are you testing? That error message implies that you are trying to use an NT 3.51 (that is, "user mode") display driver with an NT 4.0 system that uses "kernel mode" display drivers.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • UltrasickUltrasick Member Posts: 7
    edited December 2021

    Thank you for your reply, Tim Roberts.

    I was using NT 5.0 (Windows 2000) for my tests.

    The only thing my driver does in this area is to announce that it is VGA compatible. Here is the relevant part of the install section of my .inf-file:

    AddReg = Treiberkonfiguration.Registrierung

    HKR, , VgaCompatible, 0x10001, 0x1

    And here is the rest of my .inf-file if it is somehow relevant:

    I also figured out, that the error message seems to originate from themeui.dll. It contains strings as resources with the following:

    MSG_INVALID_OLD_DISPLAY_DRIVER = "The currently selected graphics display driver can not be used. It was written for a previous version of Windows, and is no longer compatible with this version of Windows.\n\nThe system has been started using the default VGA driver.\n\nPlease contact your hardware manufacturer to get an upgraded driver, or select one of the Microsoft provided drivers."
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,559

    Your INF file is not enough. Remember, the miniport doesn't do any of the drawing. It just sets up the video modes. The drawing is all done in the display driver, which gets installed with an INI file. I still haven't been able to find the old references for how to hook up the two.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • UltrasickUltrasick Member Posts: 7
    edited December 2021

    Seems as my last message got caught by the spam filter and the admin doesn't manually review the potential spam.
    Anyway ... I tried to add

    HKR, , InstalledDisplayDrivers, 0x10000, vga, vga256, vga64k

    to my .inf-file to tell the system to use the vga-display driver. But after rebooting the system always starts with a blue screen saying that the function KeQuerySystemTime of ntoskrnl.exe tried to write at 0xFF FF FF FC because the function was called with the value 0xFF FF FF F8 for the input parameter CurrentTime. My driver does not use this function and my HwVidStartIo still doesn't get called.
    Oh man, it's been more than a week now that I am trying to figure out how to get Windows calling HwVidStartIo but still no success.

    Post edited by Ultrasick on
  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 9,077

    Seems as my last message got caught by the spam filter and the admin doesn't manually review the potential spam.

    We do manually review the list. When you notice a post goes missing and ask us to do so. Like it says in the sticky post at the top of this forum, right?

    Please follow the rules, and avoid complaining about what happens when you don’t. Please.


    Peter Viscarola

  • UltrasickUltrasick Member Posts: 7
    edited December 2021

    I read that sticky post and followed the rules by not reporting it.

    If this happens to you, there are two things you can do:

    1. Chill for a bit and wait for a mod/admin to notice. If it's not spam, we'll mark it as such. If you've been around awhile and/or your post is clearly technical and not lame, we'll mark your account as being known good, so you will never get caught in the spam filters again.

    So my understanding was, that 2. (reporting) was not necessary.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 9,077

    Well, given that you didn’t “wait for an admin to notice” long enough (which over the holidays could be, admittedly, many weeks) your only other option was #2 “Post a plea in the A&A” section.

    Because, you’ll notice the very next paragraph that says ”What I'd appreciate is you not posting the same query again. This just makes more work for the mods (we have to merge the replies, delete one of the posts, etc.).” Which is what you did. Along with a complaint.

    Look, I get that you’re frustrated and would dearly like an answer to your problem. And, believe me, if I knew the answer I’d tell you. Now, behave and don’t be naughty going forward.


    Peter Viscarola

  • Marcel_RuedingerMarcel_Ruedinger Member Posts: 176

    If Windows tells us that our display driver does not match the operating system, then we write a display driver that does match. We use the correct tool chain corresponding to the operating system: NT 4.0 or W2K DDK (Device Driver Kit). When using this old DDK version, then we will find a very nice and simple working virtual display driver sample (miniport.sys/display.dll pair). This source code sample can easily be compiled, installed, run, debugged and morphed into a customer specific VGA compatible NT 4.0 or W2K display driver.

    PS: Why does the title inlude "WDM"? The term "WDM" is not related to the topic in any way. The current WDK uses the terms "XDDM" and "XPDM" for legacy display drivers. Actually this legacy display driver model existed long before WDM was introduced.

    Marcel Rüdinger

  • UltrasickUltrasick Member Posts: 7
    edited January 2022

    Thank you for your reply, Marcel Rüdiger.

    The error message is incorrect and the error is not in the display driver. There was an error in the .inf-file of my miniport driver. I fixed it already and now it works fine.

    When I saw that the admin of this forum adding a senseless provocation to every post, trying to escalate a discussion about who broke which rule I decided to move to a different forum and not further post any update about this issue here.

    So this issue is solved and can be closed.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 9,077

    And that’s the last we will be hearing from Mr Ultrasick.


    Peter Viscarola

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Internals & Software Drivers 19-23 June 2023 Live, Online
Writing WDF Drivers 10-14 July 2023 Live, Online
Kernel Debugging 16-20 October 2023 Live, Online
Developing Minifilters 13-17 November 2023 Live, Online