|
[求助]枚举进程所有线程的一个蓝屏信息
谢谢楼上 我看了里面的值 是有的地方是无效地址,经过我的修改,之前的地方不蓝屏了 但是又有了新的问题,比如杀一个电驴的进程 程序单步运行可以把电驴的界面杀掉,但是后台进程仍在,且如果不单步运行,就会蓝屏。附改进后的代码,求教各位。小弟搞了好几天了, PETHREAD NTAPI GetNextProcessThread( IN PEPROCESS Process, IN PETHREAD Thread OPTIONAL ) { PETHREAD FoundThread = NULL; PLIST_ENTRY ListHead, Entry; KSPIN_LOCK QLock; KIRQL oldirql; //PAGEDCODE KeInitializeSpinLock(&QLock); KeAcquireSpinLock(&QLock, &oldirql); // KeEnterCriticalRegionThread(&Thread->Tcb); if (Thread) { Entry = (PLIST_ENTRY)((ULONG)(Thread)+uThreadListEntryOffset); if (MmIsAddressValid(Entry)) { Entry=Entry->Flink; } } else { Entry = (PLIST_ENTRY)((ULONG)(Process)+uThreadListHeadOffset); if (MmIsAddressValid(Entry)) { Entry = Entry->Flink; } } ListHead = (PLIST_ENTRY)((ULONG)Process + uThreadListHeadOffset); while (ListHead != Entry) { FoundThread = (PETHREAD)((ULONG)Entry - uThreadListEntryOffset); if (MmIsAddressValid(FoundThread)) { if (ObReferenceObject(FoundThread)) //Entry = Entry->Flink; break; }else { FoundThread = NULL; if (MmIsAddressValid(Entry)) { Entry = Entry->Flink; } break; //Entry = Entry->Flink; } //if (MmIsAddressValid(Entry)) //{ //Entry = Entry->Flink; //} } KeReleaseSpinLock(&QLock, oldirql); //Entry = Entry->Flink; if (Thread&&MmIsAddressValid(Thread)) ObDereferenceObject(Thread); return FoundThread; } 外边的调用是: __try { for(Thread = GetNextProcessThread(pObjEpro,NULL); MmIsAddressValid(Thread); //Thread != NULL; Thread = GetNextProcessThread(pObjEpro, Thread)) { Status = (NTSTATUS)(PspTerminateThreadByPt)(Thread,0); } // __asm int 3 } __except(EXCEPTION_EXECUTE_HANDLER) { } |
|
[求助]驱动卸载蓝屏
谢谢各位 问题已解决 是赋值的问题 |
|
[求助]驱动卸载蓝屏
谢谢你的回答 但是应该不是这个问题 因为我都没有使用内核的结 ,就一个卸载例程搞一天了。。。没搞出来 疯了 |
|
[求助]驱动卸载蓝屏
自己顶一下 哪位大哥帮帮忙啊 |
|
[求助]关于指针的一个问题
谢谢楼上 已经搞定 |
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值