Insert home path to extra data

This commit is contained in:
Changhua 2023-04-10 23:39:57 +08:00
parent 9172bcc621
commit 218a4e72bb
5 changed files with 13 additions and 3 deletions

View File

@ -6,7 +6,7 @@
#define SUPPORT_VERSION L"3.7.0.30"
WxCalls_t wxCalls = {
0x2366538, // Login Status
{ 0x236607C, 0x23660F4, 0x2366128 }, // User Info: wxid, nickname, mobile
{ 0x236607C, 0x23660F4, 0x2366128, 0x2386F7C }, // User Info: wxid, nickname, mobile, home
0x521D30, // Send Message
/* Receive Message:
Hook, call, type, self, id, msgXml, roomId, wxId, content, extra */

View File

@ -7,6 +7,7 @@
#include "load_calls.h"
#include "receive_msg.h"
#include "user_info.h"
#include "util.h"
// Defined in rpc_server.cpp
@ -90,6 +91,9 @@ void DispatchMsg(DWORD reg)
}
wxMsg.content = GetStringByAddress(*p + g_WxCalls.recvMsg.content);
wxMsg.extra = GetStringByAddress(*p + g_WxCalls.recvMsg.extra);
if (!wxMsg.extra.empty()) {
wxMsg.extra = GetHomePath() + "\\" + wxMsg.extra;
}
{
unique_lock<mutex> lock(gMutex);

View File

@ -6,6 +6,7 @@ typedef struct UserInfoCall {
DWORD wxid;
DWORD nickName;
DWORD mobile;
DWORD home;
} UserInfoCall_t;
typedef struct RecvMsg {

View File

@ -6,7 +6,9 @@
extern WxCalls_t g_WxCalls;
extern DWORD g_WeChatWinDllAddr;
std::string GetSelfWxid()
string GetHomePath() { return GET_STRING(g_WeChatWinDllAddr + g_WxCalls.ui.home); }
string GetSelfWxid()
{
DWORD wxidType = 0;
try {

View File

@ -2,4 +2,7 @@
#include <string>
std::string GetSelfWxid();
using namespace std;
string GetHomePath();
string GetSelfWxid();