wxapi.h 2.1 KB
Newer Older
1
#pragma once
2
#include "wxsignal.h"
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#include "SendImage.h"
#include "SendText.h"
#include "SendFile.h"
#include "SendArticle.h"
#include "FriendList.h"
#include "SearchContact.h"
#include "SelfInfo.h"
#include "SendCard.h"
#include "CheckFriendStatus.h"
#include "LogMsgInfo.h"
#include "ReceiveMessage.h"
#include "SendAtText.h"
#include "GetChatRoomMembers.h"
#include "GetDbHandles.h"
#include "DbExecuteSql.h"
#include "DbBackup.h"
#include "VerifyFriendApply.h"
#include "AddFriend.h"
#include "sqlite3.h"
#include "wechatver.h"
#include "DeleteUser.h"
#include "SendAppMsg.h"
L
ljc545w 已提交
25 26 27 28 29 30 31
#include "EditRemark.h"
#include "DelChatRoomMember.h"
#include "AddChatRoomMember.h"
#include "SetChatRoomAnnouncement.h"
#include "SetChatRoomSelfNickname.h"
#include "SetChatRoomName.h"
#include "GetChatRoomMemberNickname.h"
L
ljc545w 已提交
32 33
#include "OpenBrowser.h"
#include "GetHistoryPublicMsg.h"
34
#include "ForwardMessage.h"
35
#include "GetQrcodeImage.h"
L
ljc545w 已提交
36
#include "GetA8Key.h"
37 38

using namespace std;
L
ljc545w 已提交
39 40
#pragma comment(lib, "version.lib")
#pragma warning(disable : 4731 26812)
41 42 43 44 45
// 对于导出函数,需要使用此宏修饰
#define DLLEXPORT extern "C" __declspec(dllexport)

BOOL CreateConsole(void);
DWORD GetWeChatWinBase();
L
ljc545w 已提交
46
string unicode_to_gb2312(wchar_t *wchar);
L
ljc545w 已提交
47
string utf8_to_gb2312(const char *strUTF8);
48
string gb2312_to_utf8(const char *strGB2312);
L
ljc545w 已提交
49
string unicode_to_utf8(wchar_t *wstr);
L
ljc545w 已提交
50 51 52
wstring utf8_to_unicode(const char *buffer);
void HookAnyAddress(DWORD dwHookAddr, LPVOID dwJmpAddress, char *originalRecieveCode);
void UnHookAnyAddress(DWORD dwHookAddr, char *originalRecieveCode);
53 54 55
DLLEXPORT void UnHookAll();
wstring wreplace(wstring source, wchar_t replaced, wstring replaceto);
void PrintProcAddr();
L
ljc545w 已提交
56
wstring GetTimeW(long long timestamp);
57
BOOL ProcessIsWeChat();
L
ljc545w 已提交
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
BOOL FindOrCreateDirectory(const wchar_t *pszPath);

template <typename T1, typename T2>
vector<T1> split(T1 str, T2 letter)
{
    vector<T1> arr;
    size_t pos;
    while ((pos = str.find_first_of(letter)) != T1::npos)
    {
        T1 str1 = str.substr(0, pos);
        arr.push_back(str1);
        str = str.substr(pos + 1, str.length() - pos - 1);
    }
    arr.push_back(str);
    return arr;
}