阅读:1147回复:3
需要大虾指点乾坤(20 分啊)
我在卸载设备时,收到设备管理器传来的 IRP = IRP_MN_REMOVE_DEVICE,但总是 PAGE FAULT 在以下代码的最后一行(打印那一句)。Who can help me !!!!!!!!!!!
代码如下(一点点): case IRP_MN_REMOVE_DEVICE: if(!deviceInfo->Removed) { deviceInfo->Removed = TRUE; deviceInfo->Started = FALSE; if (deviceInfo->PortWasMapped) { MmUnmapIoSpace(deviceInfo->PortBase, deviceInfo->PortCount); deviceInfo->PortWasMapped = FALSE; } RtlInitUnicodeString(&win32DeviceName, DOS_DEVICE_NAME); IoDeleteSymbolicLink(&win32DeviceName); } DebugPrint((\"Waiting for outstanding requests\\n\")); IoReleaseRemoveLockAndWait(&deviceInfo->RemoveLock, Irp); Irp->IoStatus.Status = STATUS_SUCCESS; IoSkipCurrentIrpStackLocation(Irp); status = IoCallDriver(deviceInfo->NextLowerDriver, Irp); IoDetachDevice(deviceInfo->NextLowerDriver); IoDeleteDevice(DeviceObject); DbgPrint(\"kill you line = %d\",__LINE__); return status; |
|
沙发#
发布于:2002-11-01 23:17
你是不是函数用错了,dbgPrint()应该改成debugPrint()
|
|
板凳#
发布于:2002-11-02 10:17
我也不懂
给你个思路,估计是到最后一行时,你的驱动生涯结束了,所以可能IRQL不对了??? |
|
|
地板#
发布于:2002-11-03 17:48
不知道这位哥们改对了没有?我觉得是中断级别的问题。是不是page中断优先于你的那句打印语句dbgprint()
|
|
|