#ifndef AE625BF8_B0F9_452E_8772_8819F311CB57 #define AE625BF8_B0F9_452E_8772_8819F311CB57 #include struct GHStubException : public std::exception { GHStubException(const char *msg); }; void *gh_stub_impl_ptr(void *ptr); template T gh_stub_impl_cdecl(void *ptr_, Args... args) { #if RE_DBG_INJECTED using Callable = __cdecl T (*)(Args...); static Callable *fn = (Callable *)gh_stub_impl_ptr(ptr_); return fn(args...); #else throw GHStubException("Function not implemented"); #endif } template T gh_stub_impl_stdcall(void *ptr_, Args... args) { #if RE_DBG_INJECTED using Callable = __stdcall T (*)(Args...); static Callable *fn = (Callable *)gh_stub_impl_ptr(ptr_); return fn(args...); #else throw GHStubException("Function not implemented"); #endif } #endif /* AE625BF8_B0F9_452E_8772_8819F311CB57 */