I am currently have a driver I am trying to get working on Windows 7 that is throwing a "Code 37" error code. According to MS, it sounds like this is due to some sort of issue when the driver's main function is called (it seems to be called DriverEntry() and returns a GO/FAIL code depending on how it is initialized.) However, as the code is provided as a non-debug symbol binary, I don't think there is any way for me to run some sort of debugger to trace how exactly it fails - meaning it could be anything from the driver not liking the build number of Windows, a dynamic library missing, or perhaps it just doesn't like the weather...
Is there any way for me to get more info as to why a driver fails when initialized, such as perhaps it panicking when files are not found? Maybe there is some sort of debugger that works in this situation?
Understanding/Debugging Driver Error Codes with Windows 7
Re: Understanding/Debugging Driver Error Codes with Windows
Since all calls a driver can do (including file access etc.) have to go through the Windows kernel, it is possible to use the easily available Windows debug symbols to at least figure out what the driver is trying to do. All you'd need for this is a copy of WinDbg that works with Windows 7. I got mine from the "Debugging Tools for Windows" (google that term and it should come up pretty soon)
Re: Understanding/Debugging Driver Error Codes with Windows
Be sure to check the Event Log.
Re: Understanding/Debugging Driver Error Codes with Windows
Okay, thank you - I'll investigate that. Sounds exactly what I was wanting to do.3155ffGd wrote:Since all calls a driver can do (including file access etc.) have to go through the Windows kernel, it is possible to use the easily available Windows debug symbols to at least figure out what the driver is trying to do. All you'd need for this is a copy of WinDbg that works with Windows 7. I got mine from the "Debugging Tools for Windows" (google that term and it should come up pretty soon)
Actually one of the first things I did. It did not seem to give me any more helpful info than what device manager said, just repeated that the driver had failed to initialize due to Error 37 with no additional detail or elaboration.voidp wrote:Be sure to check the Event Log.
Re: Understanding/Debugging Driver Error Codes with Windows
You can also try using SysInternals' DebugView to see if the driver writes any kind of debug strings. See the Capture menu for different kinds of output.
https://live.sysinternals.com/Dbgview.exe
But...
Is the driver the /correct/ driver?
Can you see the device ('unknown device') in Device Manager (or HwInfo64, AIDA64, etc.)?
Have you tried automatically downloading a driver?
Have you researched its PnP Hardware ID as a means for locating the correct driver?
https://live.sysinternals.com/Dbgview.exe
But...
Is the driver the /correct/ driver?
Can you see the device ('unknown device') in Device Manager (or HwInfo64, AIDA64, etc.)?
Have you tried automatically downloading a driver?
Have you researched its PnP Hardware ID as a means for locating the correct driver?
Re: Understanding/Debugging Driver Error Codes with Windows
Yes, it is the correct driver - I'm trying something unconventional though, but the driver and the DEV ID it is being installed onto is definitely right.voidp wrote:Is the driver the /correct/ driver?