mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-14 14:01:06 +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:
@@ -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