-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from ljc545w/add/voipAck-support
新增收款功能与部分接口优化
- Loading branch information
Showing
28 changed files
with
399 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "pch.h" | ||
|
||
struct GetTransferStruct | ||
{ | ||
DWORD wxid = 0; | ||
DWORD transcationid = 0; | ||
DWORD transferid = 0; | ||
}; | ||
|
||
int GetTransfer(DWORD pid, wchar_t *wxid, wchar_t *transcationid, wchar_t *transferid) | ||
{ | ||
WeChatProcess hp(pid); | ||
if (hp.m_init == false) | ||
return 1; | ||
DWORD GetTransferRemoteAddr = hp.GetProcAddr(GetTransferRemote); | ||
if (GetTransferRemoteAddr == 0) | ||
return 1; | ||
WeChatData<wchar_t *> r_wxid(hp.GetHandle(), wxid, TEXTLENGTH(wxid)); | ||
WeChatData<wchar_t *> r_transcationid(hp.GetHandle(), transcationid, TEXTLENGTH(transcationid)); | ||
WeChatData<wchar_t *> r_transferid(hp.GetHandle(), transferid, TEXTLENGTH(transferid)); | ||
GetTransferStruct param = {(DWORD)r_wxid.GetAddr(), (DWORD)r_transcationid.GetAddr(), (DWORD)r_transferid.GetAddr()}; | ||
WeChatData<GetTransferStruct *> r_param(hp.GetHandle(), ¶m, sizeof(GetTransferStruct)); | ||
if (!r_param.GetAddr() || !r_wxid.GetAddr() || !r_transcationid.GetAddr() || !r_transferid.GetAddr()) | ||
return 1; | ||
DWORD dwRet = CallRemoteFunction(hp.GetHandle(), GetTransferRemoteAddr, r_param.GetAddr()); | ||
return (dwRet != 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
#include <windows.h> | ||
int GetTransfer(DWORD pid, wchar_t *wxid, wchar_t *transcationid, wchar_t *transferid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
#include "pch.h" | ||
|
||
struct ImageParamStruct { | ||
struct ImageParamStruct | ||
{ | ||
DWORD wxid; | ||
DWORD imagepath; | ||
}; | ||
|
||
int SendImage(DWORD pid,wchar_t* wxid, wchar_t* imagepath) { | ||
int SendImage(DWORD pid, wchar_t *wxid, wchar_t *imagepath) | ||
{ | ||
WeChatProcess hp(pid); | ||
if (!hp.m_init) return 1; | ||
if (!hp.m_init) | ||
return 1; | ||
DWORD SendImageRemoteAddr = hp.GetProcAddr(SendImageRemote); | ||
if (SendImageRemoteAddr == 0) { | ||
if (SendImageRemoteAddr == 0) | ||
{ | ||
return 1; | ||
} | ||
ImageParamStruct params = { 0 }; | ||
WeChatData<wchar_t*> r_wxid(hp.GetHandle(), wxid, TEXTLENGTH(wxid)); | ||
WeChatData<wchar_t*> r_imagepath(hp.GetHandle(), imagepath, TEXTLENGTH(imagepath)); | ||
ImageParamStruct params = {0}; | ||
WeChatData<wchar_t *> r_wxid(hp.GetHandle(), wxid, TEXTLENGTH(wxid)); | ||
WeChatData<wchar_t *> r_imagepath(hp.GetHandle(), imagepath, TEXTLENGTH(imagepath)); | ||
|
||
params.wxid = (DWORD)r_wxid.GetAddr(); | ||
params.imagepath = (DWORD)r_imagepath.GetAddr(); | ||
WeChatData<ImageParamStruct*> r_params(hp.GetHandle(), ¶ms, sizeof(params)); | ||
if (!params.wxid || !params.imagepath || !r_params.GetAddr()) { | ||
WeChatData<ImageParamStruct *> r_params(hp.GetHandle(), ¶ms, sizeof(params)); | ||
if (!params.wxid || !params.imagepath || !r_params.GetAddr()) | ||
{ | ||
return 1; | ||
} | ||
DWORD dwRet = CallRemoteFunction(hp.GetHandle(), SendImageRemoteAddr, r_params.GetAddr()); | ||
return 0; | ||
return (dwRet != 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.