Impl get self wxid

This commit is contained in:
Changhua
2022-09-25 11:22:24 +08:00
parent fdcb9cc54c
commit 878b152396
11 changed files with 51 additions and 15 deletions
+3
View File
@@ -16,6 +16,7 @@
using namespace std;
extern int IsLogin(void); // Defined in spy.cpp
extern wstring GetSelfWxid(); // Defined in spy.cpp
extern HANDLE g_hEvent; // New message signal
extern BOOL g_rpcKeepAlive; // Keep RPC server thread running
extern MsgQueue_t g_MsgQueue; // Queue for message
@@ -77,6 +78,8 @@ int RpcStopServer()
int server_IsLogin() { return IsLogin(); }
int server_GetSelfWxId(wchar_t wxid[20]) { return wcscpy_s(wxid, 20, GetSelfWxid().c_str()); }
void server_EnableReceiveMsg()
{
unsigned long ulCode = 0;
+2
View File
@@ -42,3 +42,5 @@ void DestroySpy(HMODULE hModule)
}
int IsLogin(void) { return (int)GET_DWORD(g_WeChatWinDllAddr + g_WxCalls.login); }
wstring GetSelfWxid() { return String2Wstring(GET_STRING(g_WeChatWinDllAddr + g_WxCalls.ui.wxid)); }