Fix WxMsgTypes
This commit is contained in:
+20
-1
@@ -1,4 +1,4 @@
|
||||
#include "framework.h"
|
||||
#include "framework.h"
|
||||
|
||||
#include "load_calls.h"
|
||||
#include "receive_msg.h"
|
||||
@@ -15,6 +15,25 @@ DWORD reg_buffer = 0;
|
||||
DWORD recvMsgCallAddr = 0;
|
||||
DWORD recvMsgJumpBackAddr = 0;
|
||||
RpcMessage_t lMsg = { 0 };
|
||||
|
||||
extern const MsgTypesMap_t g_WxMsgTypes = MsgTypesMap_t { { 0x01, L"文字" },
|
||||
{ 0x03, L"图片" },
|
||||
{ 0x22, L"语音" },
|
||||
{ 0x25, L"好友确认" },
|
||||
{ 0x28, L"POSSIBLEFRIEND_MSG" },
|
||||
{ 0x2A, L"名片" },
|
||||
{ 0x2B, L"视频" },
|
||||
{ 0x2F, L"石头剪刀布 | 表情图片" },
|
||||
{ 0x30, L"位置" },
|
||||
{ 0x31, L"共享实时位置、文件、转账、链接" },
|
||||
{ 0x32, L"VOIPMSG" },
|
||||
{ 0x33, L"微信初始化" },
|
||||
{ 0x34, L"VOIPNOTIFY" },
|
||||
{ 0x35, L"VOIPINVITE" },
|
||||
{ 0x3E, L"小视频" },
|
||||
{ 0x270F, L"SYSNOTICE" },
|
||||
{ 0x2710, L"红包、系统消息" },
|
||||
{ 0x2712, L"撤回消息" } };
|
||||
|
||||
void DispatchMsg(DWORD reg)
|
||||
{
|
||||
|
||||
+31
-3
@@ -4,13 +4,15 @@
|
||||
#include "monitor.h"
|
||||
#include "rpc_server.h"
|
||||
#include "send_msg.h"
|
||||
#include "spy_types.h"
|
||||
#include "spy_types.h"
|
||||
#include "sdk.h"
|
||||
|
||||
#include "../Rpc/rpc_h.h"
|
||||
#pragma comment(lib, "Rpcrt4.lib")
|
||||
#include "rpc_h.h"
|
||||
#pragma comment(lib, "Rpcrt4.lib")
|
||||
|
||||
extern HANDLE g_hEvent;
|
||||
extern MsgQueue_t g_MsgQueue;
|
||||
extern const MsgTypesMap_t g_WxMsgTypes;
|
||||
|
||||
int server_IsLogin() { return IsLogin(); }
|
||||
|
||||
@@ -52,6 +54,32 @@ int server_SendImageMsg(const wchar_t *wxid, const wchar_t *path)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int server_GetMsgTypes(int *pNum, PPRpcIntBstrPair_t *msgTypes)
|
||||
{
|
||||
*pNum = g_WxMsgTypes.size();
|
||||
PPRpcIntBstrPair_t pp = (PPRpcIntBstrPair_t)midl_user_allocate(*pNum * sizeof(RpcIntBstrPair_t));
|
||||
if (pp == NULL) {
|
||||
printf("server_GetMsgTypes midl_user_allocate Failed for pp\n");
|
||||
return -2;
|
||||
}
|
||||
int index = 0;
|
||||
for (auto it = g_WxMsgTypes.begin(); it != g_WxMsgTypes.end(); ++it) {
|
||||
PRpcIntBstrPair_t p = (PRpcIntBstrPair_t)midl_user_allocate(sizeof(RpcIntBstrPair_t));
|
||||
if (p == NULL) {
|
||||
printf("server_GetMsgTypes midl_user_allocate Failed for p\n");
|
||||
return -3;
|
||||
}
|
||||
|
||||
p->key = it->first;
|
||||
p->value = SysAllocString(it->second.c_str());
|
||||
pp[index++] = p;
|
||||
}
|
||||
|
||||
*msgTypes = pp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
RPC_STATUS CALLBACK SecurityCallback(RPC_IF_HANDLE /*hInterface*/, void * /*pBindingHandle*/)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user