觅风论坛
标题:
求C++大佬把代码翻成易语言版本
[打印本页]
作者:
可可可乐
时间:
2020-2-19 10:08
标题:
求C++大佬把代码翻成易语言版本
#define ZXString char*
bool Hook_StringPool__GetString(bool enable)
{
//Log(__FUNCTION__ " %i\r\n", enable);
typedef ZXString*(__fastcall* StringPool__GetString_t)(void* ecx, void* edx, ZXString* result, unsigned int nIdx, char formal);
static auto StringPool__GetString =
reinterpret_cast<StringPool__GetString_t>(0x00746750);
StringPool__GetString_t Hook = [](void* ecx, void* edx, ZXString* result, unsigned int nIdx, char formal) -> ZXString*
{
auto ret = StringPool__GetString(ecx, edx, result, nIdx, formal);
if (nIdx == 2722)
{
strcpy(*ret, "ABC");
}
//Log("StringPool__GetString: %s\r\n", *result);
return ret;
};
return SetHook(enable, reinterpret_cast<void**>(&StringPool__GetString), Hook);
}
欢迎光临 觅风论坛 (https://www.eyyba.com/)
Powered by Discuz! X3.4