refactor(message_handler): split offset namespace
This commit is contained in:
parent
3658796a00
commit
36f30a9d0a
@ -38,7 +38,7 @@ extern QWORD g_WeChatWinDllAddr;
|
|||||||
|
|
||||||
namespace message
|
namespace message
|
||||||
{
|
{
|
||||||
namespace OsMsg = Offsets::Message;
|
namespace OsLog = Offsets::Message::Log;
|
||||||
|
|
||||||
QWORD Handler::DispatchMsg(QWORD arg1, QWORD arg2)
|
QWORD Handler::DispatchMsg(QWORD arg1, QWORD arg2)
|
||||||
{
|
{
|
||||||
@ -193,8 +193,8 @@ int Handler::EnableLog()
|
|||||||
{
|
{
|
||||||
if (isLogging) return 1;
|
if (isLogging) return 1;
|
||||||
|
|
||||||
funcWxLog = reinterpret_cast<funcWxLog_t>(g_WeChatWinDllAddr + OsMsg::LOG);
|
pLogLevel = reinterpret_cast<uint32_t *>(g_WeChatWinDllAddr + OsLog::LEVEL);
|
||||||
pLogLevel = reinterpret_cast<uint32_t *>(g_WeChatWinDllAddr + OsMsg::LOG_LEVEL);
|
funcWxLog = reinterpret_cast<funcWxLog_t>(g_WeChatWinDllAddr + OsLog::FUNCTION);
|
||||||
|
|
||||||
if (InitializeHook() != MH_OK) return -1;
|
if (InitializeHook() != MH_OK) return -1;
|
||||||
if (MH_CreateHook(funcWxLog, &PrintWxLog, reinterpret_cast<LPVOID *>(&realWxLog)) != MH_OK) return -2;
|
if (MH_CreateHook(funcWxLog, &PrintWxLog, reinterpret_cast<LPVOID *>(&realWxLog)) != MH_OK) return -2;
|
||||||
|
@ -18,8 +18,11 @@ namespace Account
|
|||||||
|
|
||||||
namespace Message
|
namespace Message
|
||||||
{
|
{
|
||||||
constexpr uint64_t LOG = 0x261B890; // 日志函数
|
namespace Log
|
||||||
constexpr uint64_t LOG_LEVEL = 0x56E4244; // 日志级别
|
{
|
||||||
|
constexpr uint64_t FUNCTION = 0x261B890; // 日志函数
|
||||||
|
constexpr uint64_t LEVEL = 0x56E4244; // 日志级别
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user