阅读:1687回复:1
为何 IoReportTargetDeviceChangeAsynchronous 总是蓝屏?
我在驱动中调用 IoReportTargetDeviceChangeAsynchronous 向用户层发送 GUID_TARGET_DEVICE_REMOVE_COMPLETE, 广播设备移除通知, 让应用程序窗口收到 WM_DEVICECHANGE 消息, 但是总是会蓝屏. 网上关于 IoReportTargetDeviceChangeAsynchronous 的信息很少, 抓狂了,有高人能为小弟解惑吗?
TARGET_DEVICE_CUSTOM_NOTIFICATION notify; notify.Version = 1; notify.Size = sizeof( TARGET_DEVICE_CUSTOM_NOTIFICATION ) + sizeof( ULONG ) - sizeof( UCHAR ); notify.FileObject = NULL; notify.NameBufferOffset = -1; RtlCopyMemory( & notify.Event, & GUID_TARGET_DEVICE_REMOVE_COMPLETE, sizeof( GUID )); *(( PULONG )( &( notify.CustomDataBuffer[0] ))) = 0; IoReportTargetDeviceChangeAsynchronous( DeviceObject, & notify, NULL, NULL ); // ... 蓝屏 |
|
沙发#
发布于:2010-04-30 17:54
看来大牛们都忙着春耕去了
|
|