LunaHook-mirror/LunaHook/main.h

32 lines
1.1 KiB
C
Raw Normal View History

2024-02-07 20:59:24 +08:00
#pragma once
// main.h
// 8/23/2013 jichi
// Branch: ITH/IHF_DLL.h, rev 66
2024-07-21 21:04:12 +08:00
void TextOutput(const ThreadParam &tp, const HookParam &hp, TextOutput_T(*buffer), int len);
2024-02-07 20:59:24 +08:00
void ConsoleOutput(LPCSTR text, ...);
2024-07-21 21:04:12 +08:00
void NotifyHookFound(HookParam hp, wchar_t *text);
2024-02-07 20:59:24 +08:00
void NotifyHookRemove(uint64_t addr, LPCSTR name);
bool NewHook(HookParam hp, LPCSTR name);
bool NewHookJit(HookParam hp, LPCSTR name);
2024-02-07 20:59:24 +08:00
void RemoveHook(uint64_t addr, int maxOffset = 9);
2024-07-21 21:04:12 +08:00
std::string LoadResData(LPCWSTR pszResID, LPCWSTR _type);
2024-02-07 20:59:24 +08:00
inline SearchParam spDefault;
// EOF
2024-07-21 21:04:12 +08:00
int HookStrLen(HookParam *, BYTE *data);
inline std::unordered_map<uintptr_t, std::pair<JITTYPE, uintptr_t>> emuaddr2jitaddr;
inline std::unordered_map<uintptr_t, std::pair<JITTYPE, uintptr_t>> jitaddr2emuaddr;
void jitaddraddr(uintptr_t em_addr, uintptr_t jitaddr, JITTYPE);
2024-07-21 21:04:12 +08:00
void context_get(hook_stack *, PCONTEXT);
void context_set(hook_stack *, PCONTEXT);
2024-04-01 13:42:59 +08:00
2024-07-21 21:04:12 +08:00
inline std::map<uintptr_t, std::pair<std::string, HookParam>> delayinserthook;
void delayinsertadd(HookParam, std::string);
2024-05-04 13:08:39 +08:00
void delayinsertNewHook(uintptr_t);
2024-07-21 21:04:12 +08:00
inline bool dont_detach = false;
inline bool host_connected = false;