├── src ├── WeChatSDKCore │ ├── def.def │ ├── user.cpp │ ├── hook.h │ ├── mhook.lib │ ├── resource.h │ ├── revoke.cpp │ ├── sdkclk.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ ├── weixin.h │ ├── Resource.aps │ ├── Resource.rc │ ├── dllmain.cpp │ ├── recvmsg.cpp │ ├── sendmsg.cpp │ ├── targetver.h │ ├── dllhijack.cpp │ ├── extsendfile.cpp │ ├── dllhijack.h │ ├── sdkdef.acf │ ├── sdkclk.acf │ ├── voice.h │ ├── rpcutil.h │ ├── util.h │ ├── config.h │ ├── hook.cpp │ ├── version.h │ ├── sdkclk.idl │ ├── sdk.h │ ├── sdkdef.idl │ ├── rpcutil.cpp │ ├── common.h │ ├── config.cpp │ ├── mhook.h │ ├── common.cpp │ ├── sdkclk_h.h │ ├── sdk.cpp │ ├── sdkdef_h.h │ ├── WeChatSDKCore.sln │ ├── util.cpp │ ├── voice.cpp │ ├── WeChatResource.vcxproj │ ├── sdkclk_s.c │ ├── sdkclk_c.c │ ├── sdkdef_s.c │ └── sdkdef_c.c ├── common │ ├── rpc.cpp │ ├── version.h │ ├── rpcdef.h │ └── rpc.h ├── WeChatSDK │ ├── sdk.h │ ├── sdk.cpp │ ├── stdafx.h │ ├── dllmain.cpp │ ├── inject.lib │ ├── resource.h │ ├── stdafx.cpp │ ├── targetver.h │ ├── WeChatSDK.rc │ ├── openwechat.cpp │ ├── openwechat.h │ ├── WeChatSDK.vcxproj.user │ ├── rpcutil.h │ ├── util.h │ ├── sdk.def │ ├── inject.h │ ├── rpcutil.cpp │ ├── sdkclk.cpp │ ├── util.cpp │ ├── WeChatSDK.vcxproj.filters │ └── WeChatSDK.vcxproj └── WeChatSDKTest │ ├── pch.h │ ├── pch.cpp │ ├── resource.h │ ├── wechat.ico │ ├── WeChatSDKTest.cpp │ ├── WeChatSDKTest.rc │ ├── WeChatSDKTest.vcxproj.user │ ├── WeChatSDKTest.vcxproj.filters │ └── WeChatSDKTest.vcxproj ├── sdk ├── SuperWeChat(语音备份).bat ├── sdk.h ├── WeChatSDK.dll ├── SuperWeChat.exe ├── SuperWeChat.zip ├── WeChatSDKCore.dll ├── WeChatSDK.java ├── TestJavaSDK.java ├── TestSDK.cs ├── WeChatSDK.py └── WeChatSDK.cs ├── hash.txt ├── pay.png ├── readme.md ├── docs ├── pay.png ├── sdk.png ├── wx.png ├── normal.md ├── update.md ├── sdkmore.md └── sdk.md └── bin ├── v1.1.3.zip └── WeChat多开v0.0.1.exe /src/WeChatSDKCore/def.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/user.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" -------------------------------------------------------------------------------- /sdk/SuperWeChat(语音备份).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | SuperWeChat.exe c:\wxmsg -------------------------------------------------------------------------------- /hash.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/hash.txt -------------------------------------------------------------------------------- /pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/pay.png -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/readme.md -------------------------------------------------------------------------------- /sdk/sdk.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/sdk/sdk.h -------------------------------------------------------------------------------- /docs/pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/docs/pay.png -------------------------------------------------------------------------------- /docs/sdk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/docs/sdk.png -------------------------------------------------------------------------------- /docs/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/docs/wx.png -------------------------------------------------------------------------------- /bin/v1.1.3.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/bin/v1.1.3.zip -------------------------------------------------------------------------------- /src/WeChatSDKCore/hook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool InitHook(); 4 | void UninitHook(); -------------------------------------------------------------------------------- /sdk/WeChatSDK.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/sdk/WeChatSDK.dll -------------------------------------------------------------------------------- /src/common/rpc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/common/rpc.cpp -------------------------------------------------------------------------------- /sdk/SuperWeChat.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/sdk/SuperWeChat.exe -------------------------------------------------------------------------------- /sdk/SuperWeChat.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/sdk/SuperWeChat.zip -------------------------------------------------------------------------------- /src/WeChatSDK/sdk.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/sdk.h -------------------------------------------------------------------------------- /src/common/version.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/common/version.h -------------------------------------------------------------------------------- /bin/WeChat多开v0.0.1.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/bin/WeChat多开v0.0.1.exe -------------------------------------------------------------------------------- /sdk/WeChatSDKCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/sdk/WeChatSDKCore.dll -------------------------------------------------------------------------------- /src/WeChatSDK/sdk.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/sdk.cpp -------------------------------------------------------------------------------- /src/WeChatSDK/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/stdafx.h -------------------------------------------------------------------------------- /src/WeChatSDKTest/pch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKTest/pch.h -------------------------------------------------------------------------------- /src/WeChatSDK/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/dllmain.cpp -------------------------------------------------------------------------------- /src/WeChatSDK/inject.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/inject.lib -------------------------------------------------------------------------------- /src/WeChatSDK/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/resource.h -------------------------------------------------------------------------------- /src/WeChatSDK/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/stdafx.cpp -------------------------------------------------------------------------------- /src/WeChatSDK/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/targetver.h -------------------------------------------------------------------------------- /src/WeChatSDKTest/pch.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKTest/pch.cpp -------------------------------------------------------------------------------- /src/WeChatSDK/WeChatSDK.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/WeChatSDK.rc -------------------------------------------------------------------------------- /src/WeChatSDK/openwechat.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/openwechat.cpp -------------------------------------------------------------------------------- /src/WeChatSDK/openwechat.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDK/openwechat.h -------------------------------------------------------------------------------- /src/WeChatSDKCore/mhook.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/mhook.lib -------------------------------------------------------------------------------- /src/WeChatSDKCore/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/resource.h -------------------------------------------------------------------------------- /src/WeChatSDKCore/revoke.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/revoke.cpp -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkclk.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/sdkclk.cpp -------------------------------------------------------------------------------- /src/WeChatSDKCore/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/stdafx.cpp -------------------------------------------------------------------------------- /src/WeChatSDKCore/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/stdafx.h -------------------------------------------------------------------------------- /src/WeChatSDKCore/weixin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/weixin.h -------------------------------------------------------------------------------- /src/WeChatSDKTest/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKTest/resource.h -------------------------------------------------------------------------------- /src/WeChatSDKTest/wechat.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKTest/wechat.ico -------------------------------------------------------------------------------- /src/WeChatSDKCore/Resource.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/Resource.aps -------------------------------------------------------------------------------- /src/WeChatSDKCore/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/Resource.rc -------------------------------------------------------------------------------- /src/WeChatSDKCore/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/dllmain.cpp -------------------------------------------------------------------------------- /src/WeChatSDKCore/recvmsg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/recvmsg.cpp -------------------------------------------------------------------------------- /src/WeChatSDKCore/sendmsg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/sendmsg.cpp -------------------------------------------------------------------------------- /src/WeChatSDKCore/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/targetver.h -------------------------------------------------------------------------------- /src/WeChatSDKCore/dllhijack.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/dllhijack.cpp -------------------------------------------------------------------------------- /src/WeChatSDKCore/extsendfile.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKCore/extsendfile.cpp -------------------------------------------------------------------------------- /src/WeChatSDKTest/WeChatSDKTest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKTest/WeChatSDKTest.cpp -------------------------------------------------------------------------------- /src/WeChatSDKTest/WeChatSDKTest.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gytai/SuperWeChatPC/master/src/WeChatSDKTest/WeChatSDKTest.rc -------------------------------------------------------------------------------- /src/WeChatSDKCore/dllhijack.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | void SuperDllHijack(LPCWSTR dllname, LPWSTR OrigDllPath); -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkdef.acf: -------------------------------------------------------------------------------- 1 | [ 2 | implicit_handle (handle_t WechatRs_IfHandle) 3 | ] 4 | 5 | interface WechatSDK 6 | { 7 | 8 | } -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkclk.acf: -------------------------------------------------------------------------------- 1 | [ 2 | implicit_handle (handle_t WechatRsClk_IfHandle) 3 | ] 4 | 5 | interface WechatSDKClk 6 | { 7 | 8 | } -------------------------------------------------------------------------------- /src/common/rpcdef.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | RPC_WSTR g_Endpoint = (RPC_WSTR)L"\\pipe\\WeChatSDK_Server"; 5 | RPC_WSTR g_ClkEndpoint = (RPC_WSTR)L"\\pipe\\WeChatSDKClk_Server"; -------------------------------------------------------------------------------- /src/WeChatSDK/WeChatSDK.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/voice.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | VOID SetSildDirPath(const TCHAR* path); 4 | PVOID* GetOrigVocieDecodeInternal(); 5 | int __stdcall fakeVoiceDecodeInternal(int voice, int size, int from, int a4); -------------------------------------------------------------------------------- /src/WeChatSDKTest/WeChatSDKTest.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/WeChatSDK/rpcutil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | 5 | int ConnectSDKServer(DWORD pid, RPC_WSTR* StringBinding); 6 | int DisconnectSDKServer(DWORD pid, RPC_WSTR* StringBinding); 7 | int StartSDKClkServer(); 8 | void StopSDKClkServer(); -------------------------------------------------------------------------------- /src/WeChatSDK/util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "stdafx.h" 4 | 5 | 6 | int GetWeChatPath(WCHAR* Path); 7 | int GetWeChatWinPath(WCHAR* Path); 8 | int GetWeChatVersion(WCHAR* version); 9 | bool GetFileVersion(LPTSTR lpszFilePath, LPTSTR version); 10 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/rpcutil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "../common/rpc.h" 5 | 6 | int StartSDKServer(DWORD pid); 7 | void StopSDKServer(); 8 | int ConnectSDKServer(RPC_WSTR* StringBinding); 9 | int DisconnectSDKServer(RPC_WSTR* StringBinding); -------------------------------------------------------------------------------- /src/WeChatSDKCore/util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool GetFileVersion(LPTSTR lpszFilePath, LPTSTR version); 4 | void Patch(PVOID addr, DWORD size, PVOID code); 5 | void InlineHookE8(PVOID src, PVOID target, PVOID* orgfun); 6 | wchar_t* SplitStr(const wchar_t* src, const wchar_t* f1, const wchar_t* f2); -------------------------------------------------------------------------------- /src/common/rpc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | long RpcStartService(RPC_WSTR pszEndPoint, RPC_IF_HANDLE ifHandle); 6 | void RpcStopService(); 7 | long RpcConnectServer(RPC_WSTR EndPoint, handle_t *IfHandle, RPC_WSTR *StringBinding); 8 | long RpcDisconnectServer(handle_t *IfHandle, RPC_WSTR *StringBinding); -------------------------------------------------------------------------------- /src/WeChatSDKCore/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class WxFuncConfig 6 | { 7 | public: 8 | WxFuncConfig(); 9 | ~WxFuncConfig(); 10 | 11 | bool IsRevokeMsg(); 12 | bool IsSaveVoiceMsg(TCHAR* path); 13 | private: 14 | void Init(); 15 | 16 | private: 17 | TCHAR m_configPath[MAX_PATH]; 18 | }; -------------------------------------------------------------------------------- /src/WeChatSDKCore/hook.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "hook.h" 3 | #include "voice.h" 4 | 5 | #include "mhook.h" 6 | #pragma comment(lib, "mhook.lib") 7 | 8 | extern WxFuncConfig g_WxFuncConfig; 9 | 10 | bool InitHook() 11 | { 12 | EnableDropFileEx(); 13 | return true; 14 | } 15 | 16 | void UninitHook() 17 | { 18 | 19 | } -------------------------------------------------------------------------------- /src/WeChatSDK/sdk.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | WXOpenWechat 3 | WXGetWechat 4 | WXIsWechatAlive 5 | WXInitialize 6 | WXUninitialize 7 | WXGetWechatVersion 8 | WXIsWechatSDKOk 9 | WXAntiRevokeMsg 10 | WXUnAntiRevokeMsg 11 | WXSaveVoiceMsg 12 | WXUnSaveVoiceMsg 13 | WXSendTextMsg 14 | ;WXSendImageMsg 15 | WXRecvTextMsg 16 | WXRecvTransferMsg 17 | WXRecvPayMsg -------------------------------------------------------------------------------- /src/WeChatSDK/inject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | //proc_name: process name 6 | int GetProcID(const WCHAR* _proc_name); 7 | //path: process name 8 | //dllpath: dll full path 9 | bool InjectDll(const WCHAR* path, const WCHAR* dllpath); 10 | //pid: process id 11 | //dllpath: dll full path 12 | bool InjectDll1(DWORD pid, const WCHAR* dllpath); 13 | // 14 | bool EnjectDll(DWORD pid, const WCHAR* dllname); -------------------------------------------------------------------------------- /src/WeChatSDKCore/version.h: -------------------------------------------------------------------------------- 1 | #ifndef VERSION_H 2 | #define VERSION_H 3 | 4 | #define COPYRIGHT "Copyright (C) 2018-2020 anhkgg." 5 | #define AHTHOR_NAME "anhkgg" 6 | #define AUTHOR_WECHAT "anhkgg" 7 | #define VERSION_MAJOR 1 8 | #define VERSION_MINOR 1 9 | #define VERSION_RELEASE 2 10 | #define VERSION_BUILD 0 11 | 12 | #define _Stringizing(v) #v 13 | #define _VerJoin(a, b, c, d) _Stringizing(a.b.c.d) 14 | #define VERSION_FILE _VerJoin(VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE, VERSION_BUILD) 15 | 16 | 17 | #endif//VERSION_H 18 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkclk.idl: -------------------------------------------------------------------------------- 1 | [ 2 | uuid(B3A3F08E-FB79-4673-82E2-185BCF29AA99), 3 | version(1.0) 4 | ] 5 | 6 | interface WechatSDKClk 7 | { 8 | int WSDKClkRecvTextMsg([in]unsigned int funptr, [in]int pid, [in, string]wchar_t* wxid, [in, string]wchar_t* msg); 9 | int WSDKClkRecvTransferMsg([in]unsigned int funptr, [in]int pid, [in, string]wchar_t* wxid, [in, string]wchar_t* tid, [in, string]wchar_t* msg); 10 | int WSDKClkRecvPayMsg([in]unsigned int funptr, [in]int pid, [in, string]wchar_t* wxid, [in, string]wchar_t* tid, [in, string]wchar_t* msg); 11 | } -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdk.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int CoreWSDKClkRecvTextMsg( 4 | /* [in] */ unsigned int funptr, 5 | /* [string][in] */ wchar_t *wxid, 6 | /* [string][in] */ wchar_t *msg); 7 | 8 | int CoreWSDKClkRecvTransferMsg( 9 | /* [in] */ unsigned int funptr, 10 | /* [string][in] */ wchar_t *wxid, 11 | /* [string][in] */ wchar_t *tid, 12 | /* [string][in] */ wchar_t *msg); 13 | 14 | int CoreWSDKClkRecvPayMsg( 15 | /* [in] */ unsigned int funptr, 16 | /* [string][in] */ wchar_t *wxid, 17 | /* [string][in] */ wchar_t *tid, 18 | /* [string][in] */ wchar_t *msg); -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkdef.idl: -------------------------------------------------------------------------------- 1 | [ 2 | uuid(EC3A7CE8-8F99-47ef-9705-DA5DF14F9A4C), 3 | version(1.0) 4 | ] 5 | 6 | interface WechatSDK 7 | { 8 | int WSDKInitialize(); 9 | int WSDKUninitialize(); 10 | int WSDKAntiRevokeMsg(); 11 | int WSDKUnAntiRevokeMsg(); 12 | int WSDKStartSaveVoiceMsg([in, string]wchar_t* path); 13 | int WSDKStopSaveVoiceMsg(); 14 | int WSDKSendTextMsg([in, string]wchar_t* wxid, [in, string]wchar_t* msg); 15 | int WSDKSendImageMsg([in, string]wchar_t* wxid, [in, string]wchar_t* path); 16 | int WSDKRecvTextMsg([in]unsigned int funptr); 17 | int WSDKRecvTransferMsg([in]unsigned int funptr); 18 | int WSDKRecvPayMsg([in]unsigned int funptr); 19 | } -------------------------------------------------------------------------------- /sdk/WeChatSDK.java: -------------------------------------------------------------------------------- 1 | import com.sun.jna.Library; 2 | import com.sun.jna.Native; 3 | import com.sun.jna.WString; 4 | 5 | //https://blog.csdn.net/gcangle/article/details/8504629 6 | 7 | public interface WeChatSDK extends Library { 8 | WeChatSDK sdk = (WeChatSDK)Native.loadLibrary("WeChatSDK", WeChatSDK.class); 9 | public int WXOpenWechat(); 10 | public boolean WXIsWechatAlive(int pid); 11 | public int WXInitialize(int pid); 12 | public int WXUninitialize(int pid); 13 | public boolean WXIsWechatSDKOk(int pid); 14 | 15 | public int WXAntiRevokeMsg(int pid); 16 | public int WXUnAntiRevokeMsg(int pid); 17 | public int WXSaveVoiceMsg(int pid, WString path); 18 | public int WXUnSaveVoiceMsg(int pid); 19 | 20 | public int WXSendTextMsg(int pid, WString wxid, WString msg); 21 | } -------------------------------------------------------------------------------- /src/WeChatSDKCore/rpcutil.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "rpcutil.h" 3 | #include "../common/rpcdef.h" 4 | #include "sdkdef_h.h" 5 | #include "sdkclk_h.h" 6 | //for sdkdef.idl 7 | 8 | int StartSDKServer(DWORD pid) 9 | { 10 | WCHAR wszEndPoint[MAX_PATH] = { 0 }; 11 | wsprintf(wszEndPoint, L"%ws_%d", g_Endpoint, pid); 12 | return RpcStartService((RPC_WSTR)wszEndPoint, WechatSDK_v1_0_s_ifspec); 13 | } 14 | 15 | void StopSDKServer() 16 | { 17 | RpcStopService(); 18 | } 19 | 20 | //for sdkclk.idl 21 | 22 | int ConnectSDKServer(RPC_WSTR* StringBinding) 23 | { 24 | WCHAR wszEndPoint[MAX_PATH] = { 0 }; 25 | wsprintf(wszEndPoint, L"%ws", g_ClkEndpoint); 26 | RPC_STATUS status = RpcConnectServer((RPC_WSTR)wszEndPoint, &WechatRsClk_IfHandle, StringBinding); 27 | return status; 28 | } 29 | 30 | int DisconnectSDKServer(RPC_WSTR* StringBinding) 31 | { 32 | RpcDisconnectServer(&WechatRsClk_IfHandle, StringBinding); 33 | return 0; 34 | } -------------------------------------------------------------------------------- /src/WeChatSDKCore/common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #define WECHATWINDLL TEXT("WeChatWin.dll") 6 | #define WECHATRESOURCE TEXT("WeChatResource.dll") 7 | #define ORGWECHATRESOURCE TEXT("WeChatResource.dll.1") 8 | 9 | typedef struct _FAKE_WX_CODE 10 | { 11 | DWORD orig_code_count; 12 | BYTE orig_code[100]; 13 | DWORD fake_code_count; 14 | BYTE fake_code[100]; 15 | }FakeWxCode, *PFakeWxCode; 16 | 17 | typedef struct _SUP_WX_CFG 18 | { 19 | const TCHAR* version; 20 | DWORD revoke_offset; 21 | FakeWxCode code; 22 | }SuppWxCfg, *PSuppWxCfg; 23 | 24 | bool IsSupportedWxVersion( 25 | const SuppWxCfg* cfg, 26 | INT cfg_count, 27 | DWORD* offset = NULL, 28 | BYTE* orig_code = NULL, 29 | DWORD* orig_code_count = NULL, 30 | BYTE* fake_code = NULL, 31 | DWORD* fake_code_count = NULL); 32 | 33 | int HookTemplate(HMODULE hMod, const SuppWxCfg* OffArray, int len, PVOID* orig, PVOID fake); -------------------------------------------------------------------------------- /src/WeChatSDK/rpcutil.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "../common/rpcdef.h" 3 | #include "../common/rpc.h" 4 | #include "../WeChatSDKCore/sdkdef_h.h" 5 | #include "../WeChatSDKCore/sdkclk_h.h" 6 | 7 | // for sdkdef.idl 8 | 9 | int ConnectSDKServer(DWORD pid, RPC_WSTR* StringBinding) 10 | { 11 | WCHAR wszEndPoint[MAX_PATH] = { 0 }; 12 | wsprintf(wszEndPoint, L"%ws_%d", g_Endpoint, pid); 13 | RPC_STATUS status = RpcConnectServer((RPC_WSTR)wszEndPoint, &WechatRs_IfHandle, StringBinding); 14 | return status; 15 | } 16 | 17 | int DisconnectSDKServer(DWORD pid, RPC_WSTR* StringBinding) 18 | { 19 | RpcDisconnectServer(&WechatRs_IfHandle, StringBinding); 20 | return 0; 21 | } 22 | 23 | //for sdkclk.idl 24 | 25 | int StartSDKClkServer() 26 | { 27 | WCHAR wszEndPoint[MAX_PATH] = { 0 }; 28 | wsprintf(wszEndPoint, L"%ws", g_ClkEndpoint); 29 | return RpcStartService((RPC_WSTR)wszEndPoint, WechatSDKClk_v1_0_s_ifspec); 30 | } 31 | 32 | void StopSDKClkServer() 33 | { 34 | RpcStopService(); 35 | } 36 | -------------------------------------------------------------------------------- /sdk/TestJavaSDK.java: -------------------------------------------------------------------------------- 1 | import com.sun.jna.Library; 2 | import com.sun.jna.WString; 3 | 4 | //https://www.cnblogs.com/huangzijian/p/6638710.html 5 | 6 | public class TestJavaSDK { 7 | public static void main(String[] argv) throws Exception { 8 | System.out.println("hello java WechatSDK"); 9 | 10 | int pid = WeChatSDK.sdk.WXOpenWechat(); 11 | if(pid <= 0) { 12 | System.out.println("hello java WechatSDK"); 13 | return; 14 | } 15 | 16 | System.out.println("pid: " + pid); 17 | 18 | System.out.println("wait for..."); 19 | System.in.read(); 20 | 21 | System.out.println(WeChatSDK.sdk.WXIsWechatAlive(pid)); 22 | System.out.println(WeChatSDK.sdk.WXIsWechatSDKOk(pid)); 23 | System.out.println(WeChatSDK.sdk.WXInitialize(pid)); 24 | System.out.println("wait for..."); 25 | System.in.read(); 26 | System.out.println(WeChatSDK.sdk.WXSendTextMsg(pid, new WString("wxid_xxxx"), new WString("This is a java sdk test msg"))); 27 | 28 | System.in.read(); 29 | } 30 | } -------------------------------------------------------------------------------- /docs/normal.md: -------------------------------------------------------------------------------- 1 | ## 普通用户使用SuperWeChatPC 2 | 3 | 超级电脑端微信,支持多开,支持防消息撤销,支持语音消息备份... 4 | 5 | ### 1. 新版本 6 | 7 | 持续更新版本,直接下载[sdk/SuperWeChat.zip](https://github.com/anhkgg/SuperWeChatPC/raw/master/sdk/SuperWeChat.zip)即可。 8 | 9 | 默认开启消息防撤回功能,如果需要开启语音备份功能,请使用`SuperWeChat(语音备份).bat`获取输入一下命令: 10 | 11 | ``` 12 | SuperWeChat.exe c:\wxmsg 13 | ``` 14 | 15 | ### 2. 仅需要多开 16 | 17 | ~~下载[bin/WeChat多开v0.0.1.exe](https://github.com/anhkgg/SuperWeChatPC/raw/master/bin/WeChat%E5%A4%9A%E5%BC%80v0.0.1.exe),双击即可直接使用。~~ 18 | 19 | **请注意:** 由于微信更新,`2.6.8.52`以后,老版本`WeChat多开v0.0.1.exe`已经失效,请直接使用[sdk/SuperWechat.zip](https://github.com/anhkgg/SuperWeChatPC/raw/master/sdk/SuperWeChat.zip),也可通过公众号获取。 20 | 21 | ### 3. 老版本v1.1.3 22 | 23 | 支持防消息撤销,支持语音消息备份,更新支持到微信`2.6.7.40` 24 | 25 | 下载[bin/v1.1.3.zip](https://github.com/anhkgg/SuperWeChatPC/raw/master/bin/v1.1.3.zip)使用。 26 | 27 | 1. 双击运行WeChat多开(防撤销).exe即可。 28 | 2. 如更新了WeChatResource.dll,请使用如下参数运行:`WeChat多开(防撤销).exe n`。 29 | 3. `superwx.ini`配置如下: 30 | ``` 31 | [config] 32 | revokemsg=1 #0:关闭防消息撤销,1:打开消息防撤销 33 | voicemsg=c:\ #填入备份语音消息的目录,空为关闭语音消息备份功能 34 | ``` 35 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/config.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "config.h" 3 | 4 | #define CONFIGFILE TEXT("superwx.ini") 5 | 6 | WxFuncConfig::WxFuncConfig() 7 | { 8 | Init(); 9 | } 10 | 11 | WxFuncConfig::~WxFuncConfig() 12 | { 13 | 14 | } 15 | 16 | void WxFuncConfig::Init() 17 | { 18 | TCHAR tszCfgPath[MAX_PATH] = { 0 }; 19 | 20 | GetModuleFileName(GetModuleHandle(WECHATRESOURCE), tszCfgPath, MAX_PATH); 21 | PathRemoveFileSpec(tszCfgPath); 22 | PathAppend(tszCfgPath, CONFIGFILE); 23 | 24 | _tcscpy_s(m_configPath, tszCfgPath); 25 | } 26 | 27 | bool WxFuncConfig::IsRevokeMsg() 28 | { 29 | return GetPrivateProfileInt(TEXT("config"), TEXT("revokemsg"), 0, m_configPath) != 0; 30 | } 31 | 32 | bool WxFuncConfig::IsSaveVoiceMsg(TCHAR * path) 33 | { 34 | TCHAR voiceMsgPath[MAX_PATH] = { 0 }; 35 | 36 | GetPrivateProfileString(TEXT("config"), TEXT("voicemsg"), TEXT(""), voiceMsgPath, MAX_PATH, m_configPath); 37 | if (_tcslen(voiceMsgPath) > 0) { 38 | if (path) { 39 | _tcscpy_s(path, MAX_PATH, voiceMsgPath); 40 | } 41 | return true; 42 | } 43 | else { 44 | return false; 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/WeChatSDK/sdkclk.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "sdk.h" 3 | #include "../WeChatSDKCore/sdkclk_h.h" 4 | 5 | //callback 6 | 7 | int WSDKClkRecvTextMsg( 8 | /* [in] */ unsigned int funptr, 9 | /* [in] */ int pid, 10 | /* [string][in] */ wchar_t *wxid, 11 | /* [string][in] */ wchar_t *msg) 12 | { 13 | OutputDebugStringA("sdkclk: WSDKClkRecvTextMsg"); 14 | if (funptr) 15 | { 16 | ((PFNRECVTEXTMSG_CALLBACK)funptr)(pid, wxid, msg); 17 | } 18 | return 0; 19 | } 20 | 21 | int WSDKClkRecvTransferMsg( 22 | /* [in] */ unsigned int funptr, 23 | /* [in] */ int pid, 24 | /* [string][in] */ wchar_t *wxid, 25 | /* [string][in] */ wchar_t* tid, 26 | /* [string][in] */ wchar_t *msg) 27 | { 28 | OutputDebugStringA("sdkclk: WSDKClkRecvTransferMsg"); 29 | if (funptr) 30 | { 31 | ((PFNRECVMONEYMSG_CALLBACK)funptr)(pid, wxid, tid, msg); 32 | } 33 | return 0; 34 | } 35 | 36 | int WSDKClkRecvPayMsg( 37 | /* [in] */ unsigned int funptr, 38 | /* [in] */ int pid, 39 | /* [string][in] */ wchar_t *wxid, 40 | /* [string][in] */ wchar_t* tid, 41 | /* [string][in] */ wchar_t *msg) 42 | { 43 | OutputDebugStringA("sdkclk: WSDKClkRecvPayMsg"); 44 | if (funptr) 45 | { 46 | ((PFNRECVMONEYMSG_CALLBACK)funptr)(pid, wxid, tid, msg); 47 | } 48 | return 0; 49 | } -------------------------------------------------------------------------------- /src/WeChatSDKCore/mhook.h: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2007-2008, Marton Anka 2 | // 3 | //Permission is hereby granted, free of charge, to any person obtaining a 4 | //copy of this software and associated documentation files (the "Software"), 5 | //to deal in the Software without restriction, including without limitation 6 | //the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | //and/or sell copies of the Software, and to permit persons to whom the 8 | //Software is furnished to do so, subject to the following conditions: 9 | // 10 | //The above copyright notice and this permission notice shall be included 11 | //in all copies or substantial portions of the Software. 12 | // 13 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | //OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | //THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | //FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | //IN THE SOFTWARE. 20 | 21 | #ifdef _M_IX86 22 | #define _M_IX86_X64 23 | #elif defined _M_X64 24 | #define _M_IX86_X64 25 | #endif 26 | 27 | BOOL Mhook_SetHook(PVOID *ppSystemFunction, PVOID pHookFunction); 28 | BOOL Mhook_Unhook(PVOID *ppHookedFunction); 29 | 30 | #define MHOOKS_MAX_SUPPORTED_HOOKS 64 31 | 32 | -------------------------------------------------------------------------------- /sdk/TestSDK.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading; 6 | 7 | using static WeChatSDK.WeChatSDK; 8 | 9 | namespace ConsoleApp1 10 | { 11 | class Program 12 | { 13 | static void Main(string[] args) 14 | { 15 | try 16 | { 17 | uint pid = WXOpenWechat(); 18 | Console.WriteLine("WXOpenWechat pid:" + pid); 19 | 20 | while (!WXIsWechatAlive(pid)) 21 | { 22 | Console.Write("."); 23 | Thread.Sleep(100); 24 | } 25 | 26 | Console.WriteLine("initialize sdk..."); 27 | 28 | Console.WriteLine(WXInitialize(pid)); 29 | 30 | while (!WXIsWechatSDKOk(pid)) 31 | { 32 | Console.Write("."); 33 | Thread.Sleep(100); 34 | } 35 | 36 | Console.WriteLine("sdk ok..."); 37 | 38 | WXAntiRevokeMsg(pid); 39 | WXSaveVoiceMsg(pid, "c:\\wxmsg"); 40 | 41 | WXRecvPayMsg(pid, RecvMoneyMsg); 42 | 43 | Console.ReadLine(); 44 | } 45 | catch (Exception ex) 46 | { 47 | Console.WriteLine(ex.ToString()); 48 | } 49 | } 50 | 51 | static int RecvMoneyMsg(UInt32 pid, string wxid, string id, string msg) 52 | { 53 | Console.WriteLine(wxid + ":" + msg); 54 | return 0; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/WeChatSDKTest/WeChatSDKTest.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 头文件 20 | 21 | 22 | 头文件 23 | 24 | 25 | 26 | 27 | 源文件 28 | 29 | 30 | 源文件 31 | 32 | 33 | 34 | 35 | 资源文件 36 | 37 | 38 | 39 | 40 | 资源文件 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/update.md: -------------------------------------------------------------------------------- 1 | # 更新日志 2 | 3 | **2019年8月15日** 4 | 1. 新增增强文件发送功能,打破微信100M限制。 5 | 2. 大文件(大于100M)发送默认开启,并不影响原有功能。 6 | 7 | 注意:目前接收方并未开发自动合并功能(毕竟使用SDK的人少),所以接收方需手工合并(工作量并不大)。 8 | 9 | ``` 10 | //使用windows原生命令合并文件 11 | copy /b Test_100M.pdf._1+Test_100M.pdf._2+Test_100M.pdf._3 Test_100M.pdf 12 | ``` 13 | 14 | **2019年3月8日** 15 | 1. 发布Python、Java、C#的SDK,版本1.3.0 16 | 2. 升级防撤消功能,有撤销提醒 17 | 3. 增加接受消息接口(3种) 18 | 19 | **2019年2月24日** 20 | 1. 开放WeChatSDK,提供丰富的操作微信的接口 21 | 2. 保留v1.1.3老版本,[下载地址](https://github.com/anhkgg/SuperWeChatPC/tree/master/bin) 22 | 3. 普通用户也可使用sdk目录下SuperWeChatPC.exe使用最新的功能 23 | 24 | **2019年2月22日(v1.1.3)** 25 | 1. v1.1.3.3,更新支持2.6.7.40 26 | 2. bin目录为最新可执行文件[下载地址](https://github.com/anhkgg/SuperWeChatPC/tree/master/bin) 27 | 28 | **2019年2月16日(v1.1.3)** 29 | 1. v1.1.3.2,更新支持2.6.6.44 30 | 2. bin目录为最新可执行文件[下载地址](https://github.com/anhkgg/SuperWeChatPC/tree/master/bin) 31 | 32 | **2019年2月13日(v1.1.3)** 33 | 1. 更新支持2.6.7.32 34 | 2. bin目录为最新可执行文件[下载地址](https://github.com/anhkgg/SuperWeChatPC/tree/master/bin) 35 | 36 | **2019年2月1日(v1.1.3)** 37 | 1. 增加支持语音消息备份(仅支持2.6.6.28),只是个demo,有特殊需要请自行修改或者联系我。 38 | 2. 增加`superwx.ini`配置文件,可自行开关防消息撤销和语音消息备份 39 | 3. [下载地址](https://github.com/anhkgg/SuperWeChatPC/releases/tag/v1.1.3) 40 | 41 | **2018年12月28日(v1.1.2)** 42 | 1. 更新支持微信(2.6.6.28) 43 | 2. 更新支持随机mutex多开 44 | 3. [下载地址](https://github.com/anhkgg/SuperWeChatPC/releases/tag/v1.1.2) 45 | 46 | **2018年11月30日(v1.1.1)**: 47 | 1. 增加消息防撤销功能,暂时只支持固定版本(2.6.5.38,2.6.6.25),如有需要请联系我兼容或者自行修改。 48 | 2. MultiWeChat增加更新安装防撤消插件和更新插件功能。 49 | 3. [下载地址](https://github.com/anhkgg/multi_wechat_pc/releases/tag/v1.1.1) 50 | 4. multi_wechat_pc更名为SuperWeChatPC 51 | 52 | **v0.0.1**: 53 | 1. 仅支持多开功能,[下载地址](https://github.com/anhkgg/multi_wechat_pc/releases/tag/v0.0.1) -------------------------------------------------------------------------------- /src/WeChatSDKCore/common.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "common.h" 3 | #include "util.h" 4 | #include "mhook.h" 5 | 6 | bool IsSupportedWxVersion( 7 | const SuppWxCfg* cfg, 8 | INT cfg_count, 9 | DWORD* offset/* = NULL*/, 10 | BYTE* orig_code/* = NULL*/, 11 | DWORD* orig_code_count/* = NULL*/, 12 | BYTE* fake_code/* = NULL*/, 13 | DWORD* fake_code_count/* = NULL*/) 14 | { 15 | TCHAR tszDllPath[MAX_PATH] = { 0 }; 16 | 17 | GetModuleFileName(NULL, tszDllPath, MAX_PATH); 18 | PathRemoveFileSpec(tszDllPath); 19 | PathAppend(tszDllPath, WECHATWINDLL); 20 | 21 | TCHAR version[100] = { 0 }; 22 | if (!GetFileVersion(tszDllPath, version)) 23 | { 24 | return false; 25 | } 26 | 27 | for (int i = 0; i < cfg_count; i++) { 28 | if (!_tcsicmp(cfg[i].version, version)) { 29 | if (offset) { 30 | *offset = cfg[i].revoke_offset; 31 | } 32 | if (orig_code) { 33 | memcpy(orig_code, cfg[i].code.orig_code, cfg[i].code.orig_code_count); 34 | } 35 | if (fake_code) { 36 | memcpy(fake_code, cfg[i].code.fake_code, cfg[i].code.fake_code_count); 37 | } 38 | if (orig_code_count) { 39 | *orig_code_count = cfg[i].code.orig_code_count; 40 | } 41 | if (fake_code_count) { 42 | *fake_code_count = cfg[i].code.fake_code_count; 43 | } 44 | return true; 45 | } 46 | } 47 | 48 | return false; 49 | } 50 | 51 | int HookTemplate(HMODULE hMod, const SuppWxCfg* OffArray, int len, PVOID* orig, PVOID fake) 52 | { 53 | DWORD offset = 0; 54 | if (IsSupportedWxVersion( 55 | OffArray, 56 | len, 57 | &offset)) 58 | { 59 | *orig = (PVOID)((DWORD)hMod + offset); 60 | if (!Mhook_SetHook((PVOID*)orig, fake)) { 61 | *orig = NULL; 62 | return ERROR_INVALID_ADDRESS; 63 | } 64 | else { 65 | return ERROR_SUCCESS; 66 | } 67 | } 68 | else { 69 | return ERROR_NOT_SUPPORTED; 70 | } 71 | } -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkclk_h.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the definitions for the interfaces */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.01.0622 */ 7 | /* at Tue Jan 19 11:14:07 2038 8 | */ 9 | /* Compiler settings for sdkclk.idl: 10 | Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 11 | protocol : dce , ms_ext, c_ext, robust 12 | error checks: allocation ref bounds_check enum stub_data 13 | VC __declspec() decoration level: 14 | __declspec(uuid()), __declspec(selectany), __declspec(novtable) 15 | DECLSPEC_UUID(), MIDL_INTERFACE() 16 | */ 17 | /* @@MIDL_FILE_HEADING( ) */ 18 | 19 | 20 | 21 | /* verify that the version is high enough to compile this file*/ 22 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 23 | #define __REQUIRED_RPCNDR_H_VERSION__ 500 24 | #endif 25 | 26 | #include "rpc.h" 27 | #include "rpcndr.h" 28 | 29 | #ifndef __RPCNDR_H_VERSION__ 30 | #error this stub requires an updated version of 31 | #endif /* __RPCNDR_H_VERSION__ */ 32 | 33 | 34 | #ifndef __sdkclk_h_h__ 35 | #define __sdkclk_h_h__ 36 | 37 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) 38 | #pragma once 39 | #endif 40 | 41 | /* Forward Declarations */ 42 | 43 | #ifdef __cplusplus 44 | extern "C"{ 45 | #endif 46 | 47 | 48 | #ifndef __WechatSDKClk_INTERFACE_DEFINED__ 49 | #define __WechatSDKClk_INTERFACE_DEFINED__ 50 | 51 | /* interface WechatSDKClk */ 52 | /* [implicit_handle][version][uuid] */ 53 | 54 | int WSDKClkRecvTextMsg( 55 | /* [in] */ unsigned int funptr, 56 | /* [in] */ int pid, 57 | /* [string][in] */ wchar_t *wxid, 58 | /* [string][in] */ wchar_t *msg); 59 | 60 | int WSDKClkRecvTransferMsg( 61 | /* [in] */ unsigned int funptr, 62 | /* [in] */ int pid, 63 | /* [string][in] */ wchar_t *wxid, 64 | /* [string][in] */ wchar_t *tid, 65 | /* [string][in] */ wchar_t *msg); 66 | 67 | int WSDKClkRecvPayMsg( 68 | /* [in] */ unsigned int funptr, 69 | /* [in] */ int pid, 70 | /* [string][in] */ wchar_t *wxid, 71 | /* [string][in] */ wchar_t *tid, 72 | /* [string][in] */ wchar_t *msg); 73 | 74 | 75 | extern handle_t WechatRsClk_IfHandle; 76 | 77 | 78 | extern RPC_IF_HANDLE WechatSDKClk_v1_0_c_ifspec; 79 | extern RPC_IF_HANDLE WechatSDKClk_v1_0_s_ifspec; 80 | #endif /* __WechatSDKClk_INTERFACE_DEFINED__ */ 81 | 82 | /* Additional Prototypes for ALL interfaces */ 83 | 84 | /* end of Additional Prototypes */ 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | 90 | #endif 91 | 92 | 93 | -------------------------------------------------------------------------------- /sdk/WeChatSDK.py: -------------------------------------------------------------------------------- 1 | #coding = utf8 2 | 3 | import ctypes, os, sys 4 | #https://blog.csdn.net/zmnbehappy/article/details/78697185 5 | #https://www.cnblogs.com/gaowengang/p/7919219.html 6 | 7 | RECVTEXTMSG_CALLBACK = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_wchar_p, ctypes.c_wchar_p) 8 | RECVPAYMSG_CALLBACK = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_wchar_p) 9 | 10 | class WXSDK(): 11 | def __init__(self): 12 | self.sdk = ctypes.CDLL("WeChatSDK.dll") 13 | 14 | def WXOpenWechat(self): 15 | self.pid = self.sdk.WXOpenWechat() 16 | return self.pid 17 | 18 | def WXIsWechatAlive(self): 19 | return self.sdk.WXIsWechatAlive(self.pid) 20 | 21 | def WXInitialize(self): 22 | return self.sdk.WXInitialize(self.pid) 23 | 24 | def WXUninitialize(self): 25 | return self.sdk.WXUninitialize(self.pid) 26 | 27 | def WXIsWechatSDKOk(self): 28 | return self.sdk.WXIsWechatSDKOk(self.pid) 29 | 30 | #def WXGetWechat(self, wxid): 31 | # self.pid = self.sdk.WXGetWechat(self.pid, wxid) 32 | # return self.pid 33 | 34 | def WXAntiRevokeMsg(self): 35 | return self.sdk.WXAntiRevokeMsg(self.pid) 36 | 37 | def WXUnAntiRevokeMsg(self): 38 | return self.sdk.WXUnAntiRevokeMsg(self.pid) 39 | 40 | def WXSaveVoiceMsg(self, path): 41 | return self.sdk.WXSaveVoiceMsg(self.pid, path) 42 | 43 | def WXUnSaveVoiceMsg(self): 44 | return self.sdk.WXUnSaveVoiceMsg(self.pid) 45 | 46 | def WXSendTextMsg(self, wxid, msg): 47 | return self.sdk.WXSendTextMsg(self.pid, wxid, msg) 48 | 49 | def WXRecvTextMsg(self, funptr): 50 | return self.sdk.WXRecvTextMsg(self.pid, funptr) 51 | 52 | def WXRecvTransferMsg(self, funptr): 53 | return self.sdk.WXRecvTransferMsg(self.pid, funptr) 54 | 55 | def WXRecvPayMsg(self, funptr): 56 | return self.sdk.WXRecvPayMsg(self.pid, funptr) 57 | 58 | def RecvTextMsg(pid, wxid, msg): 59 | print(pid, wxid, msg) 60 | return 0 61 | 62 | def RecvPayMsg(pid, wxid, id, msg): 63 | print(pid, wxid, id, msg) 64 | return 0 65 | 66 | g_RecvTextMsg = RECVTEXTMSG_CALLBACK(RecvTextMsg) 67 | 68 | if __name__ == "__main__": 69 | wxsdk = WXSDK() 70 | print(wxsdk.WXOpenWechat()) 71 | input("wait for...") 72 | print(wxsdk.WXIsWechatAlive()) 73 | print(wxsdk.WXIsWechatSDKOk()) 74 | print(wxsdk.WXInitialize()) 75 | input("wait for...") 76 | print(wxsdk.WXSendTextMsg("wxid_n11111", "This is a python sdk test msg")) 77 | wxsdk.WXRecvTextMsg(g_RecvTextMsg) 78 | input("wait for recv msg...") -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdk.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "sdk.h" 3 | #include "weixin.h" 4 | 5 | //#include "../common/sdkinf.h" 6 | //https ://blog.csdn.net/xxxluozhen/article/details/5605818 7 | //#pragma comment(lib, "..\\WeChatSDKCore\\Release\\WeChatRs.lib") 8 | //#include "../../common/sdkinf.h" 9 | #include "sdkdef_h.h" 10 | #include "rpcutil.h" 11 | 12 | //TODO: edit the file to add interface 13 | 14 | 15 | void RpcLoop() 16 | { 17 | StartSDKServer(GetCurrentProcessId()); 18 | OutputDebugString(L"exit...rpc"); 19 | } 20 | 21 | int InitSDK() 22 | { 23 | CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)RpcLoop, NULL, 0, NULL); 24 | return GetLastError(); 25 | } 26 | 27 | void UnInitSDK() 28 | { 29 | StopSDKServer(); 30 | } 31 | 32 | //sdkdef.idl 33 | 34 | int WSDKInitialize(void) 35 | { 36 | OutputDebugString(L"sdk::Initialize"); 37 | return 0; 38 | } 39 | 40 | int WSDKUninitialize() 41 | { 42 | OutputDebugString(L"sdk::Uninitialize"); 43 | //TODO: uninit 44 | return 0; 45 | } 46 | 47 | int WSDKAntiRevokeMsg(void) 48 | { 49 | OutputDebugString(L"sdk::AntiRevokeMsg"); 50 | return CoreFakeRevokeMsg(); 51 | } 52 | 53 | int WSDKUnAntiRevokeMsg(void) 54 | { 55 | OutputDebugString(L"sdk::UnAntiRevokeMsg"); 56 | CoreRestoreRevokeMsg(); 57 | return 0; 58 | } 59 | 60 | int WSDKStartSaveVoiceMsg( 61 | /* [string][in] */ wchar_t *path) 62 | { 63 | OutputDebugString(L"sdk::StartSaveVoiceMsg"); 64 | return CoreSaveVoiceMsg(path); 65 | } 66 | 67 | int WSDKStopSaveVoiceMsg(void) 68 | { 69 | OutputDebugString(L"sdk::StopSaveVoiceMsg"); 70 | return CoreUnSaveVoiceMsg(); 71 | } 72 | 73 | int WSDKSendTextMsg( 74 | /* [string][in] */ wchar_t *wxid, 75 | /* [string][in] */ wchar_t *msg) 76 | { 77 | OutputDebugString(L"sdk::SendTextMsg"); 78 | return CoreSendTxtMsg(wxid, msg); 79 | } 80 | 81 | int WSDKSendImageMsg( 82 | /* [string][in] */ wchar_t *wxid, 83 | /* [string][in] */ wchar_t *path) 84 | { 85 | OutputDebugString(L"sdk::SendImageMsg"); 86 | return CoreSendImageMsg(wxid, path); 87 | } 88 | 89 | int WSDKRecvTextMsg(unsigned int funptr) 90 | { 91 | OutputDebugString(L"sdk::RecvTextMsg"); 92 | return CoreRecvTextMsg(funptr); 93 | } 94 | 95 | int WSDKRecvTransferMsg(unsigned int funptr) 96 | { 97 | OutputDebugString(L"sdk::RecvTransferMsg"); 98 | return CoreRecvTransferMsg(funptr); 99 | } 100 | 101 | int WSDKRecvPayMsg(unsigned int funptr) 102 | { 103 | OutputDebugString(L"sdk::RecvPayMsg"); 104 | return CoreRecvPayMsg(funptr); 105 | } -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkdef_h.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the definitions for the interfaces */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.01.0622 */ 7 | /* at Tue Jan 19 11:14:07 2038 8 | */ 9 | /* Compiler settings for sdkdef.idl: 10 | Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 11 | protocol : dce , ms_ext, c_ext, robust 12 | error checks: allocation ref bounds_check enum stub_data 13 | VC __declspec() decoration level: 14 | __declspec(uuid()), __declspec(selectany), __declspec(novtable) 15 | DECLSPEC_UUID(), MIDL_INTERFACE() 16 | */ 17 | /* @@MIDL_FILE_HEADING( ) */ 18 | 19 | 20 | 21 | /* verify that the version is high enough to compile this file*/ 22 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 23 | #define __REQUIRED_RPCNDR_H_VERSION__ 500 24 | #endif 25 | 26 | #include "rpc.h" 27 | #include "rpcndr.h" 28 | 29 | #ifndef __RPCNDR_H_VERSION__ 30 | #error this stub requires an updated version of 31 | #endif /* __RPCNDR_H_VERSION__ */ 32 | 33 | 34 | #ifndef __sdkdef_h_h__ 35 | #define __sdkdef_h_h__ 36 | 37 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) 38 | #pragma once 39 | #endif 40 | 41 | /* Forward Declarations */ 42 | 43 | #ifdef __cplusplus 44 | extern "C"{ 45 | #endif 46 | 47 | 48 | #ifndef __WechatSDK_INTERFACE_DEFINED__ 49 | #define __WechatSDK_INTERFACE_DEFINED__ 50 | 51 | /* interface WechatSDK */ 52 | /* [implicit_handle][version][uuid] */ 53 | 54 | int WSDKInitialize( void); 55 | 56 | int WSDKUninitialize( void); 57 | 58 | int WSDKAntiRevokeMsg( void); 59 | 60 | int WSDKUnAntiRevokeMsg( void); 61 | 62 | int WSDKStartSaveVoiceMsg( 63 | /* [string][in] */ wchar_t *path); 64 | 65 | int WSDKStopSaveVoiceMsg( void); 66 | 67 | int WSDKSendTextMsg( 68 | /* [string][in] */ wchar_t *wxid, 69 | /* [string][in] */ wchar_t *msg); 70 | 71 | int WSDKSendImageMsg( 72 | /* [string][in] */ wchar_t *wxid, 73 | /* [string][in] */ wchar_t *path); 74 | 75 | int WSDKRecvTextMsg( 76 | /* [in] */ unsigned int funptr); 77 | 78 | int WSDKRecvTransferMsg( 79 | /* [in] */ unsigned int funptr); 80 | 81 | int WSDKRecvPayMsg( 82 | /* [in] */ unsigned int funptr); 83 | 84 | 85 | extern handle_t WechatRs_IfHandle; 86 | 87 | 88 | extern RPC_IF_HANDLE WechatSDK_v1_0_c_ifspec; 89 | extern RPC_IF_HANDLE WechatSDK_v1_0_s_ifspec; 90 | #endif /* __WechatSDK_INTERFACE_DEFINED__ */ 91 | 92 | /* Additional Prototypes for ALL interfaces */ 93 | 94 | /* end of Additional Prototypes */ 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif 101 | 102 | 103 | -------------------------------------------------------------------------------- /sdk/WeChatSDK.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace WeChatSDK 5 | { 6 | class WeChatSDK 7 | { 8 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 9 | extern static public uint WXOpenWechat(); 10 | 11 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 12 | extern static public bool WXIsWechatAlive(uint pid); 13 | 14 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 15 | extern static public int WXInitialize(uint pid); 16 | 17 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 18 | extern static public int WXUninitialize(uint pid); 19 | 20 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 21 | extern static public bool WXIsWechatSDKOk(uint pid); 22 | 23 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 24 | extern static public int WXGetWechat(string wxid); 25 | 26 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 27 | extern static public int WXAntiRevokeMsg(uint pid); 28 | 29 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 30 | extern static public int WXUnAntiRevokeMsg(uint pid); 31 | 32 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)] 33 | extern static public int WXSaveVoiceMsg(uint pid, string path); 34 | 35 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 36 | extern static public int WXUnSaveVoiceMsg(uint pid); 37 | 38 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)] 39 | extern static public int WXSendTextMsg(uint pid, string wxid, string msg); 40 | 41 | [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Unicode)] 42 | public delegate int RecvMsgCallback(uint pid, string wxid, string msg); 43 | 44 | [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Unicode)] 45 | public delegate int RecvPayMsgCallback(uint pid, string wxid, string id, string msg); 46 | 47 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 48 | extern static public int WXRecvTextMsg(uint pid, RecvMsgCallback funptr); 49 | 50 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 51 | extern static public int WXRecvTransferMsg(uint pid, RecvPayMsgCallback funptr); 52 | 53 | [DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] 54 | extern static public int WXRecvPayMsg(uint pid, RecvPayMsgCallback funptr); 55 | } 56 | } -------------------------------------------------------------------------------- /src/WeChatSDK/util.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include 4 | 5 | #pragma comment(lib, "Version.lib") 6 | 7 | bool GetFileVersion(LPTSTR lpszFilePath, LPTSTR version) 8 | { 9 | 10 | if (_tcslen(lpszFilePath) > 0 && PathFileExists(lpszFilePath)) 11 | { 12 | VS_FIXEDFILEINFO *pVerInfo = NULL; 13 | DWORD dwTemp, dwSize; 14 | BYTE *pData = NULL; 15 | UINT uLen; 16 | 17 | dwSize = GetFileVersionInfoSize(lpszFilePath, &dwTemp); 18 | if (dwSize == 0) 19 | { 20 | return false; 21 | } 22 | 23 | pData = new BYTE[dwSize + 1]; 24 | if (pData == NULL) 25 | { 26 | return false; 27 | } 28 | 29 | if (!GetFileVersionInfo(lpszFilePath, 0, dwSize, pData)) 30 | { 31 | delete[] pData; 32 | return false; 33 | } 34 | 35 | if (!VerQueryValue(pData, TEXT("\\"), (void **)&pVerInfo, &uLen)) 36 | { 37 | delete[] pData; 38 | return false; 39 | } 40 | 41 | DWORD verMS = pVerInfo->dwFileVersionMS; 42 | DWORD verLS = pVerInfo->dwFileVersionLS; 43 | DWORD major = HIWORD(verMS); 44 | DWORD minor = LOWORD(verMS); 45 | DWORD build = HIWORD(verLS); 46 | DWORD revision = LOWORD(verLS); 47 | delete[] pData; 48 | 49 | StringCbPrintf(version, 0x20, TEXT("%d.%d.%d.%d"), major, minor, build, revision); 50 | 51 | return true; 52 | } 53 | 54 | return false; 55 | } 56 | 57 | 58 | int GetWeChatPath(WCHAR* Path) 59 | { 60 | int ret = -1; 61 | //HKEY_CURRENT_USER\Software\Tencent\WeChat InstallPath = xx 62 | HKEY hKey = NULL; 63 | if (ERROR_SUCCESS != RegOpenKey(HKEY_CURRENT_USER, L"Software\\Tencent\\WeChat", &hKey)) 64 | { 65 | ret = GetLastError(); 66 | return ret; 67 | } 68 | 69 | DWORD Type = REG_SZ; 70 | // WCHAR Path[MAX_PATH] = { 0 }; 71 | DWORD cbData = MAX_PATH * sizeof(WCHAR); 72 | if (ERROR_SUCCESS != RegQueryValueEx(hKey, L"InstallPath", 0, &Type, (LPBYTE)Path, &cbData)) 73 | { 74 | ret = GetLastError(); 75 | goto __exit; 76 | } 77 | 78 | PathAppend(Path, L"WeChat.exe"); 79 | 80 | __exit: 81 | if (hKey) 82 | { 83 | RegCloseKey(hKey); 84 | } 85 | 86 | return ERROR_SUCCESS; 87 | } 88 | 89 | int GetWeChatWinPath(WCHAR* Path) 90 | { 91 | int ret = GetWeChatPath(Path); 92 | if (ret != ERROR_SUCCESS) { 93 | return ret; 94 | } 95 | 96 | PathRemoveFileSpecW(Path); 97 | PathAppendW(Path, L"WeChatWin.dll"); 98 | 99 | return ret; 100 | } 101 | 102 | int GetWeChatVersion(WCHAR* version) 103 | { 104 | WCHAR Path[MAX_PATH] = { 0 }; 105 | 106 | int ret = GetWeChatWinPath(Path); 107 | if (ret != ERROR_SUCCESS) { 108 | return ret; 109 | } 110 | 111 | ret = GetFileVersion(Path, version); 112 | 113 | return ret; 114 | } -------------------------------------------------------------------------------- /src/WeChatSDKCore/WeChatSDKCore.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WeChatSDKCore", "WeChatResource.vcxproj", "{CC8544D5-1A6E-4515-B737-4DA205371032}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WeChatSDK", "..\WeChatSDK\WeChatSDK.vcxproj", "{3863B180-E079-4735-ABF7-13552EE0C3F1}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WeChatSDKTest", "..\WeChatSDKTest\WeChatSDKTest.vcxproj", "{00EC6E77-8926-4860-A73F-3E5DBBE6221B}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|x64 = Debug|x64 15 | Debug|x86 = Debug|x86 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {CC8544D5-1A6E-4515-B737-4DA205371032}.Debug|x64.ActiveCfg = Debug|x64 21 | {CC8544D5-1A6E-4515-B737-4DA205371032}.Debug|x64.Build.0 = Debug|x64 22 | {CC8544D5-1A6E-4515-B737-4DA205371032}.Debug|x86.ActiveCfg = Debug|Win32 23 | {CC8544D5-1A6E-4515-B737-4DA205371032}.Debug|x86.Build.0 = Debug|Win32 24 | {CC8544D5-1A6E-4515-B737-4DA205371032}.Release|x64.ActiveCfg = Release|x64 25 | {CC8544D5-1A6E-4515-B737-4DA205371032}.Release|x64.Build.0 = Release|x64 26 | {CC8544D5-1A6E-4515-B737-4DA205371032}.Release|x86.ActiveCfg = Release|Win32 27 | {CC8544D5-1A6E-4515-B737-4DA205371032}.Release|x86.Build.0 = Release|Win32 28 | {3863B180-E079-4735-ABF7-13552EE0C3F1}.Debug|x64.ActiveCfg = Debug|x64 29 | {3863B180-E079-4735-ABF7-13552EE0C3F1}.Debug|x64.Build.0 = Debug|x64 30 | {3863B180-E079-4735-ABF7-13552EE0C3F1}.Debug|x86.ActiveCfg = Debug|Win32 31 | {3863B180-E079-4735-ABF7-13552EE0C3F1}.Debug|x86.Build.0 = Debug|Win32 32 | {3863B180-E079-4735-ABF7-13552EE0C3F1}.Release|x64.ActiveCfg = Release|x64 33 | {3863B180-E079-4735-ABF7-13552EE0C3F1}.Release|x64.Build.0 = Release|x64 34 | {3863B180-E079-4735-ABF7-13552EE0C3F1}.Release|x86.ActiveCfg = Release|Win32 35 | {3863B180-E079-4735-ABF7-13552EE0C3F1}.Release|x86.Build.0 = Release|Win32 36 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B}.Debug|x64.ActiveCfg = Debug|x64 37 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B}.Debug|x64.Build.0 = Debug|x64 38 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B}.Debug|x86.ActiveCfg = Debug|Win32 39 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B}.Debug|x86.Build.0 = Debug|Win32 40 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B}.Release|x64.ActiveCfg = Release|x64 41 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B}.Release|x64.Build.0 = Release|x64 42 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B}.Release|x86.ActiveCfg = Release|Win32 43 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B}.Release|x86.Build.0 = Release|Win32 44 | EndGlobalSection 45 | GlobalSection(SolutionProperties) = preSolution 46 | HideSolutionNode = FALSE 47 | EndGlobalSection 48 | GlobalSection(ExtensibilityGlobals) = postSolution 49 | SolutionGuid = {8690BB29-4D47-4F0C-B4BB-0F346773488A} 50 | EndGlobalSection 51 | EndGlobal 52 | -------------------------------------------------------------------------------- /docs/sdkmore.md: -------------------------------------------------------------------------------- 1 | 2 | `WeChatSDK`其他语言接口文档。 3 | 4 | ## Python 5 | 6 | 发布`Python`版本的接口,具体使用见`sdk/WeChatSDK.py`。 7 | 8 | ``` 9 | //需管理员运行python 10 | wxsdk = WXSDK() 11 | print(wxsdk.WXOpenWechat()) 12 | input("wait for...") 13 | print(wxsdk.WXIsWechatAlive()) 14 | print(wxsdk.WXIsWechatSDKOk()) 15 | print(wxsdk.WXInitialize()) 16 | input("wait for...") 17 | print(wxsdk.WXSendTextMsg("wxid_n11111", "This is a python sdk test msg")) 18 | ``` 19 | 20 | ## Java 21 | 22 | 发布`Java`版本的接口,具体使用见`sdk/WeChatSDK.java`和`TestJavaSDK.java`。 23 | 24 | 由于`Java`接口使用了`jna`,所以需要下载[jna.jar](http://repo1.maven.org/maven2/net/java/dev/jna/jna/5.2.0/jna-5.2.0.jar),具体编译方法请查找`Java`相关文章。 25 | 26 | ``` 27 | //需管理员运行java 28 | public class TestJavaSDK { 29 | public static void main(String[] argv) throws Exception { 30 | System.out.println("hello java WechatSDK"); 31 | 32 | int pid = WeChatSDK.sdk.WXOpenWechat(); 33 | if(pid <= 0) { 34 | System.out.println("hello java WechatSDK"); 35 | return; 36 | } 37 | 38 | System.out.println("pid: " + pid); 39 | 40 | System.out.println("wait for..."); 41 | System.in.read(); 42 | 43 | System.out.println(WeChatSDK.sdk.WXIsWechatAlive(pid)); 44 | System.out.println(WeChatSDK.sdk.WXIsWechatSDKOk(pid)); 45 | System.out.println(WeChatSDK.sdk.WXInitialize(pid)); 46 | System.out.println("wait for..."); 47 | System.in.read(); 48 | System.out.println(WeChatSDK.sdk.WXSendTextMsg(pid, new WString("wxid_11111"), new WString("This is a java sdk test msg"))); 49 | System.in.read(); 50 | } 51 | } 52 | ``` 53 | 54 | ## C# 55 | 56 | 发布`Java`版本的接口,具体使用见`sdk/WeChatSDK.cs`和`TestSDK.cs`。 57 | 58 | ``` 59 | //需管理员运行 60 | using static WeChatSDK.WeChatSDK; 61 | 62 | namespace ConsoleApp1 63 | { 64 | class Program 65 | { 66 | static void Main(string[] args) 67 | { 68 | try 69 | { 70 | uint pid = WXOpenWechat(); 71 | Console.WriteLine("WXOpenWechat pid:" + pid); 72 | 73 | while (!WXIsWechatAlive(pid)) 74 | { 75 | Console.Write("."); 76 | Thread.Sleep(100); 77 | } 78 | Console.WriteLine("initialize sdk..."); 79 | Console.WriteLine(WXInitialize(pid)); 80 | while (!WXIsWechatSDKOk(pid)) 81 | { 82 | Console.Write("."); 83 | Thread.Sleep(100); 84 | } 85 | Console.WriteLine("sdk ok..."); 86 | WXAntiRevokeMsg(pid); 87 | WXSaveVoiceMsg(pid, "c:\\wxmsg"); 88 | 89 | WXRecvPayMsg(pid, RecvPayMsg); 90 | 91 | Console.ReadLine(); 92 | } 93 | catch (Exception ex) 94 | { 95 | Console.WriteLine(ex.ToString()); 96 | } 97 | } 98 | static int RecvMoneyMsg(UInt32 pid, string wxid, string id, string msg) 99 | { 100 | Console.WriteLine(wxid + ":" + msg); 101 | return 0; 102 | } 103 | } 104 | } 105 | ``` -------------------------------------------------------------------------------- /src/WeChatSDKCore/util.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "util.h" 3 | 4 | bool GetFileVersion(LPTSTR lpszFilePath, LPTSTR version) 5 | { 6 | 7 | if (_tcslen(lpszFilePath) > 0 && PathFileExists(lpszFilePath)) 8 | { 9 | VS_FIXEDFILEINFO *pVerInfo = NULL; 10 | DWORD dwTemp, dwSize; 11 | BYTE *pData = NULL; 12 | UINT uLen; 13 | 14 | dwSize = GetFileVersionInfoSize(lpszFilePath, &dwTemp); 15 | if (dwSize == 0) 16 | { 17 | return false; 18 | } 19 | 20 | pData = new BYTE[dwSize + 1]; 21 | if (pData == NULL) 22 | { 23 | return false; 24 | } 25 | 26 | if (!GetFileVersionInfo(lpszFilePath, 0, dwSize, pData)) 27 | { 28 | delete[] pData; 29 | return false; 30 | } 31 | 32 | if (!VerQueryValue(pData, TEXT("\\"), (void **)&pVerInfo, &uLen)) 33 | { 34 | delete[] pData; 35 | return false; 36 | } 37 | 38 | DWORD verMS = pVerInfo->dwFileVersionMS; 39 | DWORD verLS = pVerInfo->dwFileVersionLS; 40 | DWORD major = HIWORD(verMS); 41 | DWORD minor = LOWORD(verMS); 42 | DWORD build = HIWORD(verLS); 43 | DWORD revision = LOWORD(verLS); 44 | delete[] pData; 45 | 46 | StringCbPrintf(version, 0x20, TEXT("%d.%d.%d.%d"), major, minor, build, revision); 47 | 48 | return true; 49 | } 50 | 51 | return false; 52 | } 53 | 54 | void Patch(PVOID addr, DWORD size, PVOID code) 55 | { 56 | DWORD lpOldPro = 0; 57 | if (!VirtualProtect((LPVOID)addr, size, PAGE_EXECUTE_READWRITE, &lpOldPro)) 58 | { 59 | return; 60 | } 61 | memcpy((char*)addr, (char*)code, size); 62 | 63 | if (!VirtualProtect((LPVOID)addr, size, lpOldPro, &lpOldPro)) 64 | { 65 | } 66 | } 67 | 68 | PVOID NextAddr(PVOID addr, DWORD asm_size /*= 5*/) 69 | { 70 | return (char*)addr + asm_size; 71 | } 72 | 73 | LONG JmpOffset(PVOID dst, PVOID next) 74 | { 75 | return (LONG)dst - (LONG)next; 76 | } 77 | 78 | LONG CallOffset(PVOID addr, DWORD callsize) 79 | { 80 | return *((LONG*)((char*)addr + callsize)); 81 | } 82 | 83 | LONGLONG CallOffset64(PVOID addr, DWORD callsize) 84 | { 85 | return *((LONGLONG*)((char*)addr + callsize)); 86 | } 87 | 88 | PVOID CallTarget(PVOID addr, DWORD callsize, DWORD codesize) 89 | { 90 | PVOID next = NextAddr(addr, codesize); 91 | LONG offset = CallOffset(addr, callsize); 92 | return (PVOID)((LONG)next + offset); 93 | } 94 | 95 | //E8 D0 FC 22 00 call sub_104830B0 96 | void InlineHookE8(PVOID src, PVOID target, PVOID* orgfun) 97 | { 98 | BYTE code[5] = { 0xE8, 0x00, 0x00, 0x00, 0x00 }; 99 | 100 | PVOID next = NextAddr((PVOID)src, 5); 101 | LONG offset = JmpOffset(target, next); 102 | 103 | if (orgfun) { 104 | *orgfun = CallTarget(src, 1, 5); 105 | } 106 | 107 | *((DWORD*)&code[1]) = offset; 108 | Patch(src, 5, code); 109 | } 110 | 111 | wchar_t* SplitStr(const wchar_t* src, const wchar_t* f1, const wchar_t* f2) 112 | { 113 | const wchar_t* p = wcsstr(src, f1); 114 | if (p == NULL) { 115 | return NULL; 116 | } 117 | p = p + wcslen(f1); 118 | const wchar_t* p1 = wcsstr(p, f2); 119 | if (p1 == NULL) { 120 | return NULL; 121 | } 122 | 123 | int len = p1 - p; 124 | if (len <= 0) { 125 | return NULL; 126 | } 127 | wchar_t* dst = new wchar_t[len + 2]; 128 | if (dst == NULL) { 129 | return NULL; 130 | } 131 | memset(dst, 0, (len + 2) * sizeof(wchar_t)); 132 | memcpy(dst, p, len * sizeof(wchar_t)); 133 | 134 | return dst; 135 | } -------------------------------------------------------------------------------- /src/WeChatSDK/WeChatSDK.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {f2c8e71e-ece9-4410-a55b-b86768c50a6b} 18 | 19 | 20 | 21 | 22 | 头文件 23 | 24 | 25 | 头文件 26 | 27 | 28 | 头文件 29 | 30 | 31 | 头文件 32 | 33 | 34 | 头文件 35 | 36 | 37 | 头文件 38 | 39 | 40 | rpc 41 | 42 | 43 | rpc 44 | 45 | 46 | rpc 47 | 48 | 49 | rpc 50 | 51 | 52 | rpc 53 | 54 | 55 | 头文件 56 | 57 | 58 | 59 | 60 | 源文件 61 | 62 | 63 | 源文件 64 | 65 | 66 | 源文件 67 | 68 | 69 | 源文件 70 | 71 | 72 | rpc 73 | 74 | 75 | rpc 76 | 77 | 78 | rpc 79 | 80 | 81 | rpc 82 | 83 | 84 | 源文件 85 | 86 | 87 | 源文件 88 | 89 | 90 | 91 | 92 | 源文件 93 | 94 | 95 | 96 | 97 | 资源文件 98 | 99 | 100 | -------------------------------------------------------------------------------- /docs/sdk.md: -------------------------------------------------------------------------------- 1 | ## WeChatSDK介绍 2 | 3 | `WeChatSDK`提供方便操作`PC`端微信的超级接口,提供包括多开、防撤销、语音备份、消息发送、加好友等接口。第三方可以直接使用`WeChatSDK`来开发自己的应用,不用再在分析微信功能、协议上耗费精力,`WeChatSDK`替你完成。 4 | 5 | ![WeChatSDK框架](sdk.png) 6 | 7 | `WeChatSDK`通过`WeChatSDK.dll`对外暴露接口,第三方只需要调用接口就能完成想要的功能。 8 | 9 | `WeChatSDK.dll`内部通过`RPC`通信和注入到微信进程的`WeChatSDKCore.dll`进行功能调用,支持多开微信功能的调用,微信间互不影响。 10 | 11 | 在新版本(`1.3.0`)中,`WeChatRs`、`WeChatRc`是虚拟模块,代码合入到`WeChatSDKCore`和`WeChatSDK`中,并且实现了RPC双向通信,用于支持`WeChatSDK`设置回调。 12 | 13 | ## WeChatSDK使用 14 | 15 | 复制`WeChatSDK`目录中的`sdk.h`、`WeChatSDK.dll`以及`WeChatSDK.lib`(或者显示调用接口)到自己项目中,然后调用`sdk.h`中的接口定义进行代码开发即可。 16 | 17 | 发布时需要把所有模块都同时发布出去,包括`WeChatSDK.dll`,`WeChatSDKCore.dll`(**新版已经将另外两个模块合并**)。 18 | ~~发布时需要把所有模块都同时发布出去,包括`WeChatSDK.dll`,`WeChatSDKCore.dll`,`WeChatRs.dll`,`WeChatRc.dll`。~~ 19 | 20 | **源码目录介绍** 21 | 22 | ``` 23 | bin //老版本 24 | docs //文档 25 | sdk //vs2017 x86编译完成的sdk模块,其他语言的sdk 26 | src 27 | |- common //公共目录 28 | |- WeChatSDK //WeChatSDK.dll 29 | |- WeChatSDKCore //WeChatSDKCore.dll 30 | |- WeChatSDKTest //SDK示例,普通用户多开工具 31 | ``` 32 | 33 | 编译顺序(vs2017 x86): 34 | 35 | ``` 36 | WeChatSDKCore -> WeChatSDK 37 | ``` 38 | 39 | ## WeChatSDK接口 40 | 41 | ``` 42 | int WXOpenWechat(); 43 | 启动微信,支持多开。返回值是微信进程pid,需保存用于后续接口调用。pid即代表多开的每个微信进程,指定pid调用接口使用操作对应的微信。**注意:该接口需要管理员权限。** 44 | 45 | bool WXIsWechatAlive(DWORD pid); 46 | 检查微信是否启动成功,pid是WXOpenWechat返回值。返回true为成功。 47 | 48 | int WXInitialize(DWORD pid); 49 | 初始化WeChatSDK。在调用其他接口之前需要调用此接口,否则SDK无法正常工作。pid是WXOpenWechat返回值。返回0表示成功。由于涉及到注入功能,如引起杀毒软件误报,请通过。 50 | 51 | int WXUninitialize(DWORD pid); 52 | 反初始化WeChatSDK,卸载SDK,一般不需要调用。pid是WXOpenWechat返回值。返回0表示成功。 53 | 54 | bool WXIsWechatSDKOk(DWORD pid); 55 | 检查初始化WeChatSDK是否成功。在检查到成功之后才能调用其他接口,否则SDK无法正常工作。pid是WXOpenWechat返回值。返回true表示成功。 56 | 57 | int WXAntiRevokeMsg(DWORD pid); 58 | 开启防消息撤销功能。pid是WXOpenWechat返回值。返回0表示成功。在1.3.0版本中更换实现方式,增加撤销提示,防止出现某些不可预见情况。 59 | 60 | int WXUnAntiRevokeMsg(DWORD pid); 61 | 关闭防消息撤销功能。pid是WXOpenWechat返回值。返回0表示成功。 62 | 63 | int WXSaveVoiceMsg(DWORD pid, const wchar_t* path); 64 | 开启备份语音功能。pid是WXOpenWechat返回值,path指定语音备份位置的目录全路径。返回0表示成功。 65 | 66 | int WXUnSaveVoiceMsg(DWORD pid); 67 | 关闭备份语音功能。pid是WXOpenWechat返回值。返回0表示成功。 68 | 69 | int WXSendTextMsg(DWORD pid, const wchar_t* wxid, const wchar_t* msg); 70 | 发送文字消息接口,支持表情[x]。pid是WXOpenWechat返回值,wxid指定要发送对象的wxid,msg指定要发送内容。返回0表示成功。后续会提供通过微信名或昵称获取wxid接口。 71 | 72 | int WXGetWechat(const wchar_t* wxid); 73 | 通过wxid找到已经打开的微信的pid,实现不完整,不建议使用。 74 | 75 | typedef int(*PFNRECVTEXTMSG_CALLBACK)(int pid, wchar_t* wxid, wchar_t* msg); 76 | int WXRecvTextMsg(DWORD pid, PFNRECVTEXTMSG_CALLBACK funptr); 77 | 设置接受文字消息的回调函数,在回调函数中自行处理消息。pid是WXOpenWechat返回值,funptr是回调函数,PFNRECVTEXTMSG_CALLBACK是回调接口声明。 78 | 79 | int WXRecvTransferMsg(DWORD pid, PFNRECVMONEYMSG_CALLBACK funptr); 80 | int WXRecvPayMsg(DWORD pid, PFNRECVMONEYMSG_CALLBACK funptr); 81 | 设置支付相关回调接口。 82 | 83 | //void WXSendGroupTextMsg(); //暂不支持 84 | //void WXSendImageMsg(); //暂不支持 85 | //void WXSendVoiceMsg(); //暂不支持 86 | //void WXAddFriend(); //暂不支持 87 | //void WXAddGroupFriends(); //暂不支持 88 | //void WXAcceptFriend(); //暂不支持 89 | //void WXDeleteFriend(); //暂不支持 90 | //void WXGetUserWxid(); //暂不支持 91 | ``` 92 | 93 | 详细请参考`WeChatSDKTest`使用方法。 94 | 95 | 其他语言接口请看[文档](sdkmore.md),目前已经发布`Python`,`Java`, `C#`接口。 96 | 97 | ## TODO 98 | 99 | 1. 加好友接口 100 | 2. 接受好友接口 101 | 3. 获取wxid 102 | 4. 删除好友 103 | 5. 加群好友 104 | 6. ... 105 | 106 | 后续更新请关注公众号推送。 107 | 108 | ![img](wx.png) 109 | 110 | 欢迎PR或提供意见建议。 111 | 112 | **开源不易,无数深夜的寒风需要你的点滴暖意。** 113 | 114 | ![img](pay.png) -------------------------------------------------------------------------------- /src/WeChatSDKCore/voice.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "mhook.h" 3 | #include "voice.h" 4 | #include "weixin.h" 5 | 6 | const SuppWxCfg g_Supported_wxVoiceMsg_Version[] = { 7 | //{ TEXT("2.6.5.38"), 0x247EF1 ,{3, {0x8A, 0x45, 0xF3}, 3, {0x33, 0xc0, 0x90}}}, 8 | //{ TEXT("2.6.6.25"), 0x24BA81 ,{3, {0x8A, 0x45, 0xF3}, 3, {0x33, 0xc0, 0x90}}}, 9 | { TEXT("2.6.6.28"), 0x24D5A0 ,{0}}, //voiicemsg 10 | { TEXT("2.6.6.44"), 0x24D970 ,{0}}, //voiicemsg 11 | { TEXT("2.6.7.32"), 0x254ED0 ,{0}}, //voiicemsg 12 | { TEXT("2.6.7.40"), 0x254F50 ,{0}}, //voiicemsg 13 | }; 14 | // 15 | //typedef struct _wxstring 16 | //{ 17 | // wchar_t* buf; 18 | // int len; 19 | // int maxlen; 20 | //}wxstring, *pwxstring; 21 | // 22 | //typedef struct _wxstring_ansi 23 | //{ 24 | // char* buf; 25 | // int len; 26 | // int maxlen; 27 | //}wxstring_ansi, *pwxstring_ansi; 28 | // 29 | //typedef struct _wxmsg 30 | //{ 31 | // char unk[0x40];// 32 | // wxstring wxid1;//40 from 33 | // wxstring_ansi wxid1_ansi;//4c 34 | // char unk1[0x10];//58 35 | // wxstring msg;//68 xml 36 | // wxstring_ansi msg_ansi;//74 37 | // char unk2[0x50];//80 38 | // char unk3[0x44];//d0 39 | // wxstring wxid2;//0x114 40 | // DWORD unk4;//120 41 | // DWORD unk5;//124 42 | // wxstring hash;//128 43 | // //134 44 | //} wxmsg, *pwxmsg; 45 | 46 | 47 | typedef int(__stdcall* PFNVoiceDecodeInternal)(int voice, int size, int from, int a4); 48 | 49 | PFNVoiceDecodeInternal pfnVoiceDecodeInternal = NULL; 50 | TCHAR SildDirPath[MAX_PATH] = { 0 }; 51 | 52 | void CreateSilkDir(const TCHAR* path) 53 | { 54 | TCHAR pathDir[MAX_PATH] = { 0 }; 55 | 56 | _tcscpy_s(pathDir, path); 57 | if (!PathFileExists(pathDir)) { 58 | PathRemoveFileSpec(pathDir); 59 | CreateSilkDir(pathDir); 60 | CreateDirectory(path, NULL); 61 | } 62 | } 63 | 64 | void* Silk2Mp3(void* data, int size) 65 | { 66 | //https://github.com/kn007/silk-v3-decoder 67 | return NULL; 68 | } 69 | 70 | void SaveSilk(void* data, int size, const TCHAR* path, const TCHAR* name) 71 | { 72 | DWORD dwWritten = 0; 73 | TCHAR FullPath[MAX_PATH] = { 0 }; 74 | 75 | _tcscpy_s(FullPath, path); 76 | PathAppend(FullPath, name); 77 | 78 | if (PathFileExists(FullPath)) { 79 | return; 80 | } 81 | 82 | CreateSilkDir(path); 83 | 84 | if (PathFileExists(path)) { 85 | HANDLE hFile = CreateFile(FullPath, GENERIC_ALL, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); 86 | if (hFile != INVALID_HANDLE_VALUE) { 87 | //TODO: convert silk to mp3 88 | Silk2Mp3(data, size); 89 | WriteFile(hFile, data, size, &dwWritten, NULL); 90 | CloseHandle(hFile); 91 | } 92 | } 93 | } 94 | 95 | VOID SetSildDirPath(const TCHAR* path) 96 | { 97 | _tcscpy_s(SildDirPath, path); 98 | } 99 | 100 | PVOID * GetOrigVocieDecodeInternal() 101 | { 102 | return (PVOID *)&pfnVoiceDecodeInternal; 103 | } 104 | 105 | /* 106 | 107 | */ 108 | const WCHAR* GetBufId(const WCHAR* xml, WCHAR* bufid) 109 | { 110 | const WCHAR* p = _tcsstr(xml, L"bufid=\""); 111 | if (p) { 112 | p = p + _tcslen(L"bufid=\""); 113 | WCHAR* p1 = (WCHAR*)_tcsstr(p, L"\""); 114 | if (p1) { 115 | memcpy(bufid, p, (p1 - p) * sizeof(WCHAR)); 116 | } 117 | } 118 | return bufid; 119 | } 120 | 121 | int __stdcall fakeVoiceDecodeInternal(int voice, int size, int from, int a4) 122 | { 123 | wxmsg* m = (wxmsg*)from; 124 | WCHAR bufid[100] = { 0 }; 125 | TCHAR name[MAX_PATH] = { 0 }; 126 | PVOID pData = (PVOID)voice; 127 | int nDataSize = size; 128 | 129 | 130 | if (SildDirPath) { 131 | wsprintf(name, TEXT("%ws_%ws.silk"), m->wxid1.buf, GetBufId((const WCHAR*)(m->msg.buf), bufid)); 132 | SaveSilk(pData, nDataSize, SildDirPath, name); 133 | } 134 | 135 | return pfnVoiceDecodeInternal(voice, size, from, a4); 136 | } 137 | 138 | int CoreSaveVoiceMsg(wchar_t *path) 139 | { 140 | HMODULE hMod = GetModuleHandle(WECHATWINDLL); 141 | if (hMod == NULL) { 142 | return false; 143 | } 144 | SetSildDirPath(path); 145 | DWORD voiceMsgOffset = 0; 146 | if (IsSupportedWxVersion( 147 | g_Supported_wxVoiceMsg_Version, 148 | ARRAYSIZE(g_Supported_wxVoiceMsg_Version), 149 | &voiceMsgOffset)) 150 | { 151 | PVOID* p = GetOrigVocieDecodeInternal(); 152 | *p = (PVOID)((DWORD)hMod + voiceMsgOffset); 153 | if (!Mhook_SetHook(p, fakeVoiceDecodeInternal)) { 154 | *p = NULL; 155 | return ERROR_INVALID_ADDRESS; 156 | } 157 | else { 158 | return ERROR_SUCCESS; 159 | } 160 | } 161 | else { 162 | return ERROR_NOT_SUPPORTED; 163 | } 164 | } 165 | 166 | int CoreUnSaveVoiceMsg(void) 167 | { 168 | PVOID* p = GetOrigVocieDecodeInternal(); 169 | if (*p) { 170 | Mhook_Unhook(p); 171 | } 172 | SetSildDirPath(L""); 173 | return ERROR_SUCCESS; 174 | } -------------------------------------------------------------------------------- /src/WeChatSDKTest/WeChatSDKTest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 15.0 23 | {00EC6E77-8926-4860-A73F-3E5DBBE6221B} 24 | Win32Proj 25 | WeChatSDKTest 26 | 10.0.17134.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v141 33 | Unicode 34 | 35 | 36 | Application 37 | false 38 | v141 39 | true 40 | Unicode 41 | Static 42 | 43 | 44 | Application 45 | true 46 | v141 47 | Unicode 48 | 49 | 50 | Application 51 | false 52 | v141 53 | true 54 | Unicode 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | false 76 | 77 | 78 | true 79 | 80 | 81 | true 82 | 83 | 84 | false 85 | 86 | 87 | 88 | Use 89 | Level3 90 | MaxSpeed 91 | true 92 | true 93 | true 94 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 95 | true 96 | pch.h 97 | MultiThreaded 98 | 99 | 100 | Console 101 | true 102 | true 103 | true 104 | RequireAdministrator 105 | 106 | 107 | copy "$(OutDir)$(TargetName)$(TargetExt)" "../../sdk/SuperWeChat.exe" 108 | 109 | 110 | 111 | 112 | Use 113 | Level3 114 | Disabled 115 | true 116 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 117 | true 118 | pch.h 119 | 120 | 121 | Console 122 | true 123 | 124 | 125 | 126 | 127 | Use 128 | Level3 129 | Disabled 130 | true 131 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 132 | true 133 | pch.h 134 | 135 | 136 | Console 137 | true 138 | 139 | 140 | 141 | 142 | Use 143 | Level3 144 | MaxSpeed 145 | true 146 | true 147 | true 148 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 149 | true 150 | pch.h 151 | 152 | 153 | Console 154 | true 155 | true 156 | true 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | Create 166 | Create 167 | Create 168 | Create 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /src/WeChatSDK/WeChatSDK.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 15.0 23 | {3863B180-E079-4735-ABF7-13552EE0C3F1} 24 | Win32Proj 25 | WeChatSDK 26 | 10.0.17134.0 27 | 28 | 29 | 30 | DynamicLibrary 31 | true 32 | v141 33 | Unicode 34 | 35 | 36 | DynamicLibrary 37 | false 38 | v141 39 | true 40 | Unicode 41 | Static 42 | 43 | 44 | DynamicLibrary 45 | true 46 | v141 47 | Unicode 48 | 49 | 50 | DynamicLibrary 51 | false 52 | v141 53 | true 54 | Unicode 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | false 76 | 77 | 78 | true 79 | 80 | 81 | true 82 | 83 | 84 | false 85 | 86 | 87 | 88 | Use 89 | Level3 90 | MaxSpeed 91 | true 92 | true 93 | true 94 | WIN32;NDEBUG;WECHATSDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 95 | true 96 | MultiThreaded 97 | 98 | 99 | Windows 100 | true 101 | true 102 | true 103 | sdk.def 104 | 105 | 106 | copy "$(OutDir)$(TargetName)$(TargetExt)" "../../sdk/$(TargetName)$(TargetExt)" 107 | copy "sdk.h" "../../sdk/sdk.h" 108 | 109 | 110 | 111 | 112 | Use 113 | Level3 114 | Disabled 115 | true 116 | WIN32;_DEBUG;WECHATSDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 117 | true 118 | 119 | 120 | Windows 121 | true 122 | 123 | 124 | 125 | 126 | Use 127 | Level3 128 | Disabled 129 | true 130 | _DEBUG;WECHATSDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 131 | true 132 | 133 | 134 | Windows 135 | true 136 | 137 | 138 | 139 | 140 | Use 141 | Level3 142 | MaxSpeed 143 | true 144 | true 145 | true 146 | NDEBUG;WECHATSDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 147 | true 148 | 149 | 150 | Windows 151 | true 152 | true 153 | true 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | NotUsing 173 | 174 | 175 | NotUsing 176 | 177 | 178 | NotUsing 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | Create 187 | Create 188 | Create 189 | Create 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/WeChatResource.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 15.0 23 | {CC8544D5-1A6E-4515-B737-4DA205371032} 24 | Win32Proj 25 | WeChatResource 26 | 10.0.17134.0 27 | WeChatSDKCore 28 | 29 | 30 | 31 | DynamicLibrary 32 | true 33 | v141 34 | Unicode 35 | 36 | 37 | DynamicLibrary 38 | false 39 | v141 40 | true 41 | Unicode 42 | Static 43 | 44 | 45 | DynamicLibrary 46 | true 47 | v141 48 | Unicode 49 | 50 | 51 | DynamicLibrary 52 | false 53 | v141 54 | true 55 | Unicode 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | true 77 | 78 | 79 | true 80 | 81 | 82 | false 83 | 84 | 85 | false 86 | 87 | 88 | 89 | Use 90 | Level3 91 | Disabled 92 | true 93 | WIN32;_DEBUG;WECHATRESOURCE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 94 | true 95 | 96 | 97 | Windows 98 | true 99 | 100 | 101 | 102 | 103 | Use 104 | Level3 105 | Disabled 106 | true 107 | _DEBUG;WECHATRESOURCE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 108 | true 109 | 110 | 111 | Windows 112 | true 113 | 114 | 115 | 116 | 117 | Use 118 | Level3 119 | Disabled 120 | true 121 | false 122 | true 123 | WIN32;NDEBUG;WECHATRESOURCE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 124 | true 125 | MultiThreaded 126 | false 127 | 128 | 129 | Windows 130 | true 131 | true 132 | true 133 | def.def 134 | $(OutDir)WeChatSDKCore$(TargetExt) 135 | 136 | 137 | copy "$(OutDir)WeChatSDKCore$(TargetExt)" "../../sdk/WeChatSDKCore$(TargetExt)" 138 | 139 | 140 | 141 | 142 | Use 143 | Level3 144 | MaxSpeed 145 | true 146 | true 147 | true 148 | NDEBUG;WECHATRESOURCE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 149 | true 150 | 151 | 152 | Windows 153 | true 154 | true 155 | true 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | NotUsing 181 | 182 | 183 | 184 | NotUsing 185 | NotUsing 186 | 187 | 188 | 189 | 190 | 191 | 192 | NotUsing 193 | 194 | 195 | 196 | 197 | NotUsing 198 | 199 | 200 | NotUsing 201 | 202 | 203 | 204 | Create 205 | Create 206 | Create 207 | Create 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | Document 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkclk_s.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the RPC server stubs */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.01.0622 */ 7 | /* at Tue Jan 19 11:14:07 2038 8 | */ 9 | /* Compiler settings for sdkclk.idl: 10 | Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 11 | protocol : dce , ms_ext, c_ext, robust 12 | error checks: allocation ref bounds_check enum stub_data 13 | VC __declspec() decoration level: 14 | __declspec(uuid()), __declspec(selectany), __declspec(novtable) 15 | DECLSPEC_UUID(), MIDL_INTERFACE() 16 | */ 17 | /* @@MIDL_FILE_HEADING( ) */ 18 | 19 | #if !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) 20 | 21 | 22 | #if _MSC_VER >= 1200 23 | #pragma warning(push) 24 | #endif 25 | 26 | #pragma warning( disable: 4211 ) /* redefine extern to static */ 27 | #pragma warning( disable: 4232 ) /* dllimport identity*/ 28 | #pragma warning( disable: 4024 ) /* array to pointer mapping*/ 29 | #pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */ 30 | 31 | #pragma optimize("", off ) 32 | 33 | #include 34 | #include "sdkclk_h.h" 35 | 36 | #define TYPE_FORMAT_STRING_SIZE 7 37 | #define PROC_FORMAT_STRING_SIZE 175 38 | #define EXPR_FORMAT_STRING_SIZE 1 39 | #define TRANSMIT_AS_TABLE_SIZE 0 40 | #define WIRE_MARSHAL_TABLE_SIZE 0 41 | 42 | typedef struct _sdkclk_MIDL_TYPE_FORMAT_STRING 43 | { 44 | short Pad; 45 | unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; 46 | } sdkclk_MIDL_TYPE_FORMAT_STRING; 47 | 48 | typedef struct _sdkclk_MIDL_PROC_FORMAT_STRING 49 | { 50 | short Pad; 51 | unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; 52 | } sdkclk_MIDL_PROC_FORMAT_STRING; 53 | 54 | typedef struct _sdkclk_MIDL_EXPR_FORMAT_STRING 55 | { 56 | long Pad; 57 | unsigned char Format[ EXPR_FORMAT_STRING_SIZE ]; 58 | } sdkclk_MIDL_EXPR_FORMAT_STRING; 59 | 60 | 61 | static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = 62 | {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; 63 | 64 | extern const sdkclk_MIDL_TYPE_FORMAT_STRING sdkclk__MIDL_TypeFormatString; 65 | extern const sdkclk_MIDL_PROC_FORMAT_STRING sdkclk__MIDL_ProcFormatString; 66 | extern const sdkclk_MIDL_EXPR_FORMAT_STRING sdkclk__MIDL_ExprFormatString; 67 | 68 | /* Standard interface: WechatSDKClk, ver. 1.0, 69 | GUID={0xB3A3F08E,0xFB79,0x4673,{0x82,0xE2,0x18,0x5B,0xCF,0x29,0xAA,0x99}} */ 70 | 71 | 72 | extern const MIDL_SERVER_INFO WechatSDKClk_ServerInfo; 73 | 74 | extern const RPC_DISPATCH_TABLE WechatSDKClk_v1_0_DispatchTable; 75 | 76 | static const RPC_SERVER_INTERFACE WechatSDKClk___RpcServerInterface = 77 | { 78 | sizeof(RPC_SERVER_INTERFACE), 79 | {{0xB3A3F08E,0xFB79,0x4673,{0x82,0xE2,0x18,0x5B,0xCF,0x29,0xAA,0x99}},{1,0}}, 80 | {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}, 81 | (RPC_DISPATCH_TABLE*)&WechatSDKClk_v1_0_DispatchTable, 82 | 0, 83 | 0, 84 | 0, 85 | &WechatSDKClk_ServerInfo, 86 | 0x04000000 87 | }; 88 | RPC_IF_HANDLE WechatSDKClk_v1_0_s_ifspec = (RPC_IF_HANDLE)& WechatSDKClk___RpcServerInterface; 89 | 90 | extern const MIDL_STUB_DESC WechatSDKClk_StubDesc; 91 | 92 | 93 | #if !defined(__RPC_WIN32__) 94 | #error Invalid build platform for this stub. 95 | #endif 96 | #if !(TARGET_IS_NT60_OR_LATER) 97 | #error You need Windows Vista or later to run this stub because it uses these features: 98 | #error compiled for Windows Vista. 99 | #error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. 100 | #error This app will fail with the RPC_X_WRONG_STUB_VERSION error. 101 | #endif 102 | 103 | 104 | static const sdkclk_MIDL_PROC_FORMAT_STRING sdkclk__MIDL_ProcFormatString = 105 | { 106 | 0, 107 | { 108 | 109 | /* Procedure WSDKClkRecvTextMsg */ 110 | 111 | 0x32, /* FC_BIND_PRIMITIVE */ 112 | 0x48, /* Old Flags: */ 113 | /* 2 */ NdrFcLong( 0x0 ), /* 0 */ 114 | /* 6 */ NdrFcShort( 0x0 ), /* 0 */ 115 | /* 8 */ NdrFcShort( 0x14 ), /* x86 Stack size/offset = 20 */ 116 | /* 10 */ NdrFcShort( 0x10 ), /* 16 */ 117 | /* 12 */ NdrFcShort( 0x8 ), /* 8 */ 118 | /* 14 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 119 | 0x5, /* 5 */ 120 | /* 16 */ 0x8, /* 8 */ 121 | 0x1, /* Ext Flags: new corr desc, */ 122 | /* 18 */ NdrFcShort( 0x0 ), /* 0 */ 123 | /* 20 */ NdrFcShort( 0x0 ), /* 0 */ 124 | /* 22 */ NdrFcShort( 0x0 ), /* 0 */ 125 | 126 | /* Parameter funptr */ 127 | 128 | /* 24 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 129 | /* 26 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 130 | /* 28 */ 0x8, /* FC_LONG */ 131 | 0x0, /* 0 */ 132 | 133 | /* Parameter pid */ 134 | 135 | /* 30 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 136 | /* 32 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 137 | /* 34 */ 0x8, /* FC_LONG */ 138 | 0x0, /* 0 */ 139 | 140 | /* Parameter wxid */ 141 | 142 | /* 36 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 143 | /* 38 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 144 | /* 40 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 145 | 146 | /* Parameter msg */ 147 | 148 | /* 42 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 149 | /* 44 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 150 | /* 46 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 151 | 152 | /* Return value */ 153 | 154 | /* 48 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 155 | /* 50 */ NdrFcShort( 0x10 ), /* x86 Stack size/offset = 16 */ 156 | /* 52 */ 0x8, /* FC_LONG */ 157 | 0x0, /* 0 */ 158 | 159 | /* Procedure WSDKClkRecvTransferMsg */ 160 | 161 | /* 54 */ 0x32, /* FC_BIND_PRIMITIVE */ 162 | 0x48, /* Old Flags: */ 163 | /* 56 */ NdrFcLong( 0x0 ), /* 0 */ 164 | /* 60 */ NdrFcShort( 0x1 ), /* 1 */ 165 | /* 62 */ NdrFcShort( 0x18 ), /* x86 Stack size/offset = 24 */ 166 | /* 64 */ NdrFcShort( 0x10 ), /* 16 */ 167 | /* 66 */ NdrFcShort( 0x8 ), /* 8 */ 168 | /* 68 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 169 | 0x6, /* 6 */ 170 | /* 70 */ 0x8, /* 8 */ 171 | 0x1, /* Ext Flags: new corr desc, */ 172 | /* 72 */ NdrFcShort( 0x0 ), /* 0 */ 173 | /* 74 */ NdrFcShort( 0x0 ), /* 0 */ 174 | /* 76 */ NdrFcShort( 0x0 ), /* 0 */ 175 | 176 | /* Parameter funptr */ 177 | 178 | /* 78 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 179 | /* 80 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 180 | /* 82 */ 0x8, /* FC_LONG */ 181 | 0x0, /* 0 */ 182 | 183 | /* Parameter pid */ 184 | 185 | /* 84 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 186 | /* 86 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 187 | /* 88 */ 0x8, /* FC_LONG */ 188 | 0x0, /* 0 */ 189 | 190 | /* Parameter wxid */ 191 | 192 | /* 90 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 193 | /* 92 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 194 | /* 94 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 195 | 196 | /* Parameter tid */ 197 | 198 | /* 96 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 199 | /* 98 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 200 | /* 100 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 201 | 202 | /* Parameter msg */ 203 | 204 | /* 102 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 205 | /* 104 */ NdrFcShort( 0x10 ), /* x86 Stack size/offset = 16 */ 206 | /* 106 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 207 | 208 | /* Return value */ 209 | 210 | /* 108 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 211 | /* 110 */ NdrFcShort( 0x14 ), /* x86 Stack size/offset = 20 */ 212 | /* 112 */ 0x8, /* FC_LONG */ 213 | 0x0, /* 0 */ 214 | 215 | /* Procedure WSDKClkRecvPayMsg */ 216 | 217 | /* 114 */ 0x32, /* FC_BIND_PRIMITIVE */ 218 | 0x48, /* Old Flags: */ 219 | /* 116 */ NdrFcLong( 0x0 ), /* 0 */ 220 | /* 120 */ NdrFcShort( 0x2 ), /* 2 */ 221 | /* 122 */ NdrFcShort( 0x18 ), /* x86 Stack size/offset = 24 */ 222 | /* 124 */ NdrFcShort( 0x10 ), /* 16 */ 223 | /* 126 */ NdrFcShort( 0x8 ), /* 8 */ 224 | /* 128 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 225 | 0x6, /* 6 */ 226 | /* 130 */ 0x8, /* 8 */ 227 | 0x1, /* Ext Flags: new corr desc, */ 228 | /* 132 */ NdrFcShort( 0x0 ), /* 0 */ 229 | /* 134 */ NdrFcShort( 0x0 ), /* 0 */ 230 | /* 136 */ NdrFcShort( 0x0 ), /* 0 */ 231 | 232 | /* Parameter funptr */ 233 | 234 | /* 138 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 235 | /* 140 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 236 | /* 142 */ 0x8, /* FC_LONG */ 237 | 0x0, /* 0 */ 238 | 239 | /* Parameter pid */ 240 | 241 | /* 144 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 242 | /* 146 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 243 | /* 148 */ 0x8, /* FC_LONG */ 244 | 0x0, /* 0 */ 245 | 246 | /* Parameter wxid */ 247 | 248 | /* 150 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 249 | /* 152 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 250 | /* 154 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 251 | 252 | /* Parameter tid */ 253 | 254 | /* 156 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 255 | /* 158 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 256 | /* 160 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 257 | 258 | /* Parameter msg */ 259 | 260 | /* 162 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 261 | /* 164 */ NdrFcShort( 0x10 ), /* x86 Stack size/offset = 16 */ 262 | /* 166 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 263 | 264 | /* Return value */ 265 | 266 | /* 168 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 267 | /* 170 */ NdrFcShort( 0x14 ), /* x86 Stack size/offset = 20 */ 268 | /* 172 */ 0x8, /* FC_LONG */ 269 | 0x0, /* 0 */ 270 | 271 | 0x0 272 | } 273 | }; 274 | 275 | static const sdkclk_MIDL_TYPE_FORMAT_STRING sdkclk__MIDL_TypeFormatString = 276 | { 277 | 0, 278 | { 279 | NdrFcShort( 0x0 ), /* 0 */ 280 | /* 2 */ 281 | 0x11, 0x8, /* FC_RP [simple_pointer] */ 282 | /* 4 */ 283 | 0x25, /* FC_C_WSTRING */ 284 | 0x5c, /* FC_PAD */ 285 | 286 | 0x0 287 | } 288 | }; 289 | 290 | static const unsigned short WechatSDKClk_FormatStringOffsetTable[] = 291 | { 292 | 0, 293 | 54, 294 | 114 295 | }; 296 | 297 | 298 | static const MIDL_STUB_DESC WechatSDKClk_StubDesc = 299 | { 300 | (void *)& WechatSDKClk___RpcServerInterface, 301 | MIDL_user_allocate, 302 | MIDL_user_free, 303 | 0, 304 | 0, 305 | 0, 306 | 0, 307 | 0, 308 | sdkclk__MIDL_TypeFormatString.Format, 309 | 1, /* -error bounds_check flag */ 310 | 0x60001, /* Ndr library version */ 311 | 0, 312 | 0x801026e, /* MIDL Version 8.1.622 */ 313 | 0, 314 | 0, 315 | 0, /* notify & notify_flag routine table */ 316 | 0x1, /* MIDL flag */ 317 | 0, /* cs routines */ 318 | 0, /* proxy/server info */ 319 | 0 320 | }; 321 | 322 | static const RPC_DISPATCH_FUNCTION WechatSDKClk_table[] = 323 | { 324 | NdrServerCall2, 325 | NdrServerCall2, 326 | NdrServerCall2, 327 | 0 328 | }; 329 | static const RPC_DISPATCH_TABLE WechatSDKClk_v1_0_DispatchTable = 330 | { 331 | 3, 332 | (RPC_DISPATCH_FUNCTION*)WechatSDKClk_table 333 | }; 334 | 335 | static const SERVER_ROUTINE WechatSDKClk_ServerRoutineTable[] = 336 | { 337 | (SERVER_ROUTINE)WSDKClkRecvTextMsg, 338 | (SERVER_ROUTINE)WSDKClkRecvTransferMsg, 339 | (SERVER_ROUTINE)WSDKClkRecvPayMsg 340 | }; 341 | 342 | static const MIDL_SERVER_INFO WechatSDKClk_ServerInfo = 343 | { 344 | &WechatSDKClk_StubDesc, 345 | WechatSDKClk_ServerRoutineTable, 346 | sdkclk__MIDL_ProcFormatString.Format, 347 | WechatSDKClk_FormatStringOffsetTable, 348 | 0, 349 | 0, 350 | 0, 351 | 0}; 352 | #pragma optimize("", on ) 353 | #if _MSC_VER >= 1200 354 | #pragma warning(pop) 355 | #endif 356 | 357 | 358 | #endif /* !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) */ 359 | 360 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkclk_c.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the RPC client stubs */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.01.0622 */ 7 | /* at Tue Jan 19 11:14:07 2038 8 | */ 9 | /* Compiler settings for sdkclk.idl: 10 | Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 11 | protocol : dce , ms_ext, c_ext, robust 12 | error checks: allocation ref bounds_check enum stub_data 13 | VC __declspec() decoration level: 14 | __declspec(uuid()), __declspec(selectany), __declspec(novtable) 15 | DECLSPEC_UUID(), MIDL_INTERFACE() 16 | */ 17 | /* @@MIDL_FILE_HEADING( ) */ 18 | 19 | #if !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) 20 | 21 | 22 | #if _MSC_VER >= 1200 23 | #pragma warning(push) 24 | #endif 25 | 26 | #pragma warning( disable: 4211 ) /* redefine extern to static */ 27 | #pragma warning( disable: 4232 ) /* dllimport identity*/ 28 | #pragma warning( disable: 4024 ) /* array to pointer mapping*/ 29 | #pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */ 30 | 31 | #pragma optimize("", off ) 32 | 33 | #include 34 | 35 | #include "sdkclk_h.h" 36 | 37 | #define TYPE_FORMAT_STRING_SIZE 7 38 | #define PROC_FORMAT_STRING_SIZE 175 39 | #define EXPR_FORMAT_STRING_SIZE 1 40 | #define TRANSMIT_AS_TABLE_SIZE 0 41 | #define WIRE_MARSHAL_TABLE_SIZE 0 42 | 43 | typedef struct _sdkclk_MIDL_TYPE_FORMAT_STRING 44 | { 45 | short Pad; 46 | unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; 47 | } sdkclk_MIDL_TYPE_FORMAT_STRING; 48 | 49 | typedef struct _sdkclk_MIDL_PROC_FORMAT_STRING 50 | { 51 | short Pad; 52 | unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; 53 | } sdkclk_MIDL_PROC_FORMAT_STRING; 54 | 55 | typedef struct _sdkclk_MIDL_EXPR_FORMAT_STRING 56 | { 57 | long Pad; 58 | unsigned char Format[ EXPR_FORMAT_STRING_SIZE ]; 59 | } sdkclk_MIDL_EXPR_FORMAT_STRING; 60 | 61 | 62 | static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = 63 | {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; 64 | 65 | 66 | extern const sdkclk_MIDL_TYPE_FORMAT_STRING sdkclk__MIDL_TypeFormatString; 67 | extern const sdkclk_MIDL_PROC_FORMAT_STRING sdkclk__MIDL_ProcFormatString; 68 | extern const sdkclk_MIDL_EXPR_FORMAT_STRING sdkclk__MIDL_ExprFormatString; 69 | 70 | #define GENERIC_BINDING_TABLE_SIZE 0 71 | 72 | 73 | /* Standard interface: WechatSDKClk, ver. 1.0, 74 | GUID={0xB3A3F08E,0xFB79,0x4673,{0x82,0xE2,0x18,0x5B,0xCF,0x29,0xAA,0x99}} */ 75 | 76 | handle_t WechatRsClk_IfHandle; 77 | 78 | 79 | static const RPC_CLIENT_INTERFACE WechatSDKClk___RpcClientInterface = 80 | { 81 | sizeof(RPC_CLIENT_INTERFACE), 82 | {{0xB3A3F08E,0xFB79,0x4673,{0x82,0xE2,0x18,0x5B,0xCF,0x29,0xAA,0x99}},{1,0}}, 83 | {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}, 84 | 0, 85 | 0, 86 | 0, 87 | 0, 88 | 0, 89 | 0x00000000 90 | }; 91 | RPC_IF_HANDLE WechatSDKClk_v1_0_c_ifspec = (RPC_IF_HANDLE)& WechatSDKClk___RpcClientInterface; 92 | 93 | extern const MIDL_STUB_DESC WechatSDKClk_StubDesc; 94 | 95 | static RPC_BINDING_HANDLE WechatSDKClk__MIDL_AutoBindHandle; 96 | 97 | 98 | int WSDKClkRecvTextMsg( 99 | /* [in] */ unsigned int funptr, 100 | /* [in] */ int pid, 101 | /* [string][in] */ wchar_t *wxid, 102 | /* [string][in] */ wchar_t *msg) 103 | { 104 | 105 | CLIENT_CALL_RETURN _RetVal; 106 | 107 | _RetVal = NdrClientCall2( 108 | ( PMIDL_STUB_DESC )&WechatSDKClk_StubDesc, 109 | (PFORMAT_STRING) &sdkclk__MIDL_ProcFormatString.Format[0], 110 | ( unsigned char * )&funptr); 111 | return ( int )_RetVal.Simple; 112 | 113 | } 114 | 115 | 116 | int WSDKClkRecvTransferMsg( 117 | /* [in] */ unsigned int funptr, 118 | /* [in] */ int pid, 119 | /* [string][in] */ wchar_t *wxid, 120 | /* [string][in] */ wchar_t *tid, 121 | /* [string][in] */ wchar_t *msg) 122 | { 123 | 124 | CLIENT_CALL_RETURN _RetVal; 125 | 126 | _RetVal = NdrClientCall2( 127 | ( PMIDL_STUB_DESC )&WechatSDKClk_StubDesc, 128 | (PFORMAT_STRING) &sdkclk__MIDL_ProcFormatString.Format[54], 129 | ( unsigned char * )&funptr); 130 | return ( int )_RetVal.Simple; 131 | 132 | } 133 | 134 | 135 | int WSDKClkRecvPayMsg( 136 | /* [in] */ unsigned int funptr, 137 | /* [in] */ int pid, 138 | /* [string][in] */ wchar_t *wxid, 139 | /* [string][in] */ wchar_t *tid, 140 | /* [string][in] */ wchar_t *msg) 141 | { 142 | 143 | CLIENT_CALL_RETURN _RetVal; 144 | 145 | _RetVal = NdrClientCall2( 146 | ( PMIDL_STUB_DESC )&WechatSDKClk_StubDesc, 147 | (PFORMAT_STRING) &sdkclk__MIDL_ProcFormatString.Format[114], 148 | ( unsigned char * )&funptr); 149 | return ( int )_RetVal.Simple; 150 | 151 | } 152 | 153 | 154 | #if !defined(__RPC_WIN32__) 155 | #error Invalid build platform for this stub. 156 | #endif 157 | #if !(TARGET_IS_NT60_OR_LATER) 158 | #error You need Windows Vista or later to run this stub because it uses these features: 159 | #error compiled for Windows Vista. 160 | #error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. 161 | #error This app will fail with the RPC_X_WRONG_STUB_VERSION error. 162 | #endif 163 | 164 | 165 | static const sdkclk_MIDL_PROC_FORMAT_STRING sdkclk__MIDL_ProcFormatString = 166 | { 167 | 0, 168 | { 169 | 170 | /* Procedure WSDKClkRecvTextMsg */ 171 | 172 | 0x32, /* FC_BIND_PRIMITIVE */ 173 | 0x48, /* Old Flags: */ 174 | /* 2 */ NdrFcLong( 0x0 ), /* 0 */ 175 | /* 6 */ NdrFcShort( 0x0 ), /* 0 */ 176 | /* 8 */ NdrFcShort( 0x14 ), /* x86 Stack size/offset = 20 */ 177 | /* 10 */ NdrFcShort( 0x10 ), /* 16 */ 178 | /* 12 */ NdrFcShort( 0x8 ), /* 8 */ 179 | /* 14 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 180 | 0x5, /* 5 */ 181 | /* 16 */ 0x8, /* 8 */ 182 | 0x1, /* Ext Flags: new corr desc, */ 183 | /* 18 */ NdrFcShort( 0x0 ), /* 0 */ 184 | /* 20 */ NdrFcShort( 0x0 ), /* 0 */ 185 | /* 22 */ NdrFcShort( 0x0 ), /* 0 */ 186 | 187 | /* Parameter funptr */ 188 | 189 | /* 24 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 190 | /* 26 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 191 | /* 28 */ 0x8, /* FC_LONG */ 192 | 0x0, /* 0 */ 193 | 194 | /* Parameter pid */ 195 | 196 | /* 30 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 197 | /* 32 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 198 | /* 34 */ 0x8, /* FC_LONG */ 199 | 0x0, /* 0 */ 200 | 201 | /* Parameter wxid */ 202 | 203 | /* 36 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 204 | /* 38 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 205 | /* 40 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 206 | 207 | /* Parameter msg */ 208 | 209 | /* 42 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 210 | /* 44 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 211 | /* 46 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 212 | 213 | /* Return value */ 214 | 215 | /* 48 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 216 | /* 50 */ NdrFcShort( 0x10 ), /* x86 Stack size/offset = 16 */ 217 | /* 52 */ 0x8, /* FC_LONG */ 218 | 0x0, /* 0 */ 219 | 220 | /* Procedure WSDKClkRecvTransferMsg */ 221 | 222 | /* 54 */ 0x32, /* FC_BIND_PRIMITIVE */ 223 | 0x48, /* Old Flags: */ 224 | /* 56 */ NdrFcLong( 0x0 ), /* 0 */ 225 | /* 60 */ NdrFcShort( 0x1 ), /* 1 */ 226 | /* 62 */ NdrFcShort( 0x18 ), /* x86 Stack size/offset = 24 */ 227 | /* 64 */ NdrFcShort( 0x10 ), /* 16 */ 228 | /* 66 */ NdrFcShort( 0x8 ), /* 8 */ 229 | /* 68 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 230 | 0x6, /* 6 */ 231 | /* 70 */ 0x8, /* 8 */ 232 | 0x1, /* Ext Flags: new corr desc, */ 233 | /* 72 */ NdrFcShort( 0x0 ), /* 0 */ 234 | /* 74 */ NdrFcShort( 0x0 ), /* 0 */ 235 | /* 76 */ NdrFcShort( 0x0 ), /* 0 */ 236 | 237 | /* Parameter funptr */ 238 | 239 | /* 78 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 240 | /* 80 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 241 | /* 82 */ 0x8, /* FC_LONG */ 242 | 0x0, /* 0 */ 243 | 244 | /* Parameter pid */ 245 | 246 | /* 84 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 247 | /* 86 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 248 | /* 88 */ 0x8, /* FC_LONG */ 249 | 0x0, /* 0 */ 250 | 251 | /* Parameter wxid */ 252 | 253 | /* 90 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 254 | /* 92 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 255 | /* 94 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 256 | 257 | /* Parameter tid */ 258 | 259 | /* 96 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 260 | /* 98 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 261 | /* 100 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 262 | 263 | /* Parameter msg */ 264 | 265 | /* 102 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 266 | /* 104 */ NdrFcShort( 0x10 ), /* x86 Stack size/offset = 16 */ 267 | /* 106 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 268 | 269 | /* Return value */ 270 | 271 | /* 108 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 272 | /* 110 */ NdrFcShort( 0x14 ), /* x86 Stack size/offset = 20 */ 273 | /* 112 */ 0x8, /* FC_LONG */ 274 | 0x0, /* 0 */ 275 | 276 | /* Procedure WSDKClkRecvPayMsg */ 277 | 278 | /* 114 */ 0x32, /* FC_BIND_PRIMITIVE */ 279 | 0x48, /* Old Flags: */ 280 | /* 116 */ NdrFcLong( 0x0 ), /* 0 */ 281 | /* 120 */ NdrFcShort( 0x2 ), /* 2 */ 282 | /* 122 */ NdrFcShort( 0x18 ), /* x86 Stack size/offset = 24 */ 283 | /* 124 */ NdrFcShort( 0x10 ), /* 16 */ 284 | /* 126 */ NdrFcShort( 0x8 ), /* 8 */ 285 | /* 128 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 286 | 0x6, /* 6 */ 287 | /* 130 */ 0x8, /* 8 */ 288 | 0x1, /* Ext Flags: new corr desc, */ 289 | /* 132 */ NdrFcShort( 0x0 ), /* 0 */ 290 | /* 134 */ NdrFcShort( 0x0 ), /* 0 */ 291 | /* 136 */ NdrFcShort( 0x0 ), /* 0 */ 292 | 293 | /* Parameter funptr */ 294 | 295 | /* 138 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 296 | /* 140 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 297 | /* 142 */ 0x8, /* FC_LONG */ 298 | 0x0, /* 0 */ 299 | 300 | /* Parameter pid */ 301 | 302 | /* 144 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 303 | /* 146 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 304 | /* 148 */ 0x8, /* FC_LONG */ 305 | 0x0, /* 0 */ 306 | 307 | /* Parameter wxid */ 308 | 309 | /* 150 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 310 | /* 152 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 311 | /* 154 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 312 | 313 | /* Parameter tid */ 314 | 315 | /* 156 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 316 | /* 158 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 317 | /* 160 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 318 | 319 | /* Parameter msg */ 320 | 321 | /* 162 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 322 | /* 164 */ NdrFcShort( 0x10 ), /* x86 Stack size/offset = 16 */ 323 | /* 166 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 324 | 325 | /* Return value */ 326 | 327 | /* 168 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 328 | /* 170 */ NdrFcShort( 0x14 ), /* x86 Stack size/offset = 20 */ 329 | /* 172 */ 0x8, /* FC_LONG */ 330 | 0x0, /* 0 */ 331 | 332 | 0x0 333 | } 334 | }; 335 | 336 | static const sdkclk_MIDL_TYPE_FORMAT_STRING sdkclk__MIDL_TypeFormatString = 337 | { 338 | 0, 339 | { 340 | NdrFcShort( 0x0 ), /* 0 */ 341 | /* 2 */ 342 | 0x11, 0x8, /* FC_RP [simple_pointer] */ 343 | /* 4 */ 344 | 0x25, /* FC_C_WSTRING */ 345 | 0x5c, /* FC_PAD */ 346 | 347 | 0x0 348 | } 349 | }; 350 | 351 | static const unsigned short WechatSDKClk_FormatStringOffsetTable[] = 352 | { 353 | 0, 354 | 54, 355 | 114 356 | }; 357 | 358 | 359 | static const MIDL_STUB_DESC WechatSDKClk_StubDesc = 360 | { 361 | (void *)& WechatSDKClk___RpcClientInterface, 362 | MIDL_user_allocate, 363 | MIDL_user_free, 364 | &WechatRsClk_IfHandle, 365 | 0, 366 | 0, 367 | 0, 368 | 0, 369 | sdkclk__MIDL_TypeFormatString.Format, 370 | 1, /* -error bounds_check flag */ 371 | 0x60001, /* Ndr library version */ 372 | 0, 373 | 0x801026e, /* MIDL Version 8.1.622 */ 374 | 0, 375 | 0, 376 | 0, /* notify & notify_flag routine table */ 377 | 0x1, /* MIDL flag */ 378 | 0, /* cs routines */ 379 | 0, /* proxy/server info */ 380 | 0 381 | }; 382 | #pragma optimize("", on ) 383 | #if _MSC_VER >= 1200 384 | #pragma warning(pop) 385 | #endif 386 | 387 | 388 | #endif /* !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) */ 389 | 390 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkdef_s.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the RPC server stubs */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.01.0622 */ 7 | /* at Tue Jan 19 11:14:07 2038 8 | */ 9 | /* Compiler settings for sdkdef.idl: 10 | Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 11 | protocol : dce , ms_ext, c_ext, robust 12 | error checks: allocation ref bounds_check enum stub_data 13 | VC __declspec() decoration level: 14 | __declspec(uuid()), __declspec(selectany), __declspec(novtable) 15 | DECLSPEC_UUID(), MIDL_INTERFACE() 16 | */ 17 | /* @@MIDL_FILE_HEADING( ) */ 18 | 19 | #if !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) 20 | 21 | 22 | #if _MSC_VER >= 1200 23 | #pragma warning(push) 24 | #endif 25 | 26 | #pragma warning( disable: 4211 ) /* redefine extern to static */ 27 | #pragma warning( disable: 4232 ) /* dllimport identity*/ 28 | #pragma warning( disable: 4024 ) /* array to pointer mapping*/ 29 | #pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */ 30 | 31 | #pragma optimize("", off ) 32 | 33 | #include 34 | #include "sdkdef_h.h" 35 | 36 | #define TYPE_FORMAT_STRING_SIZE 7 37 | #define PROC_FORMAT_STRING_SIZE 379 38 | #define EXPR_FORMAT_STRING_SIZE 1 39 | #define TRANSMIT_AS_TABLE_SIZE 0 40 | #define WIRE_MARSHAL_TABLE_SIZE 0 41 | 42 | typedef struct _sdkdef_MIDL_TYPE_FORMAT_STRING 43 | { 44 | short Pad; 45 | unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; 46 | } sdkdef_MIDL_TYPE_FORMAT_STRING; 47 | 48 | typedef struct _sdkdef_MIDL_PROC_FORMAT_STRING 49 | { 50 | short Pad; 51 | unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; 52 | } sdkdef_MIDL_PROC_FORMAT_STRING; 53 | 54 | typedef struct _sdkdef_MIDL_EXPR_FORMAT_STRING 55 | { 56 | long Pad; 57 | unsigned char Format[ EXPR_FORMAT_STRING_SIZE ]; 58 | } sdkdef_MIDL_EXPR_FORMAT_STRING; 59 | 60 | 61 | static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = 62 | {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; 63 | 64 | extern const sdkdef_MIDL_TYPE_FORMAT_STRING sdkdef__MIDL_TypeFormatString; 65 | extern const sdkdef_MIDL_PROC_FORMAT_STRING sdkdef__MIDL_ProcFormatString; 66 | extern const sdkdef_MIDL_EXPR_FORMAT_STRING sdkdef__MIDL_ExprFormatString; 67 | 68 | /* Standard interface: WechatSDK, ver. 1.0, 69 | GUID={0xEC3A7CE8,0x8F99,0x47ef,{0x97,0x05,0xDA,0x5D,0xF1,0x4F,0x9A,0x4C}} */ 70 | 71 | 72 | extern const MIDL_SERVER_INFO WechatSDK_ServerInfo; 73 | 74 | extern const RPC_DISPATCH_TABLE WechatSDK_v1_0_DispatchTable; 75 | 76 | static const RPC_SERVER_INTERFACE WechatSDK___RpcServerInterface = 77 | { 78 | sizeof(RPC_SERVER_INTERFACE), 79 | {{0xEC3A7CE8,0x8F99,0x47ef,{0x97,0x05,0xDA,0x5D,0xF1,0x4F,0x9A,0x4C}},{1,0}}, 80 | {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}, 81 | (RPC_DISPATCH_TABLE*)&WechatSDK_v1_0_DispatchTable, 82 | 0, 83 | 0, 84 | 0, 85 | &WechatSDK_ServerInfo, 86 | 0x04000000 87 | }; 88 | RPC_IF_HANDLE WechatSDK_v1_0_s_ifspec = (RPC_IF_HANDLE)& WechatSDK___RpcServerInterface; 89 | 90 | extern const MIDL_STUB_DESC WechatSDK_StubDesc; 91 | 92 | 93 | #if !defined(__RPC_WIN32__) 94 | #error Invalid build platform for this stub. 95 | #endif 96 | #if !(TARGET_IS_NT60_OR_LATER) 97 | #error You need Windows Vista or later to run this stub because it uses these features: 98 | #error compiled for Windows Vista. 99 | #error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. 100 | #error This app will fail with the RPC_X_WRONG_STUB_VERSION error. 101 | #endif 102 | 103 | 104 | static const sdkdef_MIDL_PROC_FORMAT_STRING sdkdef__MIDL_ProcFormatString = 105 | { 106 | 0, 107 | { 108 | 109 | /* Procedure WSDKInitialize */ 110 | 111 | 0x32, /* FC_BIND_PRIMITIVE */ 112 | 0x48, /* Old Flags: */ 113 | /* 2 */ NdrFcLong( 0x0 ), /* 0 */ 114 | /* 6 */ NdrFcShort( 0x0 ), /* 0 */ 115 | /* 8 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 116 | /* 10 */ NdrFcShort( 0x0 ), /* 0 */ 117 | /* 12 */ NdrFcShort( 0x8 ), /* 8 */ 118 | /* 14 */ 0x44, /* Oi2 Flags: has return, has ext, */ 119 | 0x1, /* 1 */ 120 | /* 16 */ 0x8, /* 8 */ 121 | 0x1, /* Ext Flags: new corr desc, */ 122 | /* 18 */ NdrFcShort( 0x0 ), /* 0 */ 123 | /* 20 */ NdrFcShort( 0x0 ), /* 0 */ 124 | /* 22 */ NdrFcShort( 0x0 ), /* 0 */ 125 | 126 | /* Return value */ 127 | 128 | /* 24 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 129 | /* 26 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 130 | /* 28 */ 0x8, /* FC_LONG */ 131 | 0x0, /* 0 */ 132 | 133 | /* Procedure WSDKUninitialize */ 134 | 135 | /* 30 */ 0x32, /* FC_BIND_PRIMITIVE */ 136 | 0x48, /* Old Flags: */ 137 | /* 32 */ NdrFcLong( 0x0 ), /* 0 */ 138 | /* 36 */ NdrFcShort( 0x1 ), /* 1 */ 139 | /* 38 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 140 | /* 40 */ NdrFcShort( 0x0 ), /* 0 */ 141 | /* 42 */ NdrFcShort( 0x8 ), /* 8 */ 142 | /* 44 */ 0x44, /* Oi2 Flags: has return, has ext, */ 143 | 0x1, /* 1 */ 144 | /* 46 */ 0x8, /* 8 */ 145 | 0x1, /* Ext Flags: new corr desc, */ 146 | /* 48 */ NdrFcShort( 0x0 ), /* 0 */ 147 | /* 50 */ NdrFcShort( 0x0 ), /* 0 */ 148 | /* 52 */ NdrFcShort( 0x0 ), /* 0 */ 149 | 150 | /* Return value */ 151 | 152 | /* 54 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 153 | /* 56 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 154 | /* 58 */ 0x8, /* FC_LONG */ 155 | 0x0, /* 0 */ 156 | 157 | /* Procedure WSDKAntiRevokeMsg */ 158 | 159 | /* 60 */ 0x32, /* FC_BIND_PRIMITIVE */ 160 | 0x48, /* Old Flags: */ 161 | /* 62 */ NdrFcLong( 0x0 ), /* 0 */ 162 | /* 66 */ NdrFcShort( 0x2 ), /* 2 */ 163 | /* 68 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 164 | /* 70 */ NdrFcShort( 0x0 ), /* 0 */ 165 | /* 72 */ NdrFcShort( 0x8 ), /* 8 */ 166 | /* 74 */ 0x44, /* Oi2 Flags: has return, has ext, */ 167 | 0x1, /* 1 */ 168 | /* 76 */ 0x8, /* 8 */ 169 | 0x1, /* Ext Flags: new corr desc, */ 170 | /* 78 */ NdrFcShort( 0x0 ), /* 0 */ 171 | /* 80 */ NdrFcShort( 0x0 ), /* 0 */ 172 | /* 82 */ NdrFcShort( 0x0 ), /* 0 */ 173 | 174 | /* Return value */ 175 | 176 | /* 84 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 177 | /* 86 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 178 | /* 88 */ 0x8, /* FC_LONG */ 179 | 0x0, /* 0 */ 180 | 181 | /* Procedure WSDKUnAntiRevokeMsg */ 182 | 183 | /* 90 */ 0x32, /* FC_BIND_PRIMITIVE */ 184 | 0x48, /* Old Flags: */ 185 | /* 92 */ NdrFcLong( 0x0 ), /* 0 */ 186 | /* 96 */ NdrFcShort( 0x3 ), /* 3 */ 187 | /* 98 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 188 | /* 100 */ NdrFcShort( 0x0 ), /* 0 */ 189 | /* 102 */ NdrFcShort( 0x8 ), /* 8 */ 190 | /* 104 */ 0x44, /* Oi2 Flags: has return, has ext, */ 191 | 0x1, /* 1 */ 192 | /* 106 */ 0x8, /* 8 */ 193 | 0x1, /* Ext Flags: new corr desc, */ 194 | /* 108 */ NdrFcShort( 0x0 ), /* 0 */ 195 | /* 110 */ NdrFcShort( 0x0 ), /* 0 */ 196 | /* 112 */ NdrFcShort( 0x0 ), /* 0 */ 197 | 198 | /* Return value */ 199 | 200 | /* 114 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 201 | /* 116 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 202 | /* 118 */ 0x8, /* FC_LONG */ 203 | 0x0, /* 0 */ 204 | 205 | /* Procedure WSDKStartSaveVoiceMsg */ 206 | 207 | /* 120 */ 0x32, /* FC_BIND_PRIMITIVE */ 208 | 0x48, /* Old Flags: */ 209 | /* 122 */ NdrFcLong( 0x0 ), /* 0 */ 210 | /* 126 */ NdrFcShort( 0x4 ), /* 4 */ 211 | /* 128 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 212 | /* 130 */ NdrFcShort( 0x0 ), /* 0 */ 213 | /* 132 */ NdrFcShort( 0x8 ), /* 8 */ 214 | /* 134 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 215 | 0x2, /* 2 */ 216 | /* 136 */ 0x8, /* 8 */ 217 | 0x1, /* Ext Flags: new corr desc, */ 218 | /* 138 */ NdrFcShort( 0x0 ), /* 0 */ 219 | /* 140 */ NdrFcShort( 0x0 ), /* 0 */ 220 | /* 142 */ NdrFcShort( 0x0 ), /* 0 */ 221 | 222 | /* Parameter path */ 223 | 224 | /* 144 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 225 | /* 146 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 226 | /* 148 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 227 | 228 | /* Return value */ 229 | 230 | /* 150 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 231 | /* 152 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 232 | /* 154 */ 0x8, /* FC_LONG */ 233 | 0x0, /* 0 */ 234 | 235 | /* Procedure WSDKStopSaveVoiceMsg */ 236 | 237 | /* 156 */ 0x32, /* FC_BIND_PRIMITIVE */ 238 | 0x48, /* Old Flags: */ 239 | /* 158 */ NdrFcLong( 0x0 ), /* 0 */ 240 | /* 162 */ NdrFcShort( 0x5 ), /* 5 */ 241 | /* 164 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 242 | /* 166 */ NdrFcShort( 0x0 ), /* 0 */ 243 | /* 168 */ NdrFcShort( 0x8 ), /* 8 */ 244 | /* 170 */ 0x44, /* Oi2 Flags: has return, has ext, */ 245 | 0x1, /* 1 */ 246 | /* 172 */ 0x8, /* 8 */ 247 | 0x1, /* Ext Flags: new corr desc, */ 248 | /* 174 */ NdrFcShort( 0x0 ), /* 0 */ 249 | /* 176 */ NdrFcShort( 0x0 ), /* 0 */ 250 | /* 178 */ NdrFcShort( 0x0 ), /* 0 */ 251 | 252 | /* Return value */ 253 | 254 | /* 180 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 255 | /* 182 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 256 | /* 184 */ 0x8, /* FC_LONG */ 257 | 0x0, /* 0 */ 258 | 259 | /* Procedure WSDKSendTextMsg */ 260 | 261 | /* 186 */ 0x32, /* FC_BIND_PRIMITIVE */ 262 | 0x48, /* Old Flags: */ 263 | /* 188 */ NdrFcLong( 0x0 ), /* 0 */ 264 | /* 192 */ NdrFcShort( 0x6 ), /* 6 */ 265 | /* 194 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 266 | /* 196 */ NdrFcShort( 0x0 ), /* 0 */ 267 | /* 198 */ NdrFcShort( 0x8 ), /* 8 */ 268 | /* 200 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 269 | 0x3, /* 3 */ 270 | /* 202 */ 0x8, /* 8 */ 271 | 0x1, /* Ext Flags: new corr desc, */ 272 | /* 204 */ NdrFcShort( 0x0 ), /* 0 */ 273 | /* 206 */ NdrFcShort( 0x0 ), /* 0 */ 274 | /* 208 */ NdrFcShort( 0x0 ), /* 0 */ 275 | 276 | /* Parameter wxid */ 277 | 278 | /* 210 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 279 | /* 212 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 280 | /* 214 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 281 | 282 | /* Parameter msg */ 283 | 284 | /* 216 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 285 | /* 218 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 286 | /* 220 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 287 | 288 | /* Return value */ 289 | 290 | /* 222 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 291 | /* 224 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 292 | /* 226 */ 0x8, /* FC_LONG */ 293 | 0x0, /* 0 */ 294 | 295 | /* Procedure WSDKSendImageMsg */ 296 | 297 | /* 228 */ 0x32, /* FC_BIND_PRIMITIVE */ 298 | 0x48, /* Old Flags: */ 299 | /* 230 */ NdrFcLong( 0x0 ), /* 0 */ 300 | /* 234 */ NdrFcShort( 0x7 ), /* 7 */ 301 | /* 236 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 302 | /* 238 */ NdrFcShort( 0x0 ), /* 0 */ 303 | /* 240 */ NdrFcShort( 0x8 ), /* 8 */ 304 | /* 242 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 305 | 0x3, /* 3 */ 306 | /* 244 */ 0x8, /* 8 */ 307 | 0x1, /* Ext Flags: new corr desc, */ 308 | /* 246 */ NdrFcShort( 0x0 ), /* 0 */ 309 | /* 248 */ NdrFcShort( 0x0 ), /* 0 */ 310 | /* 250 */ NdrFcShort( 0x0 ), /* 0 */ 311 | 312 | /* Parameter wxid */ 313 | 314 | /* 252 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 315 | /* 254 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 316 | /* 256 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 317 | 318 | /* Parameter path */ 319 | 320 | /* 258 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 321 | /* 260 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 322 | /* 262 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 323 | 324 | /* Return value */ 325 | 326 | /* 264 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 327 | /* 266 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 328 | /* 268 */ 0x8, /* FC_LONG */ 329 | 0x0, /* 0 */ 330 | 331 | /* Procedure WSDKRecvTextMsg */ 332 | 333 | /* 270 */ 0x32, /* FC_BIND_PRIMITIVE */ 334 | 0x48, /* Old Flags: */ 335 | /* 272 */ NdrFcLong( 0x0 ), /* 0 */ 336 | /* 276 */ NdrFcShort( 0x8 ), /* 8 */ 337 | /* 278 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 338 | /* 280 */ NdrFcShort( 0x8 ), /* 8 */ 339 | /* 282 */ NdrFcShort( 0x8 ), /* 8 */ 340 | /* 284 */ 0x44, /* Oi2 Flags: has return, has ext, */ 341 | 0x2, /* 2 */ 342 | /* 286 */ 0x8, /* 8 */ 343 | 0x1, /* Ext Flags: new corr desc, */ 344 | /* 288 */ NdrFcShort( 0x0 ), /* 0 */ 345 | /* 290 */ NdrFcShort( 0x0 ), /* 0 */ 346 | /* 292 */ NdrFcShort( 0x0 ), /* 0 */ 347 | 348 | /* Parameter funptr */ 349 | 350 | /* 294 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 351 | /* 296 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 352 | /* 298 */ 0x8, /* FC_LONG */ 353 | 0x0, /* 0 */ 354 | 355 | /* Return value */ 356 | 357 | /* 300 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 358 | /* 302 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 359 | /* 304 */ 0x8, /* FC_LONG */ 360 | 0x0, /* 0 */ 361 | 362 | /* Procedure WSDKRecvTransferMsg */ 363 | 364 | /* 306 */ 0x32, /* FC_BIND_PRIMITIVE */ 365 | 0x48, /* Old Flags: */ 366 | /* 308 */ NdrFcLong( 0x0 ), /* 0 */ 367 | /* 312 */ NdrFcShort( 0x9 ), /* 9 */ 368 | /* 314 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 369 | /* 316 */ NdrFcShort( 0x8 ), /* 8 */ 370 | /* 318 */ NdrFcShort( 0x8 ), /* 8 */ 371 | /* 320 */ 0x44, /* Oi2 Flags: has return, has ext, */ 372 | 0x2, /* 2 */ 373 | /* 322 */ 0x8, /* 8 */ 374 | 0x1, /* Ext Flags: new corr desc, */ 375 | /* 324 */ NdrFcShort( 0x0 ), /* 0 */ 376 | /* 326 */ NdrFcShort( 0x0 ), /* 0 */ 377 | /* 328 */ NdrFcShort( 0x0 ), /* 0 */ 378 | 379 | /* Parameter funptr */ 380 | 381 | /* 330 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 382 | /* 332 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 383 | /* 334 */ 0x8, /* FC_LONG */ 384 | 0x0, /* 0 */ 385 | 386 | /* Return value */ 387 | 388 | /* 336 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 389 | /* 338 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 390 | /* 340 */ 0x8, /* FC_LONG */ 391 | 0x0, /* 0 */ 392 | 393 | /* Procedure WSDKRecvPayMsg */ 394 | 395 | /* 342 */ 0x32, /* FC_BIND_PRIMITIVE */ 396 | 0x48, /* Old Flags: */ 397 | /* 344 */ NdrFcLong( 0x0 ), /* 0 */ 398 | /* 348 */ NdrFcShort( 0xa ), /* 10 */ 399 | /* 350 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 400 | /* 352 */ NdrFcShort( 0x8 ), /* 8 */ 401 | /* 354 */ NdrFcShort( 0x8 ), /* 8 */ 402 | /* 356 */ 0x44, /* Oi2 Flags: has return, has ext, */ 403 | 0x2, /* 2 */ 404 | /* 358 */ 0x8, /* 8 */ 405 | 0x1, /* Ext Flags: new corr desc, */ 406 | /* 360 */ NdrFcShort( 0x0 ), /* 0 */ 407 | /* 362 */ NdrFcShort( 0x0 ), /* 0 */ 408 | /* 364 */ NdrFcShort( 0x0 ), /* 0 */ 409 | 410 | /* Parameter funptr */ 411 | 412 | /* 366 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 413 | /* 368 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 414 | /* 370 */ 0x8, /* FC_LONG */ 415 | 0x0, /* 0 */ 416 | 417 | /* Return value */ 418 | 419 | /* 372 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 420 | /* 374 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 421 | /* 376 */ 0x8, /* FC_LONG */ 422 | 0x0, /* 0 */ 423 | 424 | 0x0 425 | } 426 | }; 427 | 428 | static const sdkdef_MIDL_TYPE_FORMAT_STRING sdkdef__MIDL_TypeFormatString = 429 | { 430 | 0, 431 | { 432 | NdrFcShort( 0x0 ), /* 0 */ 433 | /* 2 */ 434 | 0x11, 0x8, /* FC_RP [simple_pointer] */ 435 | /* 4 */ 436 | 0x25, /* FC_C_WSTRING */ 437 | 0x5c, /* FC_PAD */ 438 | 439 | 0x0 440 | } 441 | }; 442 | 443 | static const unsigned short WechatSDK_FormatStringOffsetTable[] = 444 | { 445 | 0, 446 | 30, 447 | 60, 448 | 90, 449 | 120, 450 | 156, 451 | 186, 452 | 228, 453 | 270, 454 | 306, 455 | 342 456 | }; 457 | 458 | 459 | static const MIDL_STUB_DESC WechatSDK_StubDesc = 460 | { 461 | (void *)& WechatSDK___RpcServerInterface, 462 | MIDL_user_allocate, 463 | MIDL_user_free, 464 | 0, 465 | 0, 466 | 0, 467 | 0, 468 | 0, 469 | sdkdef__MIDL_TypeFormatString.Format, 470 | 1, /* -error bounds_check flag */ 471 | 0x60001, /* Ndr library version */ 472 | 0, 473 | 0x801026e, /* MIDL Version 8.1.622 */ 474 | 0, 475 | 0, 476 | 0, /* notify & notify_flag routine table */ 477 | 0x1, /* MIDL flag */ 478 | 0, /* cs routines */ 479 | 0, /* proxy/server info */ 480 | 0 481 | }; 482 | 483 | static const RPC_DISPATCH_FUNCTION WechatSDK_table[] = 484 | { 485 | NdrServerCall2, 486 | NdrServerCall2, 487 | NdrServerCall2, 488 | NdrServerCall2, 489 | NdrServerCall2, 490 | NdrServerCall2, 491 | NdrServerCall2, 492 | NdrServerCall2, 493 | NdrServerCall2, 494 | NdrServerCall2, 495 | NdrServerCall2, 496 | 0 497 | }; 498 | static const RPC_DISPATCH_TABLE WechatSDK_v1_0_DispatchTable = 499 | { 500 | 11, 501 | (RPC_DISPATCH_FUNCTION*)WechatSDK_table 502 | }; 503 | 504 | static const SERVER_ROUTINE WechatSDK_ServerRoutineTable[] = 505 | { 506 | (SERVER_ROUTINE)WSDKInitialize, 507 | (SERVER_ROUTINE)WSDKUninitialize, 508 | (SERVER_ROUTINE)WSDKAntiRevokeMsg, 509 | (SERVER_ROUTINE)WSDKUnAntiRevokeMsg, 510 | (SERVER_ROUTINE)WSDKStartSaveVoiceMsg, 511 | (SERVER_ROUTINE)WSDKStopSaveVoiceMsg, 512 | (SERVER_ROUTINE)WSDKSendTextMsg, 513 | (SERVER_ROUTINE)WSDKSendImageMsg, 514 | (SERVER_ROUTINE)WSDKRecvTextMsg, 515 | (SERVER_ROUTINE)WSDKRecvTransferMsg, 516 | (SERVER_ROUTINE)WSDKRecvPayMsg 517 | }; 518 | 519 | static const MIDL_SERVER_INFO WechatSDK_ServerInfo = 520 | { 521 | &WechatSDK_StubDesc, 522 | WechatSDK_ServerRoutineTable, 523 | sdkdef__MIDL_ProcFormatString.Format, 524 | WechatSDK_FormatStringOffsetTable, 525 | 0, 526 | 0, 527 | 0, 528 | 0}; 529 | #pragma optimize("", on ) 530 | #if _MSC_VER >= 1200 531 | #pragma warning(pop) 532 | #endif 533 | 534 | 535 | #endif /* !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) */ 536 | 537 | -------------------------------------------------------------------------------- /src/WeChatSDKCore/sdkdef_c.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the RPC client stubs */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.01.0622 */ 7 | /* at Tue Jan 19 11:14:07 2038 8 | */ 9 | /* Compiler settings for sdkdef.idl: 10 | Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622 11 | protocol : dce , ms_ext, c_ext, robust 12 | error checks: allocation ref bounds_check enum stub_data 13 | VC __declspec() decoration level: 14 | __declspec(uuid()), __declspec(selectany), __declspec(novtable) 15 | DECLSPEC_UUID(), MIDL_INTERFACE() 16 | */ 17 | /* @@MIDL_FILE_HEADING( ) */ 18 | 19 | #if !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) 20 | 21 | 22 | #if _MSC_VER >= 1200 23 | #pragma warning(push) 24 | #endif 25 | 26 | #pragma warning( disable: 4211 ) /* redefine extern to static */ 27 | #pragma warning( disable: 4232 ) /* dllimport identity*/ 28 | #pragma warning( disable: 4024 ) /* array to pointer mapping*/ 29 | #pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */ 30 | 31 | #pragma optimize("", off ) 32 | 33 | #include 34 | 35 | #include "sdkdef_h.h" 36 | 37 | #define TYPE_FORMAT_STRING_SIZE 7 38 | #define PROC_FORMAT_STRING_SIZE 379 39 | #define EXPR_FORMAT_STRING_SIZE 1 40 | #define TRANSMIT_AS_TABLE_SIZE 0 41 | #define WIRE_MARSHAL_TABLE_SIZE 0 42 | 43 | typedef struct _sdkdef_MIDL_TYPE_FORMAT_STRING 44 | { 45 | short Pad; 46 | unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; 47 | } sdkdef_MIDL_TYPE_FORMAT_STRING; 48 | 49 | typedef struct _sdkdef_MIDL_PROC_FORMAT_STRING 50 | { 51 | short Pad; 52 | unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; 53 | } sdkdef_MIDL_PROC_FORMAT_STRING; 54 | 55 | typedef struct _sdkdef_MIDL_EXPR_FORMAT_STRING 56 | { 57 | long Pad; 58 | unsigned char Format[ EXPR_FORMAT_STRING_SIZE ]; 59 | } sdkdef_MIDL_EXPR_FORMAT_STRING; 60 | 61 | 62 | static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = 63 | {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; 64 | 65 | 66 | extern const sdkdef_MIDL_TYPE_FORMAT_STRING sdkdef__MIDL_TypeFormatString; 67 | extern const sdkdef_MIDL_PROC_FORMAT_STRING sdkdef__MIDL_ProcFormatString; 68 | extern const sdkdef_MIDL_EXPR_FORMAT_STRING sdkdef__MIDL_ExprFormatString; 69 | 70 | #define GENERIC_BINDING_TABLE_SIZE 0 71 | 72 | 73 | /* Standard interface: WechatSDK, ver. 1.0, 74 | GUID={0xEC3A7CE8,0x8F99,0x47ef,{0x97,0x05,0xDA,0x5D,0xF1,0x4F,0x9A,0x4C}} */ 75 | 76 | handle_t WechatRs_IfHandle; 77 | 78 | 79 | static const RPC_CLIENT_INTERFACE WechatSDK___RpcClientInterface = 80 | { 81 | sizeof(RPC_CLIENT_INTERFACE), 82 | {{0xEC3A7CE8,0x8F99,0x47ef,{0x97,0x05,0xDA,0x5D,0xF1,0x4F,0x9A,0x4C}},{1,0}}, 83 | {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}, 84 | 0, 85 | 0, 86 | 0, 87 | 0, 88 | 0, 89 | 0x00000000 90 | }; 91 | RPC_IF_HANDLE WechatSDK_v1_0_c_ifspec = (RPC_IF_HANDLE)& WechatSDK___RpcClientInterface; 92 | 93 | extern const MIDL_STUB_DESC WechatSDK_StubDesc; 94 | 95 | static RPC_BINDING_HANDLE WechatSDK__MIDL_AutoBindHandle; 96 | 97 | 98 | int WSDKInitialize( void) 99 | { 100 | 101 | CLIENT_CALL_RETURN _RetVal; 102 | 103 | _RetVal = NdrClientCall2( 104 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 105 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[0], 106 | ( unsigned char * )0); 107 | return ( int )_RetVal.Simple; 108 | 109 | } 110 | 111 | 112 | int WSDKUninitialize( void) 113 | { 114 | 115 | CLIENT_CALL_RETURN _RetVal; 116 | 117 | _RetVal = NdrClientCall2( 118 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 119 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[30], 120 | ( unsigned char * )0); 121 | return ( int )_RetVal.Simple; 122 | 123 | } 124 | 125 | 126 | int WSDKAntiRevokeMsg( void) 127 | { 128 | 129 | CLIENT_CALL_RETURN _RetVal; 130 | 131 | _RetVal = NdrClientCall2( 132 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 133 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[60], 134 | ( unsigned char * )0); 135 | return ( int )_RetVal.Simple; 136 | 137 | } 138 | 139 | 140 | int WSDKUnAntiRevokeMsg( void) 141 | { 142 | 143 | CLIENT_CALL_RETURN _RetVal; 144 | 145 | _RetVal = NdrClientCall2( 146 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 147 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[90], 148 | ( unsigned char * )0); 149 | return ( int )_RetVal.Simple; 150 | 151 | } 152 | 153 | 154 | int WSDKStartSaveVoiceMsg( 155 | /* [string][in] */ wchar_t *path) 156 | { 157 | 158 | CLIENT_CALL_RETURN _RetVal; 159 | 160 | _RetVal = NdrClientCall2( 161 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 162 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[120], 163 | ( unsigned char * )&path); 164 | return ( int )_RetVal.Simple; 165 | 166 | } 167 | 168 | 169 | int WSDKStopSaveVoiceMsg( void) 170 | { 171 | 172 | CLIENT_CALL_RETURN _RetVal; 173 | 174 | _RetVal = NdrClientCall2( 175 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 176 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[156], 177 | ( unsigned char * )0); 178 | return ( int )_RetVal.Simple; 179 | 180 | } 181 | 182 | 183 | int WSDKSendTextMsg( 184 | /* [string][in] */ wchar_t *wxid, 185 | /* [string][in] */ wchar_t *msg) 186 | { 187 | 188 | CLIENT_CALL_RETURN _RetVal; 189 | 190 | _RetVal = NdrClientCall2( 191 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 192 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[186], 193 | ( unsigned char * )&wxid); 194 | return ( int )_RetVal.Simple; 195 | 196 | } 197 | 198 | 199 | int WSDKSendImageMsg( 200 | /* [string][in] */ wchar_t *wxid, 201 | /* [string][in] */ wchar_t *path) 202 | { 203 | 204 | CLIENT_CALL_RETURN _RetVal; 205 | 206 | _RetVal = NdrClientCall2( 207 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 208 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[228], 209 | ( unsigned char * )&wxid); 210 | return ( int )_RetVal.Simple; 211 | 212 | } 213 | 214 | 215 | int WSDKRecvTextMsg( 216 | /* [in] */ unsigned int funptr) 217 | { 218 | 219 | CLIENT_CALL_RETURN _RetVal; 220 | 221 | _RetVal = NdrClientCall2( 222 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 223 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[270], 224 | ( unsigned char * )&funptr); 225 | return ( int )_RetVal.Simple; 226 | 227 | } 228 | 229 | 230 | int WSDKRecvTransferMsg( 231 | /* [in] */ unsigned int funptr) 232 | { 233 | 234 | CLIENT_CALL_RETURN _RetVal; 235 | 236 | _RetVal = NdrClientCall2( 237 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 238 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[306], 239 | ( unsigned char * )&funptr); 240 | return ( int )_RetVal.Simple; 241 | 242 | } 243 | 244 | 245 | int WSDKRecvPayMsg( 246 | /* [in] */ unsigned int funptr) 247 | { 248 | 249 | CLIENT_CALL_RETURN _RetVal; 250 | 251 | _RetVal = NdrClientCall2( 252 | ( PMIDL_STUB_DESC )&WechatSDK_StubDesc, 253 | (PFORMAT_STRING) &sdkdef__MIDL_ProcFormatString.Format[342], 254 | ( unsigned char * )&funptr); 255 | return ( int )_RetVal.Simple; 256 | 257 | } 258 | 259 | 260 | #if !defined(__RPC_WIN32__) 261 | #error Invalid build platform for this stub. 262 | #endif 263 | #if !(TARGET_IS_NT60_OR_LATER) 264 | #error You need Windows Vista or later to run this stub because it uses these features: 265 | #error compiled for Windows Vista. 266 | #error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. 267 | #error This app will fail with the RPC_X_WRONG_STUB_VERSION error. 268 | #endif 269 | 270 | 271 | static const sdkdef_MIDL_PROC_FORMAT_STRING sdkdef__MIDL_ProcFormatString = 272 | { 273 | 0, 274 | { 275 | 276 | /* Procedure WSDKInitialize */ 277 | 278 | 0x32, /* FC_BIND_PRIMITIVE */ 279 | 0x48, /* Old Flags: */ 280 | /* 2 */ NdrFcLong( 0x0 ), /* 0 */ 281 | /* 6 */ NdrFcShort( 0x0 ), /* 0 */ 282 | /* 8 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 283 | /* 10 */ NdrFcShort( 0x0 ), /* 0 */ 284 | /* 12 */ NdrFcShort( 0x8 ), /* 8 */ 285 | /* 14 */ 0x44, /* Oi2 Flags: has return, has ext, */ 286 | 0x1, /* 1 */ 287 | /* 16 */ 0x8, /* 8 */ 288 | 0x1, /* Ext Flags: new corr desc, */ 289 | /* 18 */ NdrFcShort( 0x0 ), /* 0 */ 290 | /* 20 */ NdrFcShort( 0x0 ), /* 0 */ 291 | /* 22 */ NdrFcShort( 0x0 ), /* 0 */ 292 | 293 | /* Return value */ 294 | 295 | /* 24 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 296 | /* 26 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 297 | /* 28 */ 0x8, /* FC_LONG */ 298 | 0x0, /* 0 */ 299 | 300 | /* Procedure WSDKUninitialize */ 301 | 302 | /* 30 */ 0x32, /* FC_BIND_PRIMITIVE */ 303 | 0x48, /* Old Flags: */ 304 | /* 32 */ NdrFcLong( 0x0 ), /* 0 */ 305 | /* 36 */ NdrFcShort( 0x1 ), /* 1 */ 306 | /* 38 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 307 | /* 40 */ NdrFcShort( 0x0 ), /* 0 */ 308 | /* 42 */ NdrFcShort( 0x8 ), /* 8 */ 309 | /* 44 */ 0x44, /* Oi2 Flags: has return, has ext, */ 310 | 0x1, /* 1 */ 311 | /* 46 */ 0x8, /* 8 */ 312 | 0x1, /* Ext Flags: new corr desc, */ 313 | /* 48 */ NdrFcShort( 0x0 ), /* 0 */ 314 | /* 50 */ NdrFcShort( 0x0 ), /* 0 */ 315 | /* 52 */ NdrFcShort( 0x0 ), /* 0 */ 316 | 317 | /* Return value */ 318 | 319 | /* 54 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 320 | /* 56 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 321 | /* 58 */ 0x8, /* FC_LONG */ 322 | 0x0, /* 0 */ 323 | 324 | /* Procedure WSDKAntiRevokeMsg */ 325 | 326 | /* 60 */ 0x32, /* FC_BIND_PRIMITIVE */ 327 | 0x48, /* Old Flags: */ 328 | /* 62 */ NdrFcLong( 0x0 ), /* 0 */ 329 | /* 66 */ NdrFcShort( 0x2 ), /* 2 */ 330 | /* 68 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 331 | /* 70 */ NdrFcShort( 0x0 ), /* 0 */ 332 | /* 72 */ NdrFcShort( 0x8 ), /* 8 */ 333 | /* 74 */ 0x44, /* Oi2 Flags: has return, has ext, */ 334 | 0x1, /* 1 */ 335 | /* 76 */ 0x8, /* 8 */ 336 | 0x1, /* Ext Flags: new corr desc, */ 337 | /* 78 */ NdrFcShort( 0x0 ), /* 0 */ 338 | /* 80 */ NdrFcShort( 0x0 ), /* 0 */ 339 | /* 82 */ NdrFcShort( 0x0 ), /* 0 */ 340 | 341 | /* Return value */ 342 | 343 | /* 84 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 344 | /* 86 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 345 | /* 88 */ 0x8, /* FC_LONG */ 346 | 0x0, /* 0 */ 347 | 348 | /* Procedure WSDKUnAntiRevokeMsg */ 349 | 350 | /* 90 */ 0x32, /* FC_BIND_PRIMITIVE */ 351 | 0x48, /* Old Flags: */ 352 | /* 92 */ NdrFcLong( 0x0 ), /* 0 */ 353 | /* 96 */ NdrFcShort( 0x3 ), /* 3 */ 354 | /* 98 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 355 | /* 100 */ NdrFcShort( 0x0 ), /* 0 */ 356 | /* 102 */ NdrFcShort( 0x8 ), /* 8 */ 357 | /* 104 */ 0x44, /* Oi2 Flags: has return, has ext, */ 358 | 0x1, /* 1 */ 359 | /* 106 */ 0x8, /* 8 */ 360 | 0x1, /* Ext Flags: new corr desc, */ 361 | /* 108 */ NdrFcShort( 0x0 ), /* 0 */ 362 | /* 110 */ NdrFcShort( 0x0 ), /* 0 */ 363 | /* 112 */ NdrFcShort( 0x0 ), /* 0 */ 364 | 365 | /* Return value */ 366 | 367 | /* 114 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 368 | /* 116 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 369 | /* 118 */ 0x8, /* FC_LONG */ 370 | 0x0, /* 0 */ 371 | 372 | /* Procedure WSDKStartSaveVoiceMsg */ 373 | 374 | /* 120 */ 0x32, /* FC_BIND_PRIMITIVE */ 375 | 0x48, /* Old Flags: */ 376 | /* 122 */ NdrFcLong( 0x0 ), /* 0 */ 377 | /* 126 */ NdrFcShort( 0x4 ), /* 4 */ 378 | /* 128 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 379 | /* 130 */ NdrFcShort( 0x0 ), /* 0 */ 380 | /* 132 */ NdrFcShort( 0x8 ), /* 8 */ 381 | /* 134 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 382 | 0x2, /* 2 */ 383 | /* 136 */ 0x8, /* 8 */ 384 | 0x1, /* Ext Flags: new corr desc, */ 385 | /* 138 */ NdrFcShort( 0x0 ), /* 0 */ 386 | /* 140 */ NdrFcShort( 0x0 ), /* 0 */ 387 | /* 142 */ NdrFcShort( 0x0 ), /* 0 */ 388 | 389 | /* Parameter path */ 390 | 391 | /* 144 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 392 | /* 146 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 393 | /* 148 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 394 | 395 | /* Return value */ 396 | 397 | /* 150 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 398 | /* 152 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 399 | /* 154 */ 0x8, /* FC_LONG */ 400 | 0x0, /* 0 */ 401 | 402 | /* Procedure WSDKStopSaveVoiceMsg */ 403 | 404 | /* 156 */ 0x32, /* FC_BIND_PRIMITIVE */ 405 | 0x48, /* Old Flags: */ 406 | /* 158 */ NdrFcLong( 0x0 ), /* 0 */ 407 | /* 162 */ NdrFcShort( 0x5 ), /* 5 */ 408 | /* 164 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 409 | /* 166 */ NdrFcShort( 0x0 ), /* 0 */ 410 | /* 168 */ NdrFcShort( 0x8 ), /* 8 */ 411 | /* 170 */ 0x44, /* Oi2 Flags: has return, has ext, */ 412 | 0x1, /* 1 */ 413 | /* 172 */ 0x8, /* 8 */ 414 | 0x1, /* Ext Flags: new corr desc, */ 415 | /* 174 */ NdrFcShort( 0x0 ), /* 0 */ 416 | /* 176 */ NdrFcShort( 0x0 ), /* 0 */ 417 | /* 178 */ NdrFcShort( 0x0 ), /* 0 */ 418 | 419 | /* Return value */ 420 | 421 | /* 180 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 422 | /* 182 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 423 | /* 184 */ 0x8, /* FC_LONG */ 424 | 0x0, /* 0 */ 425 | 426 | /* Procedure WSDKSendTextMsg */ 427 | 428 | /* 186 */ 0x32, /* FC_BIND_PRIMITIVE */ 429 | 0x48, /* Old Flags: */ 430 | /* 188 */ NdrFcLong( 0x0 ), /* 0 */ 431 | /* 192 */ NdrFcShort( 0x6 ), /* 6 */ 432 | /* 194 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 433 | /* 196 */ NdrFcShort( 0x0 ), /* 0 */ 434 | /* 198 */ NdrFcShort( 0x8 ), /* 8 */ 435 | /* 200 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 436 | 0x3, /* 3 */ 437 | /* 202 */ 0x8, /* 8 */ 438 | 0x1, /* Ext Flags: new corr desc, */ 439 | /* 204 */ NdrFcShort( 0x0 ), /* 0 */ 440 | /* 206 */ NdrFcShort( 0x0 ), /* 0 */ 441 | /* 208 */ NdrFcShort( 0x0 ), /* 0 */ 442 | 443 | /* Parameter wxid */ 444 | 445 | /* 210 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 446 | /* 212 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 447 | /* 214 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 448 | 449 | /* Parameter msg */ 450 | 451 | /* 216 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 452 | /* 218 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 453 | /* 220 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 454 | 455 | /* Return value */ 456 | 457 | /* 222 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 458 | /* 224 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 459 | /* 226 */ 0x8, /* FC_LONG */ 460 | 0x0, /* 0 */ 461 | 462 | /* Procedure WSDKSendImageMsg */ 463 | 464 | /* 228 */ 0x32, /* FC_BIND_PRIMITIVE */ 465 | 0x48, /* Old Flags: */ 466 | /* 230 */ NdrFcLong( 0x0 ), /* 0 */ 467 | /* 234 */ NdrFcShort( 0x7 ), /* 7 */ 468 | /* 236 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ 469 | /* 238 */ NdrFcShort( 0x0 ), /* 0 */ 470 | /* 240 */ NdrFcShort( 0x8 ), /* 8 */ 471 | /* 242 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ 472 | 0x3, /* 3 */ 473 | /* 244 */ 0x8, /* 8 */ 474 | 0x1, /* Ext Flags: new corr desc, */ 475 | /* 246 */ NdrFcShort( 0x0 ), /* 0 */ 476 | /* 248 */ NdrFcShort( 0x0 ), /* 0 */ 477 | /* 250 */ NdrFcShort( 0x0 ), /* 0 */ 478 | 479 | /* Parameter wxid */ 480 | 481 | /* 252 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 482 | /* 254 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 483 | /* 256 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 484 | 485 | /* Parameter path */ 486 | 487 | /* 258 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ 488 | /* 260 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 489 | /* 262 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ 490 | 491 | /* Return value */ 492 | 493 | /* 264 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 494 | /* 266 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 495 | /* 268 */ 0x8, /* FC_LONG */ 496 | 0x0, /* 0 */ 497 | 498 | /* Procedure WSDKRecvTextMsg */ 499 | 500 | /* 270 */ 0x32, /* FC_BIND_PRIMITIVE */ 501 | 0x48, /* Old Flags: */ 502 | /* 272 */ NdrFcLong( 0x0 ), /* 0 */ 503 | /* 276 */ NdrFcShort( 0x8 ), /* 8 */ 504 | /* 278 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 505 | /* 280 */ NdrFcShort( 0x8 ), /* 8 */ 506 | /* 282 */ NdrFcShort( 0x8 ), /* 8 */ 507 | /* 284 */ 0x44, /* Oi2 Flags: has return, has ext, */ 508 | 0x2, /* 2 */ 509 | /* 286 */ 0x8, /* 8 */ 510 | 0x1, /* Ext Flags: new corr desc, */ 511 | /* 288 */ NdrFcShort( 0x0 ), /* 0 */ 512 | /* 290 */ NdrFcShort( 0x0 ), /* 0 */ 513 | /* 292 */ NdrFcShort( 0x0 ), /* 0 */ 514 | 515 | /* Parameter funptr */ 516 | 517 | /* 294 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 518 | /* 296 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 519 | /* 298 */ 0x8, /* FC_LONG */ 520 | 0x0, /* 0 */ 521 | 522 | /* Return value */ 523 | 524 | /* 300 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 525 | /* 302 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 526 | /* 304 */ 0x8, /* FC_LONG */ 527 | 0x0, /* 0 */ 528 | 529 | /* Procedure WSDKRecvTransferMsg */ 530 | 531 | /* 306 */ 0x32, /* FC_BIND_PRIMITIVE */ 532 | 0x48, /* Old Flags: */ 533 | /* 308 */ NdrFcLong( 0x0 ), /* 0 */ 534 | /* 312 */ NdrFcShort( 0x9 ), /* 9 */ 535 | /* 314 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 536 | /* 316 */ NdrFcShort( 0x8 ), /* 8 */ 537 | /* 318 */ NdrFcShort( 0x8 ), /* 8 */ 538 | /* 320 */ 0x44, /* Oi2 Flags: has return, has ext, */ 539 | 0x2, /* 2 */ 540 | /* 322 */ 0x8, /* 8 */ 541 | 0x1, /* Ext Flags: new corr desc, */ 542 | /* 324 */ NdrFcShort( 0x0 ), /* 0 */ 543 | /* 326 */ NdrFcShort( 0x0 ), /* 0 */ 544 | /* 328 */ NdrFcShort( 0x0 ), /* 0 */ 545 | 546 | /* Parameter funptr */ 547 | 548 | /* 330 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 549 | /* 332 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 550 | /* 334 */ 0x8, /* FC_LONG */ 551 | 0x0, /* 0 */ 552 | 553 | /* Return value */ 554 | 555 | /* 336 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 556 | /* 338 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 557 | /* 340 */ 0x8, /* FC_LONG */ 558 | 0x0, /* 0 */ 559 | 560 | /* Procedure WSDKRecvPayMsg */ 561 | 562 | /* 342 */ 0x32, /* FC_BIND_PRIMITIVE */ 563 | 0x48, /* Old Flags: */ 564 | /* 344 */ NdrFcLong( 0x0 ), /* 0 */ 565 | /* 348 */ NdrFcShort( 0xa ), /* 10 */ 566 | /* 350 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ 567 | /* 352 */ NdrFcShort( 0x8 ), /* 8 */ 568 | /* 354 */ NdrFcShort( 0x8 ), /* 8 */ 569 | /* 356 */ 0x44, /* Oi2 Flags: has return, has ext, */ 570 | 0x2, /* 2 */ 571 | /* 358 */ 0x8, /* 8 */ 572 | 0x1, /* Ext Flags: new corr desc, */ 573 | /* 360 */ NdrFcShort( 0x0 ), /* 0 */ 574 | /* 362 */ NdrFcShort( 0x0 ), /* 0 */ 575 | /* 364 */ NdrFcShort( 0x0 ), /* 0 */ 576 | 577 | /* Parameter funptr */ 578 | 579 | /* 366 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ 580 | /* 368 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */ 581 | /* 370 */ 0x8, /* FC_LONG */ 582 | 0x0, /* 0 */ 583 | 584 | /* Return value */ 585 | 586 | /* 372 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ 587 | /* 374 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ 588 | /* 376 */ 0x8, /* FC_LONG */ 589 | 0x0, /* 0 */ 590 | 591 | 0x0 592 | } 593 | }; 594 | 595 | static const sdkdef_MIDL_TYPE_FORMAT_STRING sdkdef__MIDL_TypeFormatString = 596 | { 597 | 0, 598 | { 599 | NdrFcShort( 0x0 ), /* 0 */ 600 | /* 2 */ 601 | 0x11, 0x8, /* FC_RP [simple_pointer] */ 602 | /* 4 */ 603 | 0x25, /* FC_C_WSTRING */ 604 | 0x5c, /* FC_PAD */ 605 | 606 | 0x0 607 | } 608 | }; 609 | 610 | static const unsigned short WechatSDK_FormatStringOffsetTable[] = 611 | { 612 | 0, 613 | 30, 614 | 60, 615 | 90, 616 | 120, 617 | 156, 618 | 186, 619 | 228, 620 | 270, 621 | 306, 622 | 342 623 | }; 624 | 625 | 626 | static const MIDL_STUB_DESC WechatSDK_StubDesc = 627 | { 628 | (void *)& WechatSDK___RpcClientInterface, 629 | MIDL_user_allocate, 630 | MIDL_user_free, 631 | &WechatRs_IfHandle, 632 | 0, 633 | 0, 634 | 0, 635 | 0, 636 | sdkdef__MIDL_TypeFormatString.Format, 637 | 1, /* -error bounds_check flag */ 638 | 0x60001, /* Ndr library version */ 639 | 0, 640 | 0x801026e, /* MIDL Version 8.1.622 */ 641 | 0, 642 | 0, 643 | 0, /* notify & notify_flag routine table */ 644 | 0x1, /* MIDL flag */ 645 | 0, /* cs routines */ 646 | 0, /* proxy/server info */ 647 | 0 648 | }; 649 | #pragma optimize("", on ) 650 | #if _MSC_VER >= 1200 651 | #pragma warning(pop) 652 | #endif 653 | 654 | 655 | #endif /* !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) */ 656 | 657 | --------------------------------------------------------------------------------