На самом деле я Zodiak
-
Автор темы
- #1
C++:
void setup_hook( LPVOID fake, LPVOID orig, uintptr_t address, const char* module = "WTL-Win64-Shipping.exe" )
{
auto hook_address = (uintptr_t) ( (uintptr_t) GetModuleHandleA( module ) + address );
if ( MH_CreateHook( reinterpret_cast<LPVOID>( hook_address ), fake, (void**) ( &orig ) ) != MH_STATUS::MH_OK ) { M( "Hook setup failed" ); return; }
if ( MH_EnableHook( reinterpret_cast<LPVOID>( hook_address ) ) != MH_STATUS::MH_OK ) { M( "Hook enable failed" ); return; }
}