-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1) public WeChatSDK1.3.0 2) add recv msg 3) add anti revoke msg tip 4…
…) add C#
- Loading branch information
Showing
87 changed files
with
2,669 additions
and
827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
|
||
SuperWeChat.exe c:\wxmsg |
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading; | ||
|
||
using static WeChatSDK.WeChatSDK; | ||
|
||
namespace ConsoleApp1 | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
try | ||
{ | ||
uint pid = WXOpenWechat(); | ||
Console.WriteLine("WXOpenWechat pid:" + pid); | ||
|
||
while (!WXIsWechatAlive(pid)) | ||
{ | ||
Console.Write("."); | ||
Thread.Sleep(100); | ||
} | ||
|
||
Console.WriteLine("initialize sdk..."); | ||
|
||
Console.WriteLine(WXInitialize(pid)); | ||
|
||
while (!WXIsWechatSDKOk(pid)) | ||
{ | ||
Console.Write("."); | ||
Thread.Sleep(100); | ||
} | ||
|
||
Console.WriteLine("sdk ok..."); | ||
|
||
WXAntiRevokeMsg(pid); | ||
WXSaveVoiceMsg(pid, "c:\\wxmsg"); | ||
|
||
WXRecvPayMsg(pid, RecvMoneyMsg); | ||
|
||
Console.ReadLine(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Console.WriteLine(ex.ToString()); | ||
} | ||
} | ||
|
||
static int RecvMoneyMsg(UInt32 pid, string wxid, string id, string msg) | ||
{ | ||
Console.WriteLine(wxid + ":" + msg); | ||
return 0; | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace WeChatSDK | ||
{ | ||
class WeChatSDK | ||
{ | ||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public uint WXOpenWechat(); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public bool WXIsWechatAlive(uint pid); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXInitialize(uint pid); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXUninitialize(uint pid); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public bool WXIsWechatSDKOk(uint pid); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXGetWechat(string wxid); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXAntiRevokeMsg(uint pid); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXUnAntiRevokeMsg(uint pid); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)] | ||
extern static public int WXSaveVoiceMsg(uint pid, string path); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXUnSaveVoiceMsg(uint pid); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)] | ||
extern static public int WXSendTextMsg(uint pid, string wxid, string msg); | ||
|
||
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Unicode)] | ||
public delegate int RecvMsgCallback(uint pid, string wxid, string msg); | ||
|
||
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Unicode)] | ||
public delegate int RecvPayMsgCallback(uint pid, string wxid, string id, string msg); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXRecvTextMsg(uint pid, RecvMsgCallback funptr); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXRecvTransferMsg(uint pid, RecvPayMsgCallback funptr); | ||
|
||
[DllImport(@"WeChatSDK.dll", CallingConvention = CallingConvention.Cdecl)] | ||
extern static public int WXRecvPayMsg(uint pid, RecvPayMsgCallback funptr); | ||
} | ||
} |
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
代码<合入>到
WeChatSDKCore
和WeChatSDK
中