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 have posted before about the non-PnP ISA driver that I've been working on off and on for the last few months. I have gotten the 32 bit version mostly working at this point. I can run the individual diagnostic apps that access the driver, but actual normal use of the driver is with a suite of programs.
The hardware is an 8 bit ISA card because that's what the common bus was when the project was started. The applications were first released for Windows 2.0. Driving devices was more wild west then than it is now. But the applications live on because that is the way things happen with industrial systems.
I am currently working to replace all the old programs with one new program that does the bulk of the work with updated utilities. But it isn't quite ready yet. To collect data you need to run a suite of programs at the same time, each of which can access the hardware. With the old ISA driver this worked fine.
With the new driver I can run any single app, but when I try to run a second app that accesses the driver, I get errors that the driver is denying permission to access.
All of the suite programs access the driver through a DLL which is used by all the apps. When an instance of the DLL is started, in DllMain->DLL_PROCESS_ATTACH a function is called that calls the CreateFile for the driver. CreateFile has FILE_SHARE_READ|FILE_SHARE_WRITE share permissions, but the second app can't get access.
I'm guessing that there is something with the WDM structure that denies more than one app from accessing a driver at a time for security reasons? I'm checking to see if my guess is correct.
If so I guess the new driver isn't going to work until I rewrite the code so it opens and closes the driver for each access rather than at app start.
|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||30 January 2023||Live, Online|
|Developing Minifilters||20 March 2023||Live, Online|
|Internals & Software Drivers||17 April 2023||Live, Online|
|Writing WDF Drivers||22 May 2023||Live, Online|
Are you calling WdfDeviceInitSetExclusive? That's how you trigger this behavior.
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
That was it! It works perfectly now!
It was a long haul to get the 32 bit driver working, but the 64 bit driver worked the first time without a hitch (once I got it installed). Now I have to figure out signing. I see there are some discussions here, I'll look them over.