drivertype=fs和drivertype=wdm

转载自: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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值