diff --git a/sourcehook/generate/sourcehook.hxx b/sourcehook/generate/sourcehook.hxx index 38ab94c..b293807 100755 --- a/sourcehook/generate/sourcehook.hxx +++ b/sourcehook/generate/sourcehook.hxx @@ -280,7 +280,8 @@ namespace SourceHook * @param ifacetype The type of the interface * @param ifaceptr The interface pointer */ -#define SH_GET_CALLCLASS(ifacetype, ifaceptr) g_SHPtr->GetCallClass(iface, sizeof(ifacetype)) +#define SH_GET_CALLCLASS(ifacetype, ifaceptr) reinterpret_cast(g_SHPtr->GetCallClass(ifaceptr, sizeof(ifacetype))) +#define SH_RELEASE_CALLCLASS(ptr) g_SHPtr->ReleaseCallClass(reinterpret_cast(ptr)) #define SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ SourceHook::SH_FHAdd##ifacetype##ifacefunc((void*)ifaceptr, post, handler) diff --git a/sourcehook/sourcehook.h b/sourcehook/sourcehook.h index 993775b..bc19204 100644 --- a/sourcehook/sourcehook.h +++ b/sourcehook/sourcehook.h @@ -280,7 +280,8 @@ namespace SourceHook * @param ifacetype The type of the interface * @param ifaceptr The interface pointer */ -#define SH_GET_CALLCLASS(ifacetype, ifaceptr) g_SHPtr->GetCallClass(iface, sizeof(ifacetype)) +#define SH_GET_CALLCLASS(ifacetype, ifaceptr) reinterpret_cast(g_SHPtr->GetCallClass(ifaceptr, sizeof(ifacetype))) +#define SH_RELEASE_CALLCLASS(ptr) g_SHPtr->ReleaseCallClass(reinterpret_cast(ptr)) #define SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ SourceHook::SH_FHAdd##ifacetype##ifacefunc((void*)ifaceptr, post, handler)