Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
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: https://www.osr.com/osr-learning-library/
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.
...
http://ontheserver.de/temp/2021-12-27/Fehlermeldung.png
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.
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 |
Comments
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.
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:
And here is the rest of my .inf-file if it is somehow relevant:
http://ontheserver.de/temp/2021-12-27/graphic.inf
I also figured out, that the error message seems to originate from themeui.dll. It contains strings as resources with the following:
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.
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
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.
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
Peter Viscarola
OSR
@OSRDrivers
I read that sticky post and followed the rules by not reporting it.
So my understanding was, that 2. (reporting) was not necessary.
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
Peter Viscarola
OSR
@OSRDrivers
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
datronicsoft
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.
And that’s the last we will be hearing from Mr Ultrasick.
Peter
Peter Viscarola
OSR
@OSRDrivers