drivertype=fs和drivertype=wdm

来源:互联网 发布:卖家如何开通淘宝客 编辑:程序博客网 时间:2024/06/10 01:19

转载自:http://www.osronline.com/showThread.CFM?link=130074

貌似老外都不大建议使用这个选项


25 Apr 08 08:12
ntdev member 37845
xxxxxx@gmail.com
Join Date:
Posts To This List: 7
How does DRIVERTYPE value affect driver behaviour?

Hi,I'm a bit confused about how does the DRIVERTYPE value affect a driver built. DDK docs state that the Build utility sets the path for header files during the build stage depending on the value (WDM or not). Also I found that the value of WDM does not allow the driver to be unloaded whereas FS value allows this. Could you point me to the right information source which explains on how the DRIVERTYPE affects the driver behaviour?Thanks,Sergey
  Message 2 of 5  
25 Apr 08 08:23
Don Burn
xxxxxx@acm.org
Join Date:
Posts To This List: 3179
Re: How does DRIVERTYPE value affect driver behaviour?

The definitive information for this is to look at makefile.new in the bin directory of the ddk/wdk you are using.  I have had no problem unloading WDM drivers, so you seem to have a bug.  Personally, I don't use DRIVERTYPE, unless I inherit a project with it.-- Don Burn (MVP, Windows DDK)Windows 2k/XP/2k3 Filesystem and Driver ConsultingWebsite: http://www.windrvr.comBlog: http://msmvps.com/blogs/WinDrvrRemove StopSpam to reply<xxxxx@gmail.com> wrote in message news:105394@ntdev...> Hi,> I'm a bit confused about how does the DRIVERTYPE value affect a driver > built. DDK docs state that the Build utility sets the path for header > files during the build stage depending on the value (WDM or not). Also I > found that the value of WDM does not allow the driver to be unloaded > whereas FS value allows this. Could you point me to the right information > source which explains on how the DRIVERTYPE affects the driver behaviour?>> Thanks,> Sergey<...excess quoted lines suppressed...>
  Message 3 of 5  
25 Apr 08 09:11
ntdev member 37845
xxxxxx@gmail.com
Join Date:
Posts To This List: 7
RE: How does DRIVERTYPE value affect driver behaviour?

Don,I had DRIVERTYPE=WDM for my driver and the DriverUnload was never called. Once I changed DRIVERTYPE to FS it begun calling.Thanks,Sergey
  Message 4 of 5  
25 Apr 08 10:45
Peter Viscarola (OSR)
xxxxxx@osr.com
Join Date:
Posts To This List: 4121
List Moderator
RE: How does DRIVERTYPE value affect driver behaviour?

DRIVERTYPE=WDM is a remnant of a time long past.  IIRC, it control whether you link with a WDM compatibility library for Win9x.Like Mr. Burn, we don't use DRIVERTYPE=WDM here at OSR, we don't recommend people use it, and when we find it in a project we inherit we delete it.It's just more legacy squirrel logic to worry about,PeterOSR
  Message 5 of 5  
25 Apr 08 10:52
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8661
RE: How does DRIVERTYPE value affect driver behaviour?

By unload I think you mean net stop 'your driver' or going to services.msc and stopping the driver manually.  If this is what you mean, this is by design.  You cannot use the service control manager (SCM) to unload a pnp driver sinces its loaded state is determined by the number of pnp devices it controls.  Even if your driver is not really a pnp driver and you set this in your sources, your driver is considered a pnp driver.  This flag will set a bit in the PE header of your driver.  This bit was used on win9x to load only WDM .sys drivers (vs any NT .sys driver) and is used by the io and pnp managers as a hint as to what the driver intends to be (pnp or legacy).d-----Original Message-----From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.comSent: Friday, April 25, 2008 5:11 AMTo: Windows System Software Devs Interest ListSubject: [ntdev] How does DRIVERTYPE value affect driver behaviour?Hi,I'm a bit confused about how does the DRIVERTYPE value affect a driver built. DDK docs state that the Build utility sets the path for header files during the build stage depending on the value (WDM or not). Also I found that the value of WDM does not allow the driver to be unloaded whereas FS value allows this. Could you point me to the right information source which explains on how the DRIVERTYPE affects the driver behaviour?Thanks,Sergey---NTDEV is sponsored by OSRFor our schedule of WDF, WDM, debugging and other seminars visit:http://www.osr.com/seminarsTo unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer