From 34af6a19361e18fcb0397adc376a9b7480a9e06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=96=AF?= <2240031003@qq.com> Date: Sat, 17 Sep 2022 14:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E7=B1=BBsdk?= =?UTF-8?q?=E5=88=B6=E4=BD=9C=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller.cpp | 141 +----------------- src/controller.h | 1 - src/dispatch.cpp | 141 ++++++++++++++++++ src/dispatch.h | 2 + src/sdk/DBMgr.h | 2 +- src/sdk/MySQL.h | 350 +++++++++++++++++++++++++++++++++++++++++++- src/sdk/base.h | 69 +++++++++ src/sdk/sdk_class.h | 1 + 8 files changed, 564 insertions(+), 143 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index bc4ffdc..0028880 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -291,146 +291,7 @@ void Controller::hook_importCashShopItemList(const std::string* str) void Controller::hook_ProcessIPG_ResultOutput(CUser* user, int Goods_No, int item_id, int Cera_Type, InterfacePacketBuf* pbuf) { - LOG("hook_ProcessIPG_ResultOutput"); - LOG("%s %d %d %d %p", user->getCurCharacName().c_str(), Goods_No, item_id, Cera_Type, pbuf); - - if (Cera_Type == 0) //0是点券 1是代币 - { - if (Goods_No >= CGameDataManager::Get()->get_cera_award_begin_id() && Goods_No <= CGameDataManager::Get()->get_cera_award_end_id()) - { - int cur_purchase_count = 1; - AWARD_ITEM BonusItem; - - LOG("Size:%d", CGameDataManager::Get()->get_cera_award_item_map()->Size()); - if (CGameDataManager::Get()->get_cera_award_item_map()->Find(cur_purchase_count, &BonusItem)) - { - if (user->getCurCharacR()) - { - if (BonusItem.item_id == 1) - { - WongWork::CCeraShop::G_CCeraShop()->_processCoin(user, BonusItem.item_num, 0); - } - else - { - auto item = CDataManager::G_CDataManager()->find_item(BonusItem.item_id); - if (item) - { - //if (item->is_stackable() - // && ((*(int(**)(CItem*))(*(_DWORD*)item + 12))(item) == 16 // GetItemType - // || (*(int(**)(CItem*))(*(_DWORD*)item + 12))(item) == 34)) // GetItemType - { - int inserted = -1; - Inven_Item v60 = {}; - *(_DWORD*)((char*)&v60 + 2) = BonusItem.item_id; - *(_DWORD*)((char*)&v60 + 7) = BonusItem.item_num; - - (*(void(**)(CItem*, Inven_Item*))(*(_DWORD*)item + 8))(item, &v60); - - auto CurCharacInvenW = user->getCurCharacInvenW(); - - inserted = CurCharacInvenW->insertItemIntoInventory(v60, 15, 1, 0); - if (inserted == -1) - { - auto CurCharacNo = user->getCurCharacNo(); - - ((WongWork::CMailBoxHelper*)(user))->ReqDBSendNewMailCashShop(&v60, 0, CurCharacNo, 1, 0, 0); - - } - else - { - user->SendUpdateItemList(1, 0, inserted); - } - } - - } - } - } - - pbuf->put_int(BonusItem.item_id); - pbuf->put_int(BonusItem.item_num); - - std::vector code; - for (int i = 0; i < 0x30; i++) - { - code.push_back(0x90); - } - //0817964F 0817967F - CMem::WriteBytes((void*)0x0817964F, code.data(), code.size()); - return; - } - } - else if (Goods_No >= CGameDataManager::Get()->get_cera_award_package_begin_id() && Goods_No <= CGameDataManager::Get()->get_cera_award_package_end_id()) - { - int cur_purchase_count = 1; - AWARD_ITEM BonusItem; - LOG("Size:%d", CGameDataManager::Get()->get_cera_award_package_item_map()->Size()); - if (CGameDataManager::Get()->get_cera_award_package_item_map()->Find(cur_purchase_count, &BonusItem)) - { - if (user->getCurCharacR()) - { - if (BonusItem.item_id == 1) - { - WongWork::CCeraShop::G_CCeraShop()->_processCoin(user, BonusItem.item_num, 0); - } - else - { - auto item = CDataManager::G_CDataManager()->find_item(BonusItem.item_id); - if (item) - { - //if (item->is_stackable() - // && ((*(int(**)(CItem*))(*(_DWORD*)item + 12))(item) == 16 // GetItemType - // || (*(int(**)(CItem*))(*(_DWORD*)item + 12))(item) == 34)) // GetItemType - { - int inserted = -1; - Inven_Item v60 = {}; - *(_DWORD*)((char*)&v60 + 2) = BonusItem.item_id; - *(_DWORD*)((char*)&v60 + 7) = BonusItem.item_num; - - (*(void(**)(CItem*, Inven_Item*))(*(_DWORD*)item + 8))(item, &v60); - - auto CurCharacInvenW = user->getCurCharacInvenW(); - - inserted = CurCharacInvenW->insertItemIntoInventory(v60, 15, 1, 0); - if (inserted == -1) - { - auto CurCharacNo = user->getCurCharacNo(); - - ((WongWork::CMailBoxHelper*)(user))->ReqDBSendNewMailCashShop(&v60, 0, CurCharacNo, 1, 0, 0); - - } - else - { - user->SendUpdateItemList(1, 0, inserted); - } - } - - } - } - } - - pbuf->put_int(BonusItem.item_id); - pbuf->put_int(BonusItem.item_num); - - std::vector code; - for (int i = 0; i < 0x30; i++) - { - code.push_back(0x90); - } - //0817964F 0817967F - CMem::WriteBytes((void*)0x0817964F, code.data(), code.size()); - return; - } - } - } - - - - std::vector code = { - 0x8B, 0x85, 0x04, 0xFF, 0xFF, 0xFF, 0x89, 0x44, 0x24, 0x04, 0x8D, 0x85, 0x14, 0xFF, 0xFF, 0xFF, - 0x89, 0x04, 0x24, 0xE8, 0xD5, 0x22, 0xF5, 0xFF, 0x8B, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0x89, 0x44, - 0x24, 0x04, 0x8D, 0x85, 0x14, 0xFF, 0xFF, 0xFF, 0x89, 0x04, 0x24, 0xE8, 0xBD, 0x22, 0xF5, 0xFF - }; - CMem::WriteBytes((void*)0x0817964F, code.data(), code.size()); + CDispatch::Get()->ProcessIPG_ResultOutput(user, Goods_No, item_id, Cera_Type, pbuf); } int Controller::hook_Dispatcher_BuyCeraShopItem_dispatch_sig(void* a1, CUser* pUser, PacketBuf* pBuf) diff --git a/src/controller.h b/src/controller.h index 7939877..84b2f1c 100644 --- a/src/controller.h +++ b/src/controller.h @@ -1,6 +1,5 @@ #include "dispatch.h" #include "Assembler.h" -#include "GameDataManager.h" #define MAIN_OFFSET(offset) ((void *)((0x8048000) + (offset))) diff --git a/src/dispatch.cpp b/src/dispatch.cpp index 5c89d36..4255b58 100644 --- a/src/dispatch.cpp +++ b/src/dispatch.cpp @@ -556,6 +556,147 @@ ENUM_PACK_RET_TYPE CDispatch::DisPatcher_ReturnToSelectCharacter_dispatch_sig(vo return PAK_OK; } +ENUM_PACK_RET_TYPE CDispatch::ProcessIPG_ResultOutput(CUser* user, int Goods_No, int item_id, int Cera_Type, InterfacePacketBuf* pbuf) +{ + + if (Cera_Type == 0) //0是点券 1是代币 + { + if (Goods_No >= CGameDataManager::Get()->get_cera_award_begin_id() && Goods_No <= CGameDataManager::Get()->get_cera_award_end_id()) + { + int cur_purchase_count = 1; + AWARD_ITEM BonusItem; + + LOG("Size:%d", CGameDataManager::Get()->get_cera_award_item_map()->Size()); + if (CGameDataManager::Get()->get_cera_award_item_map()->Find(cur_purchase_count, &BonusItem)) + { + if (user->getCurCharacR()) + { + if (BonusItem.item_id == 1) + { + WongWork::CCeraShop::G_CCeraShop()->_processCoin(user, BonusItem.item_num, 0); + } + else + { + auto item = CDataManager::G_CDataManager()->find_item(BonusItem.item_id); + if (item) + { + //if (item->is_stackable() + // && ((*(int(**)(CItem*))(*(_DWORD*)item + 12))(item) == 16 // GetItemType + // || (*(int(**)(CItem*))(*(_DWORD*)item + 12))(item) == 34)) // GetItemType + { + int inserted = -1; + Inven_Item v60 = {}; + *(_DWORD*)((char*)&v60 + 2) = BonusItem.item_id; + *(_DWORD*)((char*)&v60 + 7) = BonusItem.item_num; + + (*(void(**)(CItem*, Inven_Item*))(*(_DWORD*)item + 8))(item, &v60); + + auto CurCharacInvenW = user->getCurCharacInvenW(); + + inserted = CurCharacInvenW->insertItemIntoInventory(v60, 15, 1, 0); + if (inserted == -1) + { + auto CurCharacNo = user->getCurCharacNo(); + + ((WongWork::CMailBoxHelper*)(user))->ReqDBSendNewMailCashShop(&v60, 0, CurCharacNo, 1, 0, 0); + + } + else + { + user->SendUpdateItemList(1, 0, inserted); + } + } + + } + } + } + + pbuf->put_int(BonusItem.item_id); + pbuf->put_int(BonusItem.item_num); + + std::vector code; + for (int i = 0; i < 0x30; i++) + { + code.push_back(0x90); + } + //0817964F 0817967F + CMem::WriteBytes((void*)0x0817964F, code.data(), code.size()); + return; + } + } + else if (Goods_No >= CGameDataManager::Get()->get_cera_award_package_begin_id() && Goods_No <= CGameDataManager::Get()->get_cera_award_package_end_id()) + { + int cur_purchase_count = 1; + AWARD_ITEM BonusItem; + LOG("Size:%d", CGameDataManager::Get()->get_cera_award_package_item_map()->Size()); + if (CGameDataManager::Get()->get_cera_award_package_item_map()->Find(cur_purchase_count, &BonusItem)) + { + if (user->getCurCharacR()) + { + if (BonusItem.item_id == 1) + { + WongWork::CCeraShop::G_CCeraShop()->_processCoin(user, BonusItem.item_num, 0); + } + else + { + auto item = CDataManager::G_CDataManager()->find_item(BonusItem.item_id); + if (item) + { + //if (item->is_stackable() + // && ((*(int(**)(CItem*))(*(_DWORD*)item + 12))(item) == 16 // GetItemType + // || (*(int(**)(CItem*))(*(_DWORD*)item + 12))(item) == 34)) // GetItemType + { + int inserted = -1; + Inven_Item v60 = {}; + *(_DWORD*)((char*)&v60 + 2) = BonusItem.item_id; + *(_DWORD*)((char*)&v60 + 7) = BonusItem.item_num; + + (*(void(**)(CItem*, Inven_Item*))(*(_DWORD*)item + 8))(item, &v60); + + auto CurCharacInvenW = user->getCurCharacInvenW(); + + inserted = CurCharacInvenW->insertItemIntoInventory(v60, 15, 1, 0); + if (inserted == -1) + { + auto CurCharacNo = user->getCurCharacNo(); + + ((WongWork::CMailBoxHelper*)(user))->ReqDBSendNewMailCashShop(&v60, 0, CurCharacNo, 1, 0, 0); + + } + else + { + user->SendUpdateItemList(1, 0, inserted); + } + } + + } + } + } + + pbuf->put_int(BonusItem.item_id); + pbuf->put_int(BonusItem.item_num); + + std::vector code; + for (int i = 0; i < 0x30; i++) + { + code.push_back(0x90); + } + //0817964F 0817967F + CMem::WriteBytes((void*)0x0817964F, code.data(), code.size()); + return; + } + } + } + + std::vector code = { + 0x8B, 0x85, 0x04, 0xFF, 0xFF, 0xFF, 0x89, 0x44, 0x24, 0x04, 0x8D, 0x85, 0x14, 0xFF, 0xFF, 0xFF, + 0x89, 0x04, 0x24, 0xE8, 0xD5, 0x22, 0xF5, 0xFF, 0x8B, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0x89, 0x44, + 0x24, 0x04, 0x8D, 0x85, 0x14, 0xFF, 0xFF, 0xFF, 0x89, 0x04, 0x24, 0xE8, 0xBD, 0x22, 0xF5, 0xFF + }; + CMem::WriteBytes((void*)0x0817964F, code.data(), code.size()); + return PAK_OK; +} + void CDispatch::SendMsg(CUser* user, int pack_id, int status, const std::string& str) { char out_str[0xff] = {}; diff --git a/src/dispatch.h b/src/dispatch.h index 8f52e47..4324a13 100644 --- a/src/dispatch.h +++ b/src/dispatch.h @@ -6,6 +6,7 @@ #include "Singleton.h" #include "./sdk/sdk_class.h" #include "utils.h" +#include "GameDataManager.h" enum NOTI_PACKETMESSAGE_TYPE : int { @@ -38,6 +39,7 @@ public: ENUM_PACK_RET_TYPE DisPatcher_ReturnToSelectCharacter_dispatch_sig(void* a1, CUser* user, char* a3); + ENUM_PACK_RET_TYPE ProcessIPG_ResultOutput(CUser* user, int Goods_No, int item_id, int Cera_Type, InterfacePacketBuf* pbuf); void SendMsg(CUser* user, int pack_id, int status, const std::string& str); diff --git a/src/sdk/DBMgr.h b/src/sdk/DBMgr.h index aac359e..9901eee 100644 --- a/src/sdk/DBMgr.h +++ b/src/sdk/DBMgr.h @@ -12,7 +12,7 @@ public: static DBMgr* G_CDBMgr() { - return *(DBMgr**)base::GlobalData::s_db_mgr; + return (DBMgr*)base::GlobalData::s_db_mgr; } int setUserIdx(int a2) diff --git a/src/sdk/MySQL.h b/src/sdk/MySQL.h index 158924a..b5a326a 100644 --- a/src/sdk/MySQL.h +++ b/src/sdk/MySQL.h @@ -4,10 +4,358 @@ #define __MYSQL_H__ +class CQueryCounter +{ +public: + unsigned char UnknownData_NULL[0x3C]; +public: + int CQueryCounter_make() + { + return CallT(base::CQueryCounter::CQueryCounter_make, this); + } + + int GetQueryCountTable() + { + return CallT(base::CQueryCounter::GetQueryCountTable, this); + } + + int IncreaseQueryCount(std::string const& a2) + { + return CallT(base::CQueryCounter::IncreaseQueryCount, this, a2); + } + + int LoadQueryTable() + { + return CallT(base::CQueryCounter::LoadQueryTable, this); + } + + int RegisterQuery(char const* a2, int a3, int a4) + { + return CallT(base::CQueryCounter::RegisterQuery, this, a2, a3, a4); + } + + int Reset() + { + return CallT(base::CQueryCounter::Reset, this); + } + + int SaveQuery(char const* a2, int& a3) + { + return CallT(base::CQueryCounter::SaveQuery, this, a2, a3); + } + + int SetResponseTime(double a2) + { + return CallT(base::CQueryCounter::SetResponseTime, this, a2); + } + + int UpdateQueryCounter() + { + return CallT(base::CQueryCounter::UpdateQueryCounter, this); + } + + int setLogDB(bool a2) + { + return CallT(base::CQueryCounter::setLogDB, this, a2); + } + + int CQueryCounter_destroy() + { + return CallT(base::CQueryCounter::CQueryCounter_destroy, this); + } + + +}; + class MySQL { public: - + unsigned char UnknownData_NULL[0x4208C]; +public: + + int GetQueryCounter() + { + return CallT(base::MySQL::GetQueryCounter, this); + } + + int GetQueryString() + { + return CallT(base::MySQL::GetQueryString, this); + } + + MySQL() + { + CallT(base::MySQL::MySQL_make, this); + } + + int SetQueryCounter(CQueryCounter* a2) + { + return CallT(base::MySQL::SetQueryCounter, this, a2); + } + + int blob_to_str(int a2, void* a3, int a4) + { + return CallT(base::MySQL::blob_to_str, this, a2, a3, a4); + } + + int clear_result_set() + { + return CallT(base::MySQL::clear_result_set, this); + } + + int close() + { + return CallT(base::MySQL::close, this); + } + + int escape_string(char* a2, char const* a3) + { + return CallT(base::MySQL::escape_string, this, a2, a3); + } + + int exec(bool a2) + { + return CallT(base::MySQL::exec, this, a2); + } + + int exec_query() + { + return CallT(base::MySQL::exec_query, this); + } + + int fetch() + { + return CallT(base::MySQL::fetch, this); + } + + int getAffectedRowCount() + { + return CallT(base::MySQL::getAffectedRowCount, this); + } + + int getClientVersion() + { + return CallT(base::MySQL::getClientVersion, this); + } + + int getDBError() + { + return CallT(base::MySQL::getDBError, this); + } + + int getServerVersion() + { + return CallT(base::MySQL::getServerVersion, this); + } + + int get_binary(int a2, void* a3, int a4) + { + return CallT(base::MySQL::get_binary, this, a2, a3, a4); + } + + int get_binary_length(int a2) + { + return CallT(base::MySQL::get_binary_length, this, a2); + } + + int get_byte(int a2, char& a3) + { + return CallT(base::MySQL::get_byte, this, a2, a3); + } + + int get_byte2(int a2, int& a3) + { + return CallT(base::MySQL::get_byte2, this, a2, a3); + } + + int get_char(int a2, char& a3) + { + return CallT(base::MySQL::get_char, this, a2, a3); + } + + int get_float(int a2, float& a3) + { + return CallT(base::MySQL::get_float, this, a2, a3); + } + + int get_int(int a2, int& a3) + { + return CallT(base::MySQL::get_int, this, a2, a3); + } + + int get_int2(int a2, uint& a3) + { + return CallT(base::MySQL::get_int2, this, a2, a3); + } + + int get_longlong(int a2, long long& a3) + { + return CallT(base::MySQL::get_longlong, this, a2, a3); + } + + int get_n_rows() + { + return CallT(base::MySQL::get_n_rows, this); + } + + int get_short(int a2, int& a3) + { + return CallT(base::MySQL::get_short, this, a2, a3); + } + + int get_short2(int a2, short& a3) + { + return CallT(base::MySQL::get_short2, this, a2, a3); + } + + int get_str(int a2, char* a3, int a4) + { + return CallT(base::MySQL::get_str, this, a2, a3, a4); + } + + int get_ubyte(int a2, uchar& a3) + { + return CallT(base::MySQL::get_ubyte, this, a2, a3); + } + + int get_uint(int a2, uint& a3) + { + return CallT(base::MySQL::get_uint, this, a2, a3); + } + + int get_ulong(int a2, ulong& a3) + { + return CallT(base::MySQL::get_ulong, this, a2, a3); + } + + int get_ulonglong(int a2, unsigned long long& a3) + { + return CallT(base::MySQL::get_ulonglong, this, a2, a3); + } + + int get_ushort(int a2, ushort& a3) + { + return CallT(base::MySQL::get_ushort, this, a2, a3); + } + + int init() + { + return CallT(base::MySQL::init, this); + } + + int init_db_handle() + { + return CallT(base::MySQL::init_db_handle, this); + } + + int insert(char const* a2, ...) + { + int nSize = 0; + char buff[1024]; + memset(buff, 0, sizeof(buff)); + va_list args; + va_start(args, a2); + nSize = vsnprintf(buff, sizeof(buff), a2, args); + va_end(args); + return CallT(base::MySQL::insert, this, buff); + } + + int is_valid_col(int a2) + { + return CallT(base::MySQL::is_valid_col, this, a2); + } + + int is_valid_data(int a2) + { + return CallT(base::MySQL::is_valid_data, this, a2); + } + + int open(char* a2, char* a3, char* a4, char* a5) + { + return CallT(base::MySQL::open, this, a2, a3, a4, a5); + } + + int open(char* a2, uint a3, char* a4, char* a5, char* a6) + { + return CallT(base::MySQL::open, this, a2, a3, a4, a5, a6); + } + + int ping() + { + return CallT(base::MySQL::ping, this); + } + + int select(char const* a2, ...) + { + int nSize = 0; + char buff[1024]; + memset(buff, 0, sizeof(buff)); + va_list args; + va_start(args, a2); + nSize = vsnprintf(buff, sizeof(buff), a2, args); + va_end(args); + return CallT(base::MySQL::select, this, buff); + } + + int select2() + { + return CallT(base::MySQL::select2, this); + } + + int set_charset_name_option() + { + return CallT(base::MySQL::set_charset_name_option, this); + } + + int set_compress_option() + { + return CallT(base::MySQL::set_compress_option, this); + } + + int set_query(char const* a2, ...) + { + int nSize = 0; + char buff[1024]; + memset(buff, 0, sizeof(buff)); + va_list args; + va_start(args, a2); + nSize = vsnprintf(buff, sizeof(buff), a2, args); + va_end(args); + return CallT(base::MySQL::set_query, this, buff); + } + + int set_query2() + { + return CallT(base::MySQL::set_query2, this); + } + + int set_read_default_grp_option() + { + return CallT(base::MySQL::set_read_default_grp_option, this); + } + + int set_reconnect_option() + { + return CallT(base::MySQL::set_reconnect_option, this); + } + + int update(char const* a2, ...) + { + int nSize = 0; + char buff[1024]; + memset(buff, 0, sizeof(buff)); + va_list args; + va_start(args, a2); + nSize = vsnprintf(buff, sizeof(buff), a2, args); + va_end(args); + return CallT(base::MySQL::update, this, buff); + } + + ~MySQL() + { + CallT(base::MySQL::MySQL_destroy, this); + } + }; diff --git a/src/sdk/base.h b/src/sdk/base.h index 0a84b38..215837c 100644 --- a/src/sdk/base.h +++ b/src/sdk/base.h @@ -6,6 +6,8 @@ namespace base const int ScanInt = 0x088BC37B; const int ScanStr = 0x088BC7A2; + const int Init = 0x082A08F4; + const int importCashShopItemList = 0x088FDCB5; const int importCashShopItemList_hook_begin = 0x088FDD59; @@ -392,8 +394,75 @@ namespace base } + namespace CQueryCounter + { + const int CQueryCounter_make = 0x085ECAEC; + const int GetQueryCountTable = 0x0844D652; + const int IncreaseQueryCount = 0x085ECC5E; + const int LoadQueryTable = 0x085ED18A; + const int RegisterQuery = 0x085ED5AE; + const int Reset = 0x085ECBD6; + const int SaveQuery = 0x085ED3A2; + const int SetResponseTime = 0x085ED108; + const int UpdateQueryCounter = 0x085ECEE6; + const int setLogDB = 0x0844D63A; + const int CQueryCounter_destroy = 0x085ECB8A; + + } + namespace MySQL { + const int GetQueryCounter = 0x082A4202; + const int GetQueryString = 0x0844D65E; + const int MySQL_make = 0x083F3AC8; + const int SetQueryCounter = 0x083F531C; + const int blob_to_str = 0x083F452A; + const int clear_result_set = 0x083F5630; + const int close = 0x083F3E74; + const int escape_string = 0x083F48AA; + const int exec = 0x083F4326; + const int exec_query = 0x083F5348; + const int fetch = 0x083F44BC; + const int getAffectedRowCount = 0x083F4310; + const int getClientVersion = 0x083F4622; + const int getDBError = 0x0811B97A; + const int getServerVersion = 0x083F460C; + const int get_binary = 0x0812531A; + const int get_binary_length = 0x081253DE; + const int get_byte = 0x080FDE54; + const int get_byte2 = 0x0844D73A; + const int get_char = 0x0815E6A6; + const int get_float = 0x0844D6D0; + const int get_int = 0x0811692C; + const int get_int2 = 0x080E22AE; + const int get_longlong = 0x085F4214; + const int get_n_rows = 0x080E236C; + const int get_short = 0x0814201C; + const int get_short2 = 0x080FDDEC; + const int get_str = 0x080ECDEA; + const int get_ubyte = 0x080FDEBA; + const int get_uint = 0x080E22F2; + const int get_ulong = 0x0844D66A; + const int get_ulonglong = 0x081754C8; + const int get_ushort = 0x08116990; + const int init = 0x083F3CE4; + const int init_db_handle = 0x083F3C16; + const int insert = 0x083F46AE; + const int is_valid_col = 0x080E22D0; + const int is_valid_data = 0x085F41B2; + const int open = 0x083F3E9E; + const int open = 0x083F4024; + const int ping = 0x083F4514; + const int select = 0x083F4678; + const int select2 = 0x083F4630; + const int set_charset_name_option = 0x083F3C02; + const int set_compress_option = 0x083F3AFE; + const int set_query = 0x083F41C0; + const int set_query2 = 0x083F4782; + const int set_read_default_grp_option = 0x083F3B80; + const int set_reconnect_option = 0x083F3C0C; + const int update = 0x083F4718; + const int MySQL_destroy = 0x083F3AEA; } diff --git a/src/sdk/sdk_class.h b/src/sdk/sdk_class.h index a1caae3..71fa49e 100644 --- a/src/sdk/sdk_class.h +++ b/src/sdk/sdk_class.h @@ -4,6 +4,7 @@ #include "enum.h" #include "ida_sdk.h" #include +#include template R CallT(A call_addr, const ARG ... arguments)