aboutsummaryrefslogtreecommitdiff
path: root/src/hook.cpp
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2023-12-03 20:56:17 +0100
committerJan200101 <sentrycraft123@gmail.com>2023-12-03 20:56:17 +0100
commit34a28c6fa04c5888c4e687c5e11da185613caa85 (patch)
treeb5cb0fd5e75606dda5679f2bf56e4a1351be4ccc /src/hook.cpp
parent0de5d2f60eeb538db9a7fb1f86735f60c8b41891 (diff)
downloadSouthRPC-stash/console_hook.tar.gz
SouthRPC-stash/console_hook.zip
stash: console hookstash/console_hook
Diffstat (limited to 'src/hook.cpp')
-rw-r--r--src/hook.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/hook.cpp b/src/hook.cpp
new file mode 100644
index 0000000..484ea76
--- /dev/null
+++ b/src/hook.cpp
@@ -0,0 +1,17 @@
+#include "internal/engine/gameconsole.h"
+
+#include "ns_plugin.h"
+
+extern "C" {
+ typedef void* (*CreateInterface)(const char *pName, int *pReturnCode);
+}
+
+void hook_console_print(HMODULE dllPtr)
+{
+ assert(dllPtr);
+
+ CreateInterface pCreateInterface = (CreateInterface)GetProcAddress(dllPtr, "CreateInterface");
+ assert(pCreateInterface);
+
+ CGameConsole* pGameConsole = (CGameConsole*)pCreateInterface("GameConsole004", NULL);
+}