mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Only bail on exact match of file against shell processes. Closes #1118
This commit is contained in:
@@ -36,14 +36,15 @@ static BOOL add_hooks()
|
||||
wchar_t curFile[512];
|
||||
GetModuleFileNameW(NULL, curFile, 512);
|
||||
|
||||
wstring f = strlower(wstring(curFile));
|
||||
wstring f = basename(strlower(wstring(curFile)));
|
||||
|
||||
// bail immediately if we're in a system process. We don't want to hook, log, anything -
|
||||
// this instance is being used for a shell extension.
|
||||
if(f.find(L"dllhost.exe") != wstring::npos || f.find(L"explorer.exe") != wstring::npos)
|
||||
if(f == L"dllhost.exe" || f == L"explorer.exe")
|
||||
{
|
||||
#ifndef _RELEASE
|
||||
OutputDebugStringA("Hosting " STRINGIZE(RDOC_DLL_FILE) ".dll in shell process\n");
|
||||
OutputDebugStringA(
|
||||
"Detecting shell process! Disabling hooking in dllhost.exe or explorer.exe\n");
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user