阅读:1410回复:0
在什么情况下DISPATCHCLOSE不会被调用? 此时DISPATCHCLEANUP一定会被调用么?
目前有一个多端口USB虚拟串口的驱动程序. 偶尔出现蓝屏现象,分析DUMP:
DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS (ce) A driver unloaded without cancelling timers, DPCs, worker threads, etc. The broken driver's name is displayed on the screen. Arguments: Arg1: f77d2bc7, memory referenced Arg2: 00000008, value 0 = read operation, 1 = write operation Arg3: f77d2bc7, If non-zero, the instruction address which referenced the bad memory address. Arg4: 00000000, Mm internal code. 驱动中是在DISPATCHCREATE中创建TIMER,DPC,THREAD, DISPATCHCLOSE中进行释放. 出现这种情况我怀疑DISPATCHCLOSE在某种情况下不会被调用. 上层打开设备的句柄,没有关闭的时候,拔除设备,是否会不调用dipatchclose? 这种情况下dispatchcleanup一定会被调用么? 因为我看推荐的清除资源的地方是cleanup, 而不是close. 因程序是别人写好的,我刚接手,这方面还是菜鸟一个,没有确定前,不宜轻易修改. 请各位大侠指点一二. 谢谢! ![]() |
|