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:

Solved (Was: [Slightly OT] Can't load my WDM driver under 98.)

OSR_Community_UserOSR_Community_User Member Posts: 110,217
From: "Matt A." <[email protected]>
Sent: Tuesday, April 25, 2000 9:43 PM

> I have a WDM driver that loads and works fine under Windows 2000. Under
> Windows 98, however, I get an error 192 from the Add Hardware Wizard
> Plug and Play installation which, intepreted as a Win32 error code, means


Well, it turns out error 192 displayed by the Wizard is not
ERROR_EXE_MARKED_INVALID -- it not a Win32 error at all. Neither does it
appear to be a Configuration Manager or Device Installer error. I don't
know what kind of error code it is, but apparently it means the Windows
cannot locate a file specified in the .inf. How as a developer you're
supposed to know this, I can't figure out.

In anycase, I tracked the 192 problem down to having a [SourceDisksNames]
section that looked like this:


When I changed it to the following, error 192 went away and Windows starting
loading my driver.



> That is, I have created a registry key
> "HKLM\System\CurrentControlSet\Services\MyDriver" containing an
> string value (all modelled after some existing entries I found there) and
> passing the string "MyDriver" to NtKernLoadDriver() as a UNICODE_STRING.
> driver file is at the location specified by "ImagePath" (the same place,
> fact, that PELDR_LoadModule() is able to load it from). Am I missing
> something else?

I finally got NtKernLoadDriver() to work too -- verifying that my driver was
indeed a valid WDM driver as far as Win98 is concerned. I had been somewhat
misled by documentation which described the parameter to NtKernLoadDriver()
as being the "name of the driver's service key under
\HKLM\System\CurrentControlSet\Services". The problem was that I was
specifying only the "leaf" name of my service key (that is, literally just
"MyDriver") and not the whole branch. If the docs had said "*path* of the
driver's service key" I probably wouldn't have wasted any time on this.

Of course, you're also supposed to pass an NT Object Manager-style path like
"\Registry\Machine\System\CurrentControlSet\Services\MyDriver", not
"\HKLM\System\CurrentControlSet\Services" like the docs suggest. Thanks to
NuMega for an example of this at their Web site

- Matt
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!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online