-
-
[求助]驱动卸载蓝屏
-
发表于:
2010-8-26 10:55
7307
-
#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;有错,但是小弟实在是不知道这行为什么错了,请教各位大侠
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!