1
0
mirror of synced 2024-12-18 07:05:52 +01:00
bananatools/taikohook/amfw.c

37 lines
825 B
C
Raw Normal View History

2023-01-03 05:35:53 +01:00
#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
2023-01-03 05:35:53 +01:00
* 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
2023-01-03 05:35:53 +01:00
* 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");
2023-01-03 05:35:53 +01:00
if (hMod == NULL) {
dprintf("AMFW: DLL not found, disabling\n");
return S_FALSE;
}
dprintf("AMFW: Found AMFrameWork Handle\n");
path_hook_insert_hooks(hMod);
2023-01-03 05:35:53 +01:00
return S_OK;
}