Skip to content

Commit

Permalink
Merge pull request #220 from shuen4/patch-1
Browse files Browse the repository at this point in the history
修复is_process64
  • Loading branch information
actboy168 authored May 2, 2023
2 parents 39b1819 + 06c2b99 commit a69c315
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Development/Core/ydbase/base/hook/injectdll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ namespace base { namespace hook {
if (!IsWow64Process(hProcess, &is_x64)) {
return false;
}
return !is_x64;
if (is_x64) {
// 64位系统运行32位程序
return false;// return !is_x64
}
SYSTEM_INFO systemInfo = { 0 };
GetNativeSystemInfo(&systemInfo);
if (systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL /* && !is_x64 */) {
// 32位系统运行32位程序
return false;
}
return true;// return !is_x64
}

bool injectdll_x64(const PROCESS_INFORMATION& pi, const std::wstring& dll) {
Expand Down

0 comments on commit a69c315

Please sign in to comment.