mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-27 13:44:11 +08:00
16 lines
493 B
C++
16 lines
493 B
C++
|
#include"SRPGStudio.h"
|
||
|
|
||
|
bool SRPGStudio::attach_function() {
|
||
|
//NAGINATA SOFT
|
||
|
//HERO'S PARTY R
|
||
|
//https://store.steampowered.com/app/1804020/HEROS_PARTY_R/
|
||
|
auto dll=GetModuleHandleW(L"OLEAUT32.dll");
|
||
|
if(dll==0)return 0;
|
||
|
auto addr=GetProcAddress(dll,"SysAllocString");
|
||
|
if(addr==0)return 0;
|
||
|
HookParam hp;
|
||
|
hp.address = (DWORD)addr;
|
||
|
hp.offset=get_stack(1);
|
||
|
hp.type = USING_STRING|CODEC_UTF16|EMBED_ABLE|EMBED_BEFORE_SIMPLE|EMBED_AFTER_NEW;
|
||
|
return NewHook(hp, "SRPGStudio");
|
||
|
}
|