-
-
[旧帖]
[求助]内核函数NtUserFindWindowEx
0.00雪花
-
发表于:
2011-12-29 02:20
2322
-
[旧帖] [求助]内核函数NtUserFindWindowEx
0.00雪花
写了个驱动,用MyNtUserFindWindowEx函数替换原来的NtUserFindWindowEx,加载和卸载都没问题,就是在运行的时候偶尔会蓝屏。
NTSTATUS MyNtUserFindWindowEx(
IN HWND hwndParent,
IN HWND hwndChild,
IN PUNICODE_STRING pstrClassName OPTIONAL,
IN PUNICODE_STRING pstrWindowName OPTIONAL,
IN DWORD dwType)
{
if(pstrClassName)
{
RtlInitUnicodeString(&protect,L"要保护的窗口类名");
if(RtlEqualUnicodeString(&protect,pstrClassName,TRUE))//这里偶尔会引起蓝屏
{
…………
}
}
result = OriginalNtUserFindWindowEx(hwndParent,hwndChild,pstrClassName,pstrWindowName,dwType);
return result;
}
错误发生在RtlEqualUnicodeString+0x10处,难道pstrClassName指向的不一定是UnicodeString?
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课