diff options
Diffstat (limited to 'inject/injector.cpp')
-rw-r--r-- | inject/injector.cpp | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/inject/injector.cpp b/inject/injector.cpp index ecdfc1f8..4034c413 100644 --- a/inject/injector.cpp +++ b/inject/injector.cpp @@ -683,32 +683,16 @@ main(int argc, char *argv[]) hProcess = processInfo.hProcess; } - /* - * XXX: Mixed architecture don't quite work. See also - * http://www.corsix.org/content/dll-injection-and-wow64 - */ - { - typedef BOOL (WINAPI *PFNISWOW64PROCESS)(HANDLE, PBOOL); - PFNISWOW64PROCESS pfnIsWow64Process; - pfnIsWow64Process = (PFNISWOW64PROCESS) - GetProcAddress(GetModuleHandleA("kernel32"), "IsWow64Process"); - if (pfnIsWow64Process) { - BOOL isParentWow64 = FALSE; - BOOL isChildWow64 = FALSE; - if (pfnIsWow64Process(GetCurrentProcess(), &isParentWow64) && - pfnIsWow64Process(hProcess, &isChildWow64) && - isParentWow64 != isChildWow64) { - debugPrintf("error: binaries mismatch: you need to use the " + if (isDifferentArch(hProcess)) { + debugPrintf("error: binaries mismatch: you need to use the " #ifdef _WIN64 - "32-bits" + "32-bits" #else - "64-bits" + "64-bits" #endif - " apitrace binaries to trace this application\n"); - TerminateProcess(hProcess, 1); - return 1; - } - } + " apitrace binaries to trace this application\n"); + TerminateProcess(hProcess, 1); + return 1; } if (bAttachDwm && IsWindows8OrGreater()) { |