aboutsummaryrefslogtreecommitdiff
path: root/src/hook.cpp
diff options
context:
space:
mode:
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);
+}