1 Star 2 Fork 0

龙雨城 / RH_Douyin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
helptool.cpp 20.83 KB
一键复制 编辑 原始数据 按行查看 历史
龙雨城 提交于 2022-05-17 10:52 . 修改一些表述
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
#include<windows.h>
#include<stdio.h>
#include<string>
#include"sqlite3.h"
#include<locale>
#include<codecvt>
#include<iostream>
#include<vector>
#include <cassert>
#include "./curl/curl.h"
#include "json.hpp"
#include "helptool.h"
#define _NEW_PATH 1
HMODULE hsocketdll = NULL;
T_socket_start_server socket_start_server;
T_socket_send_reportflag socket_send_reportflag;
T_socket_stop_server socket_stop_server;
T_socket_send_msg socket_send_msg;
T_socket_send_pos socket_send_pos;
/*
* 说明:数据编码格式转换
*/
void UnicodeToANSI(std::wstring& wstr, std::string& str)
{
int textlen = WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), -1, NULL, 0, NULL, NULL);
str.resize(textlen + 1);
memset(&str[0], 0, textlen + 1);
WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), -1, &str[0], textlen, NULL, NULL);
}
/*
* 说明:数据编码格式转换
*/
void UTF8ToUnicode(std::string& str, std::wstring& wstr)
{
int textlen = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0);
wstr.resize(textlen - 1);
memset(&wstr[0], 0, (textlen) * sizeof(wchar_t));
MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, &wstr[0], textlen);
}
/*
* 说明:数据编码格式转换
*/
void UnicodeToUTF8(std::wstring& wstr, std::string& str)
{
int textlen = WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), -1, NULL, 0, NULL, NULL);
str.resize(textlen - 1);
memset(&str[0], 0, textlen);
WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), -1, &str[0], textlen, NULL, NULL);
}
/*
* 说明:数据编码格式转换
*/
void ANSI_2_UTF16(const std::string& strANSI, std::wstring& wstrUtf16)
{
int nUnicodeLength = ::MultiByteToWideChar(CP_ACP, 0, strANSI.c_str(), -1, NULL, 0);
wstrUtf16.resize(nUnicodeLength - 1);
memset(&wstrUtf16[0], 0, sizeof(wchar_t) * (nUnicodeLength));
MultiByteToWideChar(CP_ACP, 0, strANSI.c_str(), -1, &wstrUtf16[0], nUnicodeLength);
}
size_t Base64_Decode(char* pDest, const char* pSrc, size_t srclen)
{
std::string str = Decode(pSrc);
memcpy(pDest, str.c_str(), str.length());
pDest[str.length()] = '\0';
return str.length();
}
/*
* 说明:封装一层sqlite3的操作,使得支持wstring
*/
int m_sqlite3_open(std::wstring& path, sqlite3** db)
{
std::string Utf8_path;
UnicodeToUTF8(path, Utf8_path);
return sqlite3_open(Utf8_path.c_str(), db);
}
/*
* 说明:封装一层sqlite3的操作,使得支持wstring
*/
int m_sqlite3_prepare_v2(sqlite3* db, std::wstring& zSql, int nBytes, sqlite3_stmt** ppStmt, const char** pzTail)
{
const char* Tail;
std::string Utf8_str;
UnicodeToUTF8(zSql, Utf8_str);
return sqlite3_prepare_v2(db, Utf8_str.c_str(), strlen(Utf8_str.c_str()), ppStmt, &Tail);
}
/*
* 说明:封装一层sqlite3的操作,使得支持wstring
*/
int m_sqlite3_exec(sqlite3* db, std::wstring& sql, int(*callback)(void*, int, char**, char**), void* a, char** errmsg)
{
std::string Utf8_str;
UnicodeToUTF8(sql, Utf8_str);
return sqlite3_exec(db, Utf8_str.c_str(), callback, a, errmsg);
}
/*
* 说明:封装一层sqlite3的操作,使得支持wstring
*/
int m_sqlite3_bind_text(sqlite3_stmt* pStmt, int i, std::wstring& zData, int nData, void(*xDel)(void*))
{
std::wstring Utf16_wstr;
std::string ansi_str;
UnicodeToANSI(zData, ansi_str);
ANSI_2_UTF16(ansi_str, Utf16_wstr);
return sqlite3_bind_text16(pStmt, i, Utf16_wstr.c_str(), nData, xDel);
}
std::string ws2s(const std::wstring& ws)
{
size_t i;
std::string curLocale = setlocale(LC_ALL, NULL);
setlocale(LC_ALL, "chs");
const wchar_t* _source = ws.c_str();
size_t _dsize = 4 * ws.size() + 1;
char* _dest = new char[_dsize];
memset(_dest, 0x0, _dsize);
wcstombs_s(&i, _dest, _dsize, _source, _dsize);
std::string result = _dest;
delete[] _dest;
setlocale(LC_ALL, curLocale.c_str());
return result;
}
const char DecodeTable[] =
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 62, 0xff, 0xff, 0xff, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
std::string Decode(const char* str)
{
int length = strlen(str);
int bin = 0, i = 0, pos = 0;
std::string _decode_result;
const char* current = str;
char ch;
while ((ch = *current++) != '\0' && length-- > 0)
{
if (ch == '=') {
if (*current != '=' && (i % 4) == 1) {
return NULL;
}
continue;
}
ch = DecodeTable[ch];
if (ch == 0xff) { /* a space or some other separator character, we simply skip over */
continue;
}
switch (i % 4)
{
case 0:
bin = ch << 2;
break;
case 1:
bin |= ch >> 4;
_decode_result += bin;
bin = (ch & 0x0f) << 4;
break;
case 2:
bin |= ch >> 2;
_decode_result += bin;
bin = (ch & 0x03) << 6;
break;
case 3:
bin |= ch;
_decode_result += bin;
break;
}
i++;
}
return _decode_result;
}
/*
* 说明:解析命令参数
*/
void getParam(wchar_t* paramList, wchar_t* paramType, std::wstring& out_str)
{
for (size_t i = 0; i < wcslen(paramList); i++)
{
wchar_t* wstr = new wchar_t[wcslen(paramType) * sizeof(wchar_t) + 2];
memset(wstr, 0, wcslen(paramType) * sizeof(wchar_t) + 2);
memcpy(wstr, paramList + i, wcslen(paramType) * sizeof(wchar_t));
if (_wcsicmp(wstr, paramType) == 0)
{
wchar_t* out = paramList + i + wcslen(paramType);
int k = 0;
for (size_t j = 0; j < wcslen(out); j++)
{
if (out[j] != L' ' && out[j] != L'?')
goto m_con;
if (out[j] == L'?')
{
break;
}
k++;
}
out = out + k + 1;
k = 0;
for (size_t j = 0; j < wcslen(out); j++)
{
#if _NEW_PATH
if (out[j] == L'|')
{
break;
}
#else
if (out[j] == L',')
{
break;
}
#endif
k++;
}
wchar_t tmp[MAX_PATH];
memset(tmp, 0, k * sizeof(wchar_t) + 2);
memcpy(tmp, out, k * sizeof(wchar_t));
out_str = tmp;
//mlog->SET_LOG((wchar_t*)(L"getParam__" + std::wstring(paramList) + L"____" + paramType + L"____" + out_str).c_str());
//ȥ��β�ո�
if (out_str.empty())
{
return;
}
out_str.erase(0, out_str.find_first_not_of(L" "));
out_str.erase(out_str.find_last_not_of(L" ") + 1);
return;
m_con:
;
}
delete[]wstr;
}
}
/*
* 说明:string转wstring
*/
std::wstring stringToWstring(const std::string& str) {
if (str.empty()) {
return L"";
}
int num = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0);
wchar_t* wide = new wchar_t[num];
MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, wide, num);
std::wstring w_str(wide);
delete[] wide;
return w_str;
}
std::wstring string2wstring(std::string str)
{
std::wstring result;
//获取缓冲区大小,并申请空间,缓冲区大小按字符计算
int len = MultiByteToWideChar(CP_ACP, 0, str.c_str(), str.size(), NULL, 0);
TCHAR* buffer = new TCHAR[len + 1];
//多字节编码转换成宽字节编码
MultiByteToWideChar(CP_ACP, 0, str.c_str(), str.size(), buffer, len);
buffer[len] = L'\0';
//添加字符串结尾
//删除缓冲区并返回值
result.append(buffer);
delete[] buffer;
return result;
}
/*
* 说明:wstring转string
*/
std::string WStringToString(std::wstring wstr)
{
/*std::string str;
int nLen = (int)wstr.length();
str.resize(nLen, ' ');
int nResult = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wstr.c_str(), nLen, (LPSTR)str.c_str(), nLen, NULL, NULL);
if (nResult == 0)
{
return "";
}
return str;*/
std::string testcout;
UnicodeToANSI(wstr, testcout);
return testcout;
}
std::string wstring2string(std::wstring wstr)
{
std::string result;
int len = WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), wstr.size(), NULL, 0, NULL, NULL);
if (len <= 0)return result;
char* buffer = new char[len + 1];
if (buffer == NULL)return result;
WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), wstr.size(), buffer, len, NULL, NULL);
buffer[len] = '\0';
result.append(buffer);
delete[] buffer;
return result;
}
/*
* 说明:生成UUID
*/
std::string newUUID() {
GUID guid;
char cBuffer[64] = { 0 };
if (0 == CoCreateGuid(&guid)) {
sprintf_s(cBuffer, sizeof(cBuffer),
"%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X",
guid.Data1, guid.Data2,
guid.Data3, guid.Data4[0],
guid.Data4[1], guid.Data4[2],
guid.Data4[3], guid.Data4[4],
guid.Data4[5], guid.Data4[6],
guid.Data4[7]);
}
return std::string(cBuffer);
}
void printWstring(std::wstring wstr) {
std::wcout.imbue(std::locale("chs"));
std::wcout << wstr << std::endl;
}
void displayvector(std::vector<std::string>& vvector) {
std::cout << "正在打印vector" << std::endl;
auto pvectorIt = vvector.begin();
for (; pvectorIt != vvector.end(); pvectorIt++)
{
std::cout << *pvectorIt << std::endl;;
}
}
/*
* 参数:输入url 和 存储图片的路径
* 作者:龙向洋
* 说明:把聊天记录里的图片下载出来到路径下,注意路径要给定名字比如:a.gif
*/
void ImageDownloader(const std::string& image_url, const std::string& save_address) {
CURL* curl;
CURLcode res;
curl = curl_easy_init();
FILE* fp = fopen(save_address.c_str(), "wb");
res = curl_easy_setopt(curl, CURLOPT_URL, image_url.c_str());
if (res != CURLE_OK)
{
curl_easy_cleanup(curl);
return;
}
res = curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL);
res = curl_easy_perform(curl);
fclose(fp);
curl_easy_cleanup(curl);
}
/*
* 参数:带有双引号的字符串,比如 "dasdasd"
* 作者:龙向洋
* 说明:去除头尾的双引号
*/
std::string deleteHeadTail(const std::string& str) {
std::string temp(str);
temp.erase(0, temp.find_first_not_of("\""));
temp.erase(temp.find_last_not_of("\"") + 1);
return temp;
}
/*
* 参数:输入聊天内容的字符串
* 作者:龙向洋
* 说明:解析聊天内容
* 工具:https://github.com/nlohmann/json
* 为了使用方便,可以让json命名空间内所有标识符在此文件中可见
*/
using json = nlohmann::json;
std::vector<std::wstring> analyszeContent(const std::string& content, const std::wstring& filesavepath) {
// 解析聊天内容
/*
* 01--文字; 02--图片; 03--音频; 04--视频; 05--位置; 06--通话; 07--名片; 08--文件; 09--组合; 10--通话记录; 11--转账; 12--收钱; 13--红包
* 聊天表情图片 "aweType": 500
* 发送的图片 "aweType": 2702
* 普通文本 "aweType": 700
* 定位 "aweType": 0
* 通话或视频 voip_content:..
* 返回形式为:{0:CONTENT, 1:RH_TEXT_MSG, 2:FILE_PATH, 3:MEDIA_TYPE, 4:CITY_CODE, 5:COMPANY_ADDRESS, 6:LONGITUDE, 7:LATITUDE, 8:DUAL_TIME, 9:RH_MSG_TYPE}
*/
//std::cout << "调试analyszeContent()" << content << std::endl;
// CONTENT
std::wstring CONTENT = L"";
// RH_TEXT_MSG
std::wstring RH_TEXT_MSG = L"";
// FILE_PATH
std::wstring FILE_PATH = L""; //这里指新加的文件后缀,比如新加了图片类型:".gif"、或者新加名称:"headimage"
// MEDIA_TYPE
std::wstring MEDIA_TYPE = L"";
// CITY_CODE
std::wstring CITY_CODE = L"";
// COMPANY_ADDRESS
std::wstring COMPANY_ADDRESS = L"";
// LONGITUDE
std::wstring LONGITUDE = L"";
// LATITUDE
std::wstring LATITUDE = L"";
// DUAL_TIME
std::wstring DUAL_TIME = L"";
// RH_MSG_TYP
std::wstring RH_MSG_TYP = L"";
std::vector<std::wstring> insertInfo;
//try {
// json j = json::parse(content);
//}
//catch (std::exception& e)
//{
// std::cout << e.what() << std::endl;
//}
// -----------------------
json j = json::parse(content);
if (j.contains("aweType")) {
// aweType = 800 --> 转发分享的抖音视频
if (j.at("aweType") == 800) {
MEDIA_TYPE = L"04";
RH_MSG_TYP = L"04";
// content_name 存放的是视频作者名
if (j.contains("content_name")) {
RH_TEXT_MSG += L"视频作者:";
RH_TEXT_MSG += stringToWstring(j.at("content_name").dump());
}
// content_thumb 存放的是视频作者头像
if (j.contains("content_thumb")) {
if (j.at("content_thumb").contains("url_list")) {
std::string headimageurl = deleteHeadTail(j.at("content_thumb").at("url_list").at(0).dump());
std::wstring headimagepath = filesavepath;
headimagepath += L"content_thumb.jpg";
ImageDownloader(headimageurl, WStringToString(headimagepath));
}
}
// cover_url 存放的是封面图
if (j.contains("cover_url")) {
if (j.at("cover_url").contains("url_list")) {
std::string coverimageurl = deleteHeadTail(j.at("cover_url").at("url_list").at(0).dump());
std::wstring coverimagepath = filesavepath;
coverimagepath += L"cover.jpg";
ImageDownloader(coverimageurl, WStringToString(coverimagepath));
FILE_PATH += L"cover";
}
}
// content_title 存放的是视频标签
if (j.contains("content_title")) {
RH_TEXT_MSG += L"视频标签:";
RH_TEXT_MSG += stringToWstring(j.at("content_title").dump());
}
}
// aweType = 500 --> gif动图,aweType = 505 --> png图片,
else if (j.at("aweType") == 500 || j.at("aweType") == 505) {
// 获取动图的URL,并下载到本地
std::wstring filepath = filesavepath;
if (j.contains("image_type")) {
std::string imagetype = deleteHeadTail(j.at("image_type").dump());
filepath += L".";
filepath += stringToWstring(imagetype);
FILE_PATH += L".";
FILE_PATH += stringToWstring(imagetype);
}
if (j.contains("url")) {
if (j.at("url").contains("url_list")) {
std::string urlinfo_f = deleteHeadTail(j.at("url").at("url_list").at(0).dump());
ImageDownloader(urlinfo_f, WStringToString(filepath));
}
}
MEDIA_TYPE = L"02";
RH_MSG_TYP = L"02";
}
// aweType = 700 --> 普通文本,701是打招呼,703是全表情
else if (j.at("aweType") == 700 || j.at("aweType") == 701 || j.at("aweType") == 703) {
if (j.at("aweType").contains("text")) {
RH_TEXT_MSG += stringToWstring(j.at("text").dump());
MEDIA_TYPE = L"01";
RH_MSG_TYP = L"01";
}
}
// aweType = 0 --> 可以是视频、也可以是打招呼
else if (j.at("aweType") == 0) {
if (j.contains("resource_url") && j.contains("duration")) {
if (j.at("resource_url").contains("url_list")) {
std::string headimageurl = deleteHeadTail(j.at("resource_url").at("url_list").at(0).dump());
std::wstring headimagepath = filesavepath;
headimagepath += L"content_thumb";
ImageDownloader(headimageurl, WStringToString(headimagepath));
RH_TEXT_MSG += L"通话或视频聊天";
MEDIA_TYPE = L"04";
RH_MSG_TYP = L"04";
}
}
else if (j.contains("tips")) {
MEDIA_TYPE = L"01";
RH_MSG_TYP = L"01";
RH_TEXT_MSG += stringToWstring(j.at("tips").dump());
}
// 位置信息
bool addistrue = false;
if (j.contains("latitude")) {
LATITUDE = stringToWstring(j.at("latitude").dump());
addistrue = true;
}
if (j.contains("longitude")) {
LONGITUDE = stringToWstring(j.at("longitude").dump());
addistrue = true;
}
if (j.contains("poi_address")) {
COMPANY_ADDRESS = stringToWstring(j.at("poi_address").dump());
addistrue = true;
}
if (j.contains("poi_name")) {
CITY_CODE = stringToWstring(j.at("poi_name").dump());
addistrue = true;
}
if (addistrue == true) {
MEDIA_TYPE = L"99";
RH_MSG_TYP = L"05";
}
}
else if (j.at("aweType") == 101) {
MEDIA_TYPE = L"01";
RH_MSG_TYP = L"01";
RH_TEXT_MSG += L"系统消息:";
if (j.contains("tips")) {
RH_TEXT_MSG += stringToWstring(j.at("tips").dump());
}
}
}
// 打招呼信息,应该是系统自动发的
else if (j.contains("hello_text")) {
MEDIA_TYPE = L"01";
RH_MSG_TYP = L"01";
RH_TEXT_MSG += L"系统消息:";
RH_TEXT_MSG += stringToWstring(j.at("hello_text").dump());
}
// 通话
else if (j.contains("voip_content")) {
MEDIA_TYPE = L"99";
RH_MSG_TYP = L"06";
RH_TEXT_MSG = stringToWstring(j.at("voip_content").dump());
}
// 其他行为
else if (j.contains("forbidden_actions")) {
if (j.at("forbidden_actions") == 29) {
if (j.at("forbidden_actions").contains("desc")) {
MEDIA_TYPE = L"01";
RH_MSG_TYP = L"01";
RH_TEXT_MSG += stringToWstring(j.at("desc").dump());
}
}
}
if (!RH_TEXT_MSG.empty()) {
CONTENT = RH_TEXT_MSG;
}
else {
CONTENT = FILE_PATH;
}
// -----------------------
insertInfo.push_back(CONTENT); // 如果RH_TEXT_MSG有内容,则用RH_TEXT_MSG,否则就填路径;如果路径也没有,那就空着
insertInfo.push_back(RH_TEXT_MSG);
insertInfo.push_back(FILE_PATH);
insertInfo.push_back(MEDIA_TYPE);
insertInfo.push_back(CITY_CODE);
insertInfo.push_back(COMPANY_ADDRESS);
insertInfo.push_back(LONGITUDE);
insertInfo.push_back(LATITUDE);
insertInfo.push_back(DUAL_TIME);
insertInfo.push_back(RH_MSG_TYP);
return insertInfo;
}
int loadLib(void)
{
hsocketdll = ::LoadLibrary(L"rhsocket.dll");
socket_start_server = (T_socket_start_server)::GetProcAddress(hsocketdll, "socket_start_server");
socket_send_msg = (T_socket_send_msg)::GetProcAddress(hsocketdll, "socket_send_msg");
socket_send_pos = (T_socket_send_pos)::GetProcAddress(hsocketdll, "socket_send_pos");
socket_stop_server = (T_socket_stop_server)::GetProcAddress(hsocketdll, "socket_stop_server");
socket_send_reportflag = (T_socket_send_reportflag)::GetProcAddress(hsocketdll, "socket_send_reportflag");
return 0;
}
int freeLib(void)
{
::FreeLibrary(hsocketdll);
return 0;
}
void send_prompt_msg(HWND hWindow, char* str, int icolor, int type)
{
socket_send_msg(str, type);
}
C++
1
https://gitee.com/long-yucheng/rh_-douyin.git
git@gitee.com:long-yucheng/rh_-douyin.git
long-yucheng
rh_-douyin
RH_Douyin
master

搜索帮助