BetaArchive Logo
Navigation Home Database Screenshots Gallery Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 31d, 0h, 13m | CPU: 43% | MEM: 5783MB of 12287MB used
{The community for beta collectors}

Post new topic Reply to topic  [ 6 posts ] 
Author Message
 PostPost subject: Understanding/Debugging Driver Error Codes with Windows 7        Posted: Tue Feb 05, 2019 10:56 pm 
Reply with quote
FTP Access
Offline

Joined
Sun Jan 24, 2016 7:04 pm

Posts
47

Favourite OS
3790, 7601
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?


Top  Profile
 PostPost subject: Re: Understanding/Debugging Driver Error Codes with Windows        Posted: Wed Feb 06, 2019 10:40 am 
Reply with quote
FTP Access
User avatar
Offline

Joined
Wed May 02, 2012 12:57 am

Posts
367

Favourite OS
Windows NT 3.x
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)


Top  Profile
 PostPost subject: Re: Understanding/Debugging Driver Error Codes with Windows        Posted: Wed Feb 06, 2019 11:24 am 
Reply with quote
FTP Access
User avatar
Offline

Joined
Fri Jul 01, 2011 3:04 am

Posts
344
Be sure to check the Event Log.


Top  Profile
 PostPost subject: Re: Understanding/Debugging Driver Error Codes with Windows        Posted: Wed Feb 06, 2019 4:30 pm 
Reply with quote
FTP Access
Offline

Joined
Sun Jan 24, 2016 7:04 pm

Posts
47

Favourite OS
3790, 7601
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)


Okay, thank you - I'll investigate that. Sounds exactly what I was wanting to do.

voidp wrote:
Be sure to check the Event Log.


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.


Top  Profile
 PostPost subject: Re: Understanding/Debugging Driver Error Codes with Windows        Posted: Thu Feb 07, 2019 3:48 am 
Reply with quote
FTP Access
User avatar
Offline

Joined
Fri Jul 01, 2011 3:04 am

Posts
344
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?


Top  Profile
 PostPost subject: Re: Understanding/Debugging Driver Error Codes with Windows        Posted: Thu Feb 07, 2019 4:21 am 
Reply with quote
FTP Access
Offline

Joined
Sun Jan 24, 2016 7:04 pm

Posts
47

Favourite OS
3790, 7601
voidp wrote:
Is the driver the /correct/ driver?


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.


Top  Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 




Who is online

Users browsing this forum: mibrab, XDude and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2019

 

Sitemap | XML | RSS