mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-09 13:51:31 +00:00
On x86 windows IsWow64 returns false always. Closes #66
* On x64 windows IsWow64 returns true for 32bit programs, but on x86 windows there is no such thing as Wow64 so it returns false. Detect this by checking our own processes Wow64 nature (which should always return true if Wow64 is a thing).
This commit is contained in:
1 parent
6e9b08e382
commit
d10e9e239f
1 file changed
+15
-1
@@ -216,7 +216,21 @@ uint32_t Process::InjectIntoProcess(uint32_t pid, const wchar_t *logfile, const
|
||||
}
|
||||
|
||||
#if !defined(WIN64)
|
||||
if(!isWow64)
|
||||
BOOL selfWow64 = FALSE;
|
||||
|
||||
HANDLE hSelfProcess = GetCurrentProcess();
|
||||
|
||||
success = IsWow64Process(hSelfProcess, &selfWow64);
|
||||
|
||||
CloseHandle(hSelfProcess);
|
||||
|
||||
if(!success)
|
||||
{
|
||||
RDCERR("Couldn't determine bitness of self");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(selfWow64 && !isWow64)
|
||||
{
|
||||
RDCERR("Can't capture x64 process with x86 renderdoc");
|
||||
CloseHandle(hProcess);
|
||||
|
||||
Reference in new issue
Block a user