Jump-start your project by learning from devs who
write Windows drivers and file systems every day.
Take an OSR seminar!

OSR is Hiring! Click here to find out more.

Windows Internals & Software Drivers Lab, Santa Clara, CA 5-9 August, 2013
Kernel Debugging & Crash Analysis for Windows Lab, Santa Clara, CA 9-13 September, 2013
Upcoming OSR Seminars:
Writing WDF Drivers for Windows Lab, Boston, MA 7-11 October, 2013
Developing File Systems for Windows, Seattle, WA 5-8 November, 2013


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 4  
15 Jun 12 17:57
Santhosh Kumar
xxxxxx@gmail.com
Join Date: 04 Mar 2010
Posts To This List: 78
Why cant I load a driver from a local directory?

I do a scH = CreateService() and get a serviceHandle successfully. Using that serviceHandle I start the service and that passes when the 8th parameter to CrestService() i.e., ServicePath name points to "....system32\drivers" but fails when it points to a local directory like c:\users\Administrator\Myapp. Question is, is there a rule that the drivers have to be loaded from the system32 or SysWow64 folders only and should not be done from any random folder? In other words can drivers be loaded from folder or they have to be in system folder?
  Message 2 of 4  
15 Jun 12 18:24
Rajnish Chauhan
xxxxxx@gmail.com
Join Date: 18 Nov 2009
Posts To This List: 43
Re: Why cant I load a driver from a local directory?

Hello, Can you please make path like this and try ? "\\??\\c:\\users\\Administrator\\Myapp.exe" Thanks, --Rc On Fri, Jun 15, 2012 at 4:57 PM, <xxxxx@gmail.com> wrote: > I do a scH = CreateService() and get a serviceHandle successfully. Using that serviceHandle I start the service and that passes when the 8th parameter to CrestService() i.e., ServicePath name points to "....system32\drivers" but fails when it points to a local directory like c:\users\Administrator\Myapp. > > Question is, is there a rule that the drivers have to be loaded from the system32 or SysWow64 folders only and should not be done from any random folder? > > In other words can drivers be loaded from folder or they have to be in system folder? > > --- > NTDEV is sponsored by OSR > > For our schedule of WDF, WDM, debugging and other seminars visit: <...excess quoted lines suppressed...>
  Message 3 of 4  
15 Jun 12 18:47
Santhosh Kumar
xxxxxx@gmail.com
Join Date: 04 Mar 2010
Posts To This List: 78
RE: Why cant I load a driver from a local directory?

Thanks for the tip but it did not work. I still get "File Not Found" error number 2 and now my path looks like: "\\??\\c:\\users\\Administrator\\Myapp\MyDriver.sys" The driver is very much there I dontg know why I get "File not found"
  Message 4 of 4  
15 Jun 12 19:52
Santhosh Kumar
xxxxxx@gmail.com
Join Date: 04 Mar 2010
Posts To This List: 78
RE: Why cant I load a driver from a local directory?

Please ignore this issue. The program did work on other systems without any problems. The system where it was failing I was told has some other OS related issues. So the answer to my questions is "Yes it can be done". Thanks to Rajanish.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 09:02.


Copyright ©2012, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license