-
-
[求助]驱动卸载蓝屏
-
发表于:
2010-8-26 10:55
7304
-
#pragma PAGEDCODE
VOID HelloDDKUnload (IN PDRIVER_OBJECT pDriverObject)
{
PDEVICE_OBJECT pNextObj;
NTSTATUS status;
KdPrint(("Enter DriverUnload\n"));
pNextObj = pDriverObject->DeviceObject;
while (pNextObj != NULL)
{
KdPrint(("Enter DriverUnload\n"));
PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)
pNextObj->DeviceExtension;
UNICODE_STRING pLinkName = pDevExt->ustrSymLinkName;
IoDeleteSymbolicLink(&pLinkName);
pNextObj = pNextObj->NextDevice;
IoDeleteDevice( pDevExt->pDevice );
}
}这段驱动卸载的程序在xp下没有问题,但是在win7下卸载就会蓝屏,请教各位。我用widbg查看
说这行pNextObj = pNextObj->NextDevice;有错,但是小弟实在是不知道这行为什么错了,请教各位大侠
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课