能力值:
( LV2,RANK:10 )
|
-
-
2 楼
ring3:
HANDLE myevent= CreateEvent(NULL,false,false,"myevent");
..........
DeviceIoControl(hdevice, IOCTL_READ_DEVICE_INFO,
&myevent, 4,answer,sizeof(answer), &junk, NULL))
ring0:
.......
myevent=*(PHANDLE)(Irp->AssociatedIrp.SystemBuffer);
status = ObReferenceObjectByHandle(myevent,
GENERIC_ALL,
NULL,
KernelMode,
&pMsgKEvent,
NULL);
......
KeSetEvent(pMsgKEvent, 0, FALSE);
蓝屏的话,自己调试看看,到底哪里有问题,不过我猜你蓝屏估计是DeviceIoControl里面event传错了吧,没有传入地址,我看你另一个帖子是传入的是(void *)RYYevent,这样导致你在ring0接收时EventHandle=(* (int *)buffer),得到的eventhandle无效,你跟踪一下,应该就是这里错了
|
能力值:
( LV12,RANK:600 )
|
-
-
3 楼
ObReferenceObjectByHandle((HANDLE)EventHandle,EVENT_ALL_ACCESS,*ExEventObjectType,KernelMode,(PVOID*)&RYYEvent,NULL);
没用过这种办法..不过把KernelMode改成usermode看看
|
能力值:
( LV8,RANK:130 )
|
-
-
4 楼
KEVENT RYYEvent;
应该是PKEVENT,我用PKEVENT 没蓝
|
|
|