37 lines
825 B
C
37 lines
825 B
C
#include <windows.h>
|
|
#include "taikohook/config.h"
|
|
|
|
#include "hook/table.h"
|
|
|
|
#include "hooklib/path.h"
|
|
|
|
#include "util/dprintf.h"
|
|
|
|
/*
|
|
* AMFrameWork (AMFW) is a DLL that contains many helper classes
|
|
* for things like input, network, dongle, and other functions that
|
|
* it would be useful for us to have control of. Luckily we don't have
|
|
* to reinvent the wheel for the most part, we can just hook the functions
|
|
* that AMFW uses and let it talk to the game for us.
|
|
*/
|
|
|
|
HRESULT amfw_hook_init(wchar_t serial[13])
|
|
{
|
|
HANDLE hMod;
|
|
|
|
dprintf("AMFW: Init\n");
|
|
|
|
hMod = GetModuleHandle("AMFrameWork.dll");
|
|
|
|
if (hMod == NULL) {
|
|
dprintf("AMFW: DLL not found, disabling\n");
|
|
return S_FALSE;
|
|
}
|
|
|
|
dprintf("AMFW: Found AMFrameWork Handle\n");
|
|
|
|
path_hook_insert_hooks(hMod);
|
|
|
|
return S_OK;
|
|
}
|