WIP
This commit is contained in:
@@ -10,22 +10,22 @@ struct GHStubException : public std::exception {
|
||||
void *gh_stub_impl_ptr(void *ptr);
|
||||
|
||||
template <typename T, typename... Args>
|
||||
T gh_stub_impl_cdecl(void *ptr, Args... args) {
|
||||
T gh_stub_impl_cdecl(void *ptr_, Args... args) {
|
||||
#if RE_DBG_INJECTED
|
||||
using Callable = __cdecl T (*)(Args...);
|
||||
static Callable *ptr = (Callable *)gh_stub_impl_ptr(ptr);
|
||||
return ptr(args...);
|
||||
static Callable *fn = (Callable *)gh_stub_impl_ptr(ptr_);
|
||||
return fn(args...);
|
||||
#else
|
||||
throw GHStubException("Function not implemented");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T, typename... Args>
|
||||
T gh_stub_impl_stdcall(void *ptr, Args... args) {
|
||||
T gh_stub_impl_stdcall(void *ptr_, Args... args) {
|
||||
#if RE_DBG_INJECTED
|
||||
using Callable = __stdcall T (*)(Args...);
|
||||
static Callable *ptr = (Callable *)gh_stub_impl_ptr(ptr);
|
||||
return ptr(args...);
|
||||
static Callable *fn = (Callable *)gh_stub_impl_ptr(ptr_);
|
||||
return fn(args...);
|
||||
#else
|
||||
throw GHStubException("Function not implemented");
|
||||
#endif
|
||||
|
||||
@@ -1924,4 +1924,6 @@ _strflt
|
||||
_tiddata
|
||||
_BIN_TYPES_
|
||||
tagBIND_FLAGS_
|
||||
ImageBaseOffset32
|
||||
ImageBaseOffset32
|
||||
wchar_t
|
||||
WCHAR
|
||||
@@ -82,4 +82,5 @@ winspool.h
|
||||
winsvc.h
|
||||
winuser.h
|
||||
winver.h
|
||||
wtypes.h
|
||||
wtypes.h
|
||||
dinput.h
|
||||
Reference in New Issue
Block a user