Update contacts gender type
This commit is contained in:
parent
03e11f3097
commit
9a21dbd082
@ -54,7 +54,7 @@ message Contact {
|
|||||||
string country = 4; // 国家
|
string country = 4; // 国家
|
||||||
string province = 5; // 省/州
|
string province = 5; // 省/州
|
||||||
string city = 6; // 城市
|
string city = 6; // 城市
|
||||||
string gender = 7; // 性别
|
int32 gender = 7; // 性别
|
||||||
}
|
}
|
||||||
message Contacts { repeated Contact contacts = 1; }
|
message Contacts { repeated Contact contacts = 1; }
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#include "get_contacts.h"
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
#include "get_contacts.h"
|
||||||
#include "load_calls.h"
|
#include "load_calls.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
@ -7,7 +9,6 @@ extern DWORD g_WeChatWinDllAddr;
|
|||||||
|
|
||||||
bool GetContacts(wcf::Contacts* contacts)
|
bool GetContacts(wcf::Contacts* contacts)
|
||||||
{
|
{
|
||||||
int gender = 0;
|
|
||||||
DWORD baseAddr = g_WeChatWinDllAddr + g_WxCalls.contact.base;
|
DWORD baseAddr = g_WeChatWinDllAddr + g_WxCalls.contact.base;
|
||||||
DWORD tempAddr = GET_DWORD(baseAddr);
|
DWORD tempAddr = GET_DWORD(baseAddr);
|
||||||
DWORD head = GET_DWORD(tempAddr + g_WxCalls.contact.head);
|
DWORD head = GET_DWORD(tempAddr + g_WxCalls.contact.head);
|
||||||
@ -21,15 +22,7 @@ bool GetContacts(wcf::Contacts* contacts)
|
|||||||
cnt->set_country(GetStringByAddress(node + g_WxCalls.contact.wxCountry));
|
cnt->set_country(GetStringByAddress(node + g_WxCalls.contact.wxCountry));
|
||||||
cnt->set_province(GetStringByAddress(node + g_WxCalls.contact.wxProvince));
|
cnt->set_province(GetStringByAddress(node + g_WxCalls.contact.wxProvince));
|
||||||
cnt->set_city(GetStringByAddress(node + g_WxCalls.contact.wxCity));
|
cnt->set_city(GetStringByAddress(node + g_WxCalls.contact.wxCity));
|
||||||
cnt->set_city(GetStringByAddress(node + g_WxCalls.contact.wxCity));
|
cnt->set_gender(GET_DWORD(node + g_WxCalls.contact.wxGender));
|
||||||
|
|
||||||
gender = GET_DWORD(node + g_WxCalls.contact.wxGender);
|
|
||||||
if (gender == 1)
|
|
||||||
cnt->set_city("男");
|
|
||||||
else if (gender == 2)
|
|
||||||
cnt->set_city("女");
|
|
||||||
else
|
|
||||||
cnt->set_city("未知");
|
|
||||||
|
|
||||||
node = GET_DWORD(node);
|
node = GET_DWORD(node);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user