aboutsummaryrefslogtreecommitdiff
path: root/src/hook.cpp
blob: 484ea76c412746f75a08dda4487d0077ccd6db62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
}