Skip to content

Commit

Permalink
Update dll name
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Oct 28, 2020
1 parent 37863c2 commit cdb12b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Common/FileSystemHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ void InstallFileSystemHooks(HMODULE hModule)
moduleHandle = hModule;

// Hook GetModuleFileName and GetModuleHandleEx to fix module name in modules loaded from memory
HMODULE h_kernel32 = GetModuleHandle(L"kernel32");
HMODULE h_kernel32 = GetModuleHandle(L"kernel32.dll");
InterlockedExchangePointer((PVOID*)&p_GetModuleFileNameA, Hook::HotPatch(Hook::GetProcAddress(h_kernel32, "GetModuleFileNameA"), "GetModuleFileNameA", GetModuleFileNameAHandler));
InterlockedExchangePointer((PVOID*)&p_GetModuleFileNameW, Hook::HotPatch(Hook::GetProcAddress(h_kernel32, "GetModuleFileNameW"), "GetModuleFileNameW", GetModuleFileNameWHandler));

Expand Down Expand Up @@ -630,7 +630,7 @@ void InstallCreateProcessHooks()
Logging::Log() << "Hooking the CreateProcess APIs...";

// Hook CreateProcess APIs
HMODULE h_kernel32 = GetModuleHandle(L"kernel32");
HMODULE h_kernel32 = GetModuleHandle(L"kernel32.dll");
InterlockedExchangePointer((PVOID*)&p_CreateProcessA, Hook::HotPatch(Hook::GetProcAddress(h_kernel32, "CreateProcessA"), "CreateProcessA", *CreateProcessAHandler));
InterlockedExchangePointer((PVOID*)&p_CreateProcessW, Hook::HotPatch(Hook::GetProcAddress(h_kernel32, "CreateProcessW"), "CreateProcessW", *CreateProcessWHandler));
}
2 changes: 1 addition & 1 deletion Resources/BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 1807
#define BUILD_NUMBER 1808

0 comments on commit cdb12b4

Please sign in to comment.