求教:设备意外删除后收不到IRP_MN_REMOVAL_DEVICE?

reedvv 2008-04-06 04:51:39
为什么SURPRISE_REMOVE后没有REMOVE_DEVICE

小弟写的一个USB驱动程序在安装完成之后,插入设备,设备正常启动,然后直接拔出设备,有时候会出现收不到IRP_MN_REMOVAL_DEVICE的现象。
在log中,IRP序列为:
1)IRP_MN_QUERY_DEVICE_RELATION 连续收到2次
2)IRP_MN_SURPRISE_REMOVAL
3)。。。。 (没有了,驱动不能退出,此时没有插设备。)


然而再此插入设备后,从log信息看,在设备正常启动后,那个迟迟没有收到的IRP_MN_REMOVAL_DEVICE紧接着居然又收到了。


请问意外删除后没有收到系统发出的IRP_MN_REMOVAL_DEVICE的原因一般都会有哪些呢?可以用什么样的方法来跟踪呢?


请各位大侠赐教,非常感谢
...全文
35 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
UltraBejing 2008-05-01
  • 打赏
  • 举报
回复
没遇到过这种情况.
reedvv 2008-04-08
  • 打赏
  • 举报
回复
还有一个问题,就是驱动程序经常打开的系统资源句柄一般都会有哪些?
IRPTrace2.00.002.zip ,IRP跟踪工具,支持Windows7。 IRPTrace 2.00.002, Build Date September 23, 2015 File name = README.TXT ====================================================================== CONTENTS ========= 1) IRPTrace Components 2) Release Notes 3) Known problems & limitations 4) Known bugs 5) Update to the documentation 6) List of supported I/O requests We strongly recommend that you read the following information about this release. 1) IRPTrace Components ===================== README.TXT - This file HOWTOREG.TXT - How to register IRPTrace and contact APSoft IRPTrace.EXE - Main application module IRPDRV.SYS - Driver for Windows NT/2000/XP/Server 2003 TERMINAL - Terminal log file TERMINAL.DLL - IRPTrace library UNINSDRV.DLL - IRPTrace library TSCUST.DLL - IRPTrace library IRPTRACE.CHM - Help file TIPS.TXT - 'Tip of the Day' tips GUID.INI - GUID database IRPTRACE.INI - Driver uninstallation information UNINST.ISU - Installation/uninstallation log file 2) Release Notes ================ Release 2.00.002 1. Fixed processing of IRPs at elevated IRQLs 2. Added support for Windows 10 Release (Build 10240) 3. Corrected processing of USB IOCTLs 4. Release 2.00.001 1. Added support for x64 Windows. 2. Added support for Windows Vista, 7 and 8.x. 3. Added decoding of all USB kernel-mode messages. 4. Added decoding of all CDB messages. 5. Revised Terminal tracing. 6. Revised on-line help file. 7. Revised list of known IOCTLs. 8. Revised list of known GUIDs. Release 1.00.007 1. Added support for Microsoft Windows Vista (?). 2. Redesign right panel view. 3. Fix bug with processing of Image hooks. 4. Several minor bugs were fixed. Release 1.00.006 1. A BSOD (blue screen) was fixed, which appeared o

21,597

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧