aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dllmain.cpp
diff options
context:
space:
mode:
authorKittenPopo <Pokeberry123@gmail.com>2022-07-04 17:19:57 -0700
committerGitHub <noreply@github.com>2022-07-05 02:19:57 +0200
commit5995a7462da970ee2102a0dd0047ebbcef519dd0 (patch)
treece8a18c48a74ccedb8806ad04f230283203d9f37 /NorthstarDedicatedTest/dllmain.cpp
parent22a1ce87fa1205aa15eff81d78dc7c0e87c251c9 (diff)
downloadNorthstarLauncher-5995a7462da970ee2102a0dd0047ebbcef519dd0.tar.gz
NorthstarLauncher-5995a7462da970ee2102a0dd0047ebbcef519dd0.zip
Fix KHook hooking order to prevent missed hooks (#213)
Diffstat (limited to 'NorthstarDedicatedTest/dllmain.cpp')
-rw-r--r--NorthstarDedicatedTest/dllmain.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/dllmain.cpp b/NorthstarDedicatedTest/dllmain.cpp
index 08081d78..04cb883b 100644
--- a/NorthstarDedicatedTest/dllmain.cpp
+++ b/NorthstarDedicatedTest/dllmain.cpp
@@ -285,9 +285,15 @@ bool InitialiseNorthstar()
// mod manager after everything else
AddDllLoadCallback("engine.dll", InitialiseModManager);
- // activate exploit fixes
- AddDllLoadCallback("server.dll", ExploitFixes::LoadCallback);
- AddDllLoadCallback("engine.dll", ExploitFixes::LoadCallbackEngine);
+ {
+ // activate multi-module exploitfixes callbacks
+ constexpr const char* EXPLOITFIXES_MULTICALLBACK_MODS[] = {"client.dll", "engine.dll", "server.dll"};
+ for (const char* mod : EXPLOITFIXES_MULTICALLBACK_MODS)
+ AddDllLoadCallback(mod, ExploitFixes::LoadCallback_MultiModule);
+
+ // activate exploit fixes later
+ AddDllLoadCallback("server.dll", ExploitFixes::LoadCallback_Full);
+ }
// run callbacks for any libraries that are already loaded by now
CallAllPendingDLLLoadCallbacks();