阅读:1827回复:14
请问调用IoReportTargetDeviceChangeAsynchronous为何会导致蓝屏重启
请教各位大侠,有没有人使用过IoReportTargetDeviceChangeAsynchronous()的经验?
我在DDK的protocol driver sample code中的NdisProtStatus()加入IoReportTargetDeviceChangeAsynchronous(),作为custom notification,用来由kernal-mode driver通知user-mode utility。 可是每次当IoReportTargetDeviceChangeAsynchronous()被执行时,操作系统就会蓝屏重启。 WinDbg的除错讯息如下: ******************************************************************************* * * * Bugcheck Analysis * * * ******************************************************************************* PNP_DETECTED_FATAL_ERROR (ca) PnP encountered a severe error, either as a result of a problem in a driver or a problem in PnP itself. The first argument describes the nature of the problem, the second argument is the address of the PDO. The other arguments vary depending on argument 1. Arguments: Arg1: 00000002, Invalid PDO An API which requires a PDO has been called with either an FDO, a PDO which hasn't been initialized yet (returned to PnP in a QueryDeviceRelation/BusRelations), or some random piece of memory. Arg2: 811cf390, Purported PDO. Arg3: 00000000, Driver object Arg4: 00000000 我的PDO参数(给IoReportTargetDeviceChangeAsynchronous用的)是protocol driver 在DriverEntry()中呼叫IoCreateDevice()得到的,请问这样对吗? 我检查过IoReportTargetDeviceChangeAsynchronous() 和 NdisProtStatus() 的执行IRQL都OK, 可是就是不知道发生什么回事? 请各位大侠救救我吧! *_*||| 谢谢 |
|
沙发#
发布于:2004-07-05 19:35
不对,对就不会有错了
|
|
|
板凳#
发布于:2004-07-05 20:00
不对,对就不会有错了
你使用的是哪个sample,ddk的哪个版本都没有说清楚 2000 ddk中好象没有NdisProtStatus函数。 你是什么时候调用的? 或许你把问题这些说清楚些大家会更容易知道你的问题根源 从错误信息来看你的Arg3: 00000000, Driver object是空,这恐怕不允许,你是不是调的地方有问题。 抱歉我没有时间测试。 |
|
|
地板#
发布于:2004-07-06 09:26
我使用DDK 3790的protocol driver sample code; ndisprot.
我已确认是我传错了PDO给IoReportTargetDeviceChangeAsynchronous(). 现在的问题是:After我传正确的NIC PDO, IoReportTargetDeviceChangeAsynchronous()传回的 status=0x00000103(STATUS_PENDING),并且我的user-mode utility也看不到这个PNP notification. |
|
地下室#
发布于:2004-07-06 10:48
那是Asynchronous的。
使用IoReportTargetDeviceChange如何 |
|
|
5楼#
发布于:2004-07-06 11:18
IoReportTargetDeviceChange() is running at IRQL = PASSIVE_LEVEL,
而ProtocolStatusHandler() is running at IRQL = DISPATCH_LEVEL |
|
6楼#
发布于:2004-07-06 13:08
不好意思,没有注意这个
返回pending说明下层驱动没有彻底完成IRP处理 |
|
|
7楼#
发布于:2004-07-06 16:37
请问上层要handle这个custom notification是不是要针对这个GUID注册?
|
|
8楼#
发布于:2004-07-06 17:30
请问上层要handle这个custom notification是不是要针对这个GUID注册? 你的event是自己定义的吗? |
|
|
9楼#
发布于:2004-07-06 21:34
是自己定义的
|
|
10楼#
发布于:2004-07-07 09:23
你的msn 是多少,在网上告诉你怎么操作。
|
|
|
11楼#
发布于:2004-07-07 09:55
msn怎么申请?
我有icq:276198988 感激不尽 ^_^ |
|
12楼#
发布于:2004-07-07 10:27
|
|
13楼#
发布于:2004-07-07 10:28
刚刚注册了msn:
greativan_77@hotmail.com ^_^ |
|
14楼#
发布于:2004-07-07 15:00
Allenzhang,可以加一下我吗?
我得msn是: xiaorain1@hotmail.com |
|