This commit is contained in:
恍兮惚兮 2024-11-16 20:42:53 +08:00
parent 1b28a2cfad
commit 69c422090f
2 changed files with 7 additions and 3 deletions

View File

@ -2,10 +2,12 @@
#include "MinHook.h"
void HIJACK();
void detachall();
std::unordered_map<uint64_t, std::pair<JITTYPE, uintptr_t>> emuaddr2jitaddr;
std::unordered_map<uintptr_t, std::pair<JITTYPE, uint64_t>> jitaddr2emuaddr;
HMODULE hLUNAHOOKDLL;
WinMutex viewMutex;
CommonSharedMem *commonsharedmem;
Synchronized<std::map<uint64_t, std::pair<std::string, HookParam>>> delayinserthook; // 谜之这个必须在这里定义可以extern+cpp里定义或者只在这里写不能在main.h里inline定义否则会在v141_xp上编译后会崩。
Synchronized<std::map<uint64_t, std::pair<std::string, HookParam>>> delayinserthook;
namespace
{
AutoHandle<> hookPipe = INVALID_HANDLE_VALUE,

View File

@ -18,8 +18,10 @@ inline SearchParam spDefault;
// EOF
int HookStrLen(HookParam *, BYTE *data);
inline std::unordered_map<uint64_t, std::pair<JITTYPE, uintptr_t>> emuaddr2jitaddr;
inline std::unordered_map<uintptr_t, std::pair<JITTYPE, uint64_t>> jitaddr2emuaddr;
// v141_xp上定义inline std::map会直接导致dll detach后发生崩溃。
extern std::unordered_map<uint64_t, std::pair<JITTYPE, uintptr_t>> emuaddr2jitaddr;
extern std::unordered_map<uintptr_t, std::pair<JITTYPE, uint64_t>> jitaddr2emuaddr;
void jitaddraddr(uint64_t em_addr, uintptr_t jitaddr, JITTYPE);
void context_get(hook_stack *, PCONTEXT);