From effccd3522a774f4e5942d81555493cda2b12737 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Sun, 7 Oct 2007 22:35:57 +0000 Subject: [PATCH] Something :o --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40468 --- sourcehook/sourcehook.h | 2960 +++++++++++++++++++++------------------ 1 file changed, 1608 insertions(+), 1352 deletions(-) diff --git a/sourcehook/sourcehook.h b/sourcehook/sourcehook.h index 3645071..5bea1fc 100644 --- a/sourcehook/sourcehook.h +++ b/sourcehook/sourcehook.h @@ -6,7 +6,7 @@ * * Author(s): Pavol "PM OnoTo" Marko * ============================ -*/ +*/ /** * @file sourcehook.h @@ -21,18 +21,18 @@ // 2 - Changed to virtual functions for iterators and all queries // 3 - Added "hook loop status variable" // 4 - Reentrant -// 5 - New "V2" interface -#define SH_IFACE_VERSION 5 +#define SH_IFACE_VERSION 4 // Impl versions: // ??? // 4 - addition of hook ids and vp hooks (with them, AddHookNew and RemoveHookNew) // This is not a SH_IFACE_VERSION change so that old plugins continue working! -// 5 - implementation of the new "V2" interface +// 5 - addition of direct vp hooks (new hook mode; from now on AddHookNew checks for +// invalid hookmode -> impl version won't have to change because of things like this) #define SH_IMPL_VERSION 5 // Hookman version: -// 1 - standard +// 1 - Support for recalls, performance optimisations #define SH_HOOKMAN_VERSION 1 // The value of SH_GLOB_SHPTR has to be a pointer to SourceHook::ISourceHook @@ -99,8 +99,8 @@ #define SH_PTRSIZE sizeof(void*) -#include "sh_memfuncinfo.h" #include "FastDelegate.h" +#include "sh_memfuncinfo.h" // Good old metamod! @@ -147,57 +147,25 @@ namespace SourceHook */ typedef int Plugin; - - template class CallClass : public T - { - }; - typedef void ManualCallClass; - - /** - * @brief Describes the way a parameter/retval is passed. - */ - struct PassInfo - { - enum PassType - { - PassType_Unknown=0, /**< Unknown -- no extra info available */ - PassType_Basic, /**< Plain old register data (pointers, integers) */ - PassType_Float, /**< Floating point data */ - PassType_Object, /**< Object or structure */ - }; - - enum PassFlags - { - PassFlag_ByVal = (1<<0), /**< Passing by value */ - PassFlag_ByRef = (1<<1), /**< Passing by reference */ - PassFlag_ODtor = (1<<2), /**< Object has a destructor */ - PassFlag_OCtor = (1<<3), /**< Object has a constructor */ - PassFlag_AssignOp = (1<<4) /**< Object has an assignment operator */ - }; - - size_t size; //!< Size of the data being passed - - // Extra info: - // (might be used in future versions for automatic hookfunc generation) - int type; //!< PassType value - unsigned int flags; //!< Pass/return flags - }; - struct ProtoInfo { - enum CallConvention + ProtoInfo(int rtsz, int nop, const int *p) : beginningNull(0), retTypeSize(rtsz), numOfParams(nop), params(p) { - CallConv_Unknown, /**< Unknown -- no extra info available */ - CallConv_ThisCall, /**< This call (object pointer required) */ - CallConv_Cdecl, /**< Standard C call */ - }; + } + int beginningNull; //!< To distinguish from old protos (which never begin with 0) + int retTypeSize; //!< 0 if void + int numOfParams; //!< number of parameters + const int *params; //!< params[0]=0 (or -1 for vararg), params[1]=size of first param, ... + }; - int numOfParams; //!< number of parameters - PassInfo retPassInfo; //!< PassInfo for the return value. size=0 -> no retval - const PassInfo *paramsPassInfo; //!< PassInfos for the parameters - - // Extra info: - int convention; + /** + * @brief Specifies the actions for hook managers + */ + enum HookManagerAction + { + HA_GetInfo = 0, //!< Store info about the hook manager + HA_Register, //!< Save the IHookManagerInfo pointer for future reference + HA_Unregister //!< Clear the saved pointer }; struct IHookManagerInfo; @@ -205,26 +173,139 @@ namespace SourceHook /** * @brief Pointer to hook manager interface function * - * The hook manager should store hi for later use if store==true. It should then call hi->SetInfo(...) if hi - * is non-null. The hook manager can return 0 for success or a non-zero value if it doesn't want to be used. + * A "hook manager" is a the only thing that knows the actual protoype of the function at compile time. * + * @param ha What the hook manager should do * @param hi A pointer to IHookManagerInfo */ - typedef int (*HookManagerPubFunc)(bool store, IHookManagerInfo *hi); + typedef int (*HookManagerPubFunc)(HookManagerAction ha, IHookManagerInfo *hi); class ISHDelegate { public: - virtual bool IsEqual(ISHDelegate *pOtherDeleg) = 0; // pOtherDeleg is from the same plugin and hookman - virtual void DeleteThis() = 0; + virtual void DeleteThis() = 0; // Ugly, I know + virtual bool IsEqual(ISHDelegate *other) = 0; + }; + + template class CSHDelegate : public ISHDelegate + { + T m_Deleg; + public: + CSHDelegate(T deleg) : m_Deleg(deleg) + { + } + + CSHDelegate(const CSHDelegate &other) : m_Deleg(other.m_Deleg) + { + } + + void DeleteThis() + { + delete this; + } + + bool IsEqual(ISHDelegate *other) + { + return static_cast* >(other)->GetDeleg() == GetDeleg(); + } + + T &GetDeleg() + { + return m_Deleg; + } + }; + + struct IHookList + { + struct IIter + { + virtual bool End() = 0; + virtual void Next() = 0; + virtual ISHDelegate *Handler() = 0; + virtual int ThisPtrOffs() = 0; + }; + virtual IIter *GetIter() = 0; + virtual void ReleaseIter(IIter *pIter) = 0; + }; + + struct IIface + { + virtual void *GetPtr() = 0; + virtual IHookList *GetPreHooks() = 0; + virtual IHookList *GetPostHooks() = 0; + }; + + struct IVfnPtr + { + virtual void *GetVfnPtr() = 0; + virtual void *GetOrigEntry() = 0; + + virtual IIface *FindIface(void *ptr) = 0; }; struct IHookManagerInfo { - virtual void SetInfo(int hookman_version, int vtbloffs, int vtblidx, - ProtoInfo *proto, void *hookfunc_vfnptr) = 0; + virtual IVfnPtr *FindVfnPtr(void *vfnptr) = 0; + + virtual void SetInfo(int vtbloffs, int vtblidx, const char *proto) = 0; + virtual void SetHookfuncVfnptr(void *hookfunc_vfnptr) = 0; + + // Added 23.12.2005 (yup! I'm coding RIGHT BEFORE CHRISTMAS!) + // If the hookman doesn't set this, it defaults 0 + // SourceHook prefers hookmans with higher version numbers + virtual void SetVersion(int version) = 0; }; + class AutoHookIter + { + IHookList *m_pList; + IHookList::IIter *m_pIter; + public: + AutoHookIter(IHookList *pList) + : m_pList(pList), m_pIter(pList->GetIter()) + { + } + + ~AutoHookIter() + { + if (m_pList) + m_pList->ReleaseIter(m_pIter); + } + + bool End() + { + return m_pIter->End(); + } + + void Next() + { + m_pIter->Next(); + } + + ISHDelegate *Handler() + { + return m_pIter->Handler(); + } + + int ThisPtrOffs() + { + return m_pIter->ThisPtrOffs(); + } + + void SetToZero() + { + m_pList = 0; + } + }; + + template struct DeprecatedCallClass + { + virtual B *GetThisPtr() = 0; + virtual void *GetOrigFunc(int vtbloffs, int vtblidx) = 0; + }; + + // 09.08.2008 (6 AM, I just woke up, the others are still sleeping so i finally can use this notebook !!) + // - Today is an important day. // I'm adding support for functions which return references. // How it works: @@ -266,14 +347,6 @@ namespace SourceHook }; }; - struct IHookContext - { - virtual ISHDelegate *GetNext() = 0; - virtual void *GetOverrideRetPtr() = 0; - virtual const void *GetOrigRetPtr() = 0; - virtual bool ShouldCallOrig() = 0; - }; - /** * @brief The main SourceHook interface */ @@ -290,6 +363,126 @@ namespace SourceHook */ virtual int GetImplVersion() = 0; + /** + * @brief Add a hook. + * + * @return True if the function succeeded, false otherwise + * + * @param plug The unique identifier of the plugin that calls this function + * @param iface The interface pointer + * @param ifacesize The size of the class iface points to + * @param myHookMan A hook manager function that should be capable of handling the function + * @param handler A pointer to a FastDelegate containing the hook handler + * @param post Set to true if you want a post handler + */ + virtual bool AddHook(Plugin plug, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, + ISHDelegate *handler, bool post) = 0; + + /** + * @brief Removes a hook. + * + * @return True if the function succeeded, false otherwise + * + * @param plug The unique identifier of the plugin that calls this function + * @param iface The interface pointer + * @param myHookMan A hook manager function that should be capable of handling the function + * @param handler A pointer to a FastDelegate containing the hook handler + * @param post Set to true if you want a post handler + */ + virtual bool RemoveHook(Plugin plug, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, + ISHDelegate *handler, bool post) = 0; + + /** + * @brief Checks whether a plugin has (a) hook manager(s) that is/are currently used by other plugins + * + * @param plug The unique identifier of the plugin in question + */ + virtual bool IsPluginInUse(Plugin plug) = 0; + + /** + * @brief Return a pointer to a callclass. Generate a new one if required. + * + * @param iface The interface pointer + * @param size Size of the class instance + */ + virtual DeprecatedCallClass *GetCallClass(void *iface, size_t size) = 0; + + /** + * @brief Release a callclass + * + * @param ptr Pointer to the callclass + */ + virtual void ReleaseCallClass(DeprecatedCallClass *ptr) = 0; + + virtual void SetRes(META_RES res) = 0; //!< Sets the meta result + virtual META_RES GetPrevRes() = 0; //!< Gets the meta result of the + //!< previously calledhandler + virtual META_RES GetStatus() = 0; //!< Gets the highest meta result + virtual const void *GetOrigRet() = 0; //!< Gets the original result. + //!< If not in post function, undefined + virtual const void *GetOverrideRet() = 0; //!< Gets the override result. + //!< If none is specified, NULL + virtual void *GetIfacePtr() = 0; //!< Gets the interface pointer + ////////////////////////////////////////////////////////////////////////// + // For hook managers + virtual void HookLoopBegin(IIface *pIface) = 0; //!< Should be called when a hook loop begins + virtual void HookLoopEnd() = 0; //!< Should be called when a hook loop exits + virtual void SetCurResPtr(META_RES *mres) = 0; //!< Sets pointer to the current meta result + virtual void SetPrevResPtr(META_RES *mres) = 0; //!< Sets pointer to previous meta result + virtual void SetStatusPtr(META_RES *mres) = 0; //!< Sets pointer to the status variable + virtual void SetIfacePtrPtr(void **pp) = 0; //!< Sets pointer to the interface this pointer + virtual void SetOrigRetPtr(const void *ptr) = 0; //!< Sets the original return pointer + virtual void SetOverrideRetPtr(void *ptr) = 0; //!< Sets the override result pointer + virtual bool ShouldContinue() = 0; //!< Returns false if the hook loop should exit + + /** + * @brief Remove a hook manager. Auto-removes all hooks attached to it from plugin plug. + * + * @param plug The owner of the hook manager + * @param pubFunc The hook manager's info function + */ + virtual void RemoveHookManager(Plugin plug, HookManagerPubFunc pubFunc) = 0; + + virtual void DoRecall() = 0; //!< Initiates a recall sequence + /* + HOW RECALLS WORK: + + The problem: + Users want the ability to change parameters of the called function + from inside their handler. + The solution: + 1) Mark as "recall" + 2) Recall the function + 3) => SH's hook func gets called: + 4) The first iterator points at the first hook the last hookfunc didn't execute yet + 5) does all iteration and returns normally + 6) The user's handler returns immediately + 7) The hook func returns immediately as well + + Also note that the recalled hookfunc starts with the status the recalling hookfunc + ended with. The last handler (doing the recall) is also able to specify its own + META_RES. + */ + + virtual void *GetOverrideRetPtr() = 0; //!< Returns the pointer set by SetOverrideRetPtr + + /** + * @brief Set up the hook loop. Equivalent to calling: + * SetStatusPtr, SetPrevResPtr, SetCurResPtr, SetIfacePtrPtr, SetOrigRetPtr, Get/SetOverrideRetPtr + * + * @param statusPtr pointer to status variable + * @param prevResPtr pointer to previous result variable + * @param curResPtr pointer to current result variable + * @param ifacePtrPtr pointer to interface this pointer variable + * @param origRetPr pointer to original return value variable. NULL for void funcs + * @param overrideRetPtr pointer to override return value variable. NULL for void funcs + * + * @return Override Return Pointer the hookfunc should use (may differ from overrideRetPtr + * when the hook func is being called as part of a recall + */ + virtual void *SetupHookLoop(META_RES *statusPtr, META_RES *prevResPtr, META_RES *curResPtr, + void **ifacePtrPtr, const void *origRetPtr, void *overrideRetPtr) = 0; + /** * @brief Modes for the new AddHook */ @@ -310,70 +503,21 @@ namespace SourceHook * @param iface The interface pointer * @param ifacesize The size of the class iface points to * @param myHookMan A hook manager function that should be capable of handling the function - * @param handler A pointer to the hook handler something + * @param handler A pointer to a FastDelegate containing the hook handler * @param post Set to true if you want a post handler */ - virtual int AddHook(Plugin plug, AddHookMode mode, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post) = 0; - - // Source backwarts compat (only for normal hooks) - virtual bool RemoveHook(Plugin plug, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, + virtual int AddHookNew(Plugin plug, AddHookMode mode, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, ISHDelegate *handler, bool post) = 0; /** - * @brief Remove a hook by ID. + * @brief Remove a VP hook by ID. * * @return true on success, false otherwise * - * @param hookid The hook id (returned by AddHook) + * @param plug The unique identifier of the plugin that calls this function + * @param hookid The hook id (returned by AddHookNew) */ - virtual bool RemoveHookByID(int hookid) = 0; - - /** - * @brief Pause a hook by ID. - * - * @return true on success, false otherwise - * - * @param hookid The hook id (returned by AddHook) - */ - virtual bool PauseHookByID(int hookid) = 0; - - /** - * @brief Unpause a hook by ID. - * - * @return true on success, false otherwise - * - * @param hookid The hook id (returned by AddHook) - */ - virtual bool UnpauseHookByID(int hookid) = 0; - - /** - * @brief Checks whether a plugin has (a) hook manager(s) that is/are currently used by other plugins - * - * @param plug The unique identifier of the plugin in question - */ - - virtual void SetRes(META_RES res) = 0; //!< Sets the meta result - virtual META_RES GetPrevRes() = 0; //!< Gets the meta result of the - //!< previously calledhandler - virtual META_RES GetStatus() = 0; //!< Gets the highest meta result - virtual const void *GetOrigRet() = 0; //!< Gets the original result. - //!< If not in post function, undefined - virtual const void *GetOverrideRet() = 0; //!< Gets the override result. - //!< If none is specified, NULL - virtual void *GetIfacePtr() = 0; //!< Gets the interface pointer - - virtual void *GetOverrideRetPtr() = 0; //!< Used for setting the override return value - - /** - * @brief Remove a hook manager. Auto-removes all hooks attached to it from plugin plug. - * - * @param plug The owner of the hook manager - * @param pubFunc The hook manager's info function - */ - virtual void RemoveHookManager(Plugin plug, HookManagerPubFunc pubFunc) = 0; - - // For SH_CALL: + virtual bool RemoveHookByID(Plugin plug, int hookid) = 0; /** * @brief Makes sure that hooks are going to be ignored on the next call of vfnptr @@ -381,7 +525,7 @@ namespace SourceHook * @param plug The unique identifier of the plugin that calls this function * @param vfnptr The virtual function pointer of the function in question */ - virtual void SetIgnoreHooks(void *vfnptr) = 0; + virtual void SetIgnoreHooks(Plugin plug, void *vfnptr) = 0; /** * @brief Reverses SetIgnoreHooks' effect @@ -389,53 +533,15 @@ namespace SourceHook * @param plug The unique identifier of the plugin that calls this function * @param vfnptr The virtual function pointer of the function in question */ - virtual void ResetIgnoreHooks(void *vfnptr) = 0; - - ////////////////////////////////////////////////////////////////////////// - - // For hook managers - - // Returns the current iface ptr - virtual void DoRecall() = 0; //!< Initiates a recall sequence - - /* - HOW RECALLS WORK: - - The problem: - Users want the ability to change parameters of the called function - from inside their handler. - The solution: - 1) Mark as "recall" - 2) Recall the function - 3) => SH's hook func gets called: - 4) The first iterator points at the first hook the last hookfunc didn't execute yet - 5) does all iteration and returns normally - 6) The user's handler returns immediately - 7) The hook func returns immediately as well - - Also note that the recalled hookfunc starts with the status the recalling hookfunc - ended with. The last handler (doing the recall) is also able to specify its own - META_RES. - */ + virtual void ResetIgnoreHooks(Plugin plug, void *vfnptr) = 0; /** - * @brief Set up the hook loop. + * @brief Finds the original entry of a virtual function pointer * - * @param statusPtr pointer to status variable - * @param prevResPtr pointer to previous result variable - * @param curResPtr pointer to current result variable - * @param ifacePtrPtr pointer to interface this pointer variable - * @param origRetPr pointer to original return value variable. NULL for void funcs - * @param overrideRetPtr pointer to override return value variable. NULL for void funcs - * - * @return Override Return Pointer the hookfunc should use (may differ from overrideRetPtr - * when the hook func is being called as part of a recall + * @param vfnptr The virtual function pointer + * @return The original entry if the virtual function pointer has been patched; NULL otherwise. */ - virtual IHookContext *SetupHookLoop(IHookManagerInfo *hi, void *vfnptr, void *thisptr, void **origentry, - META_RES *statusPtr, META_RES *prevResPtr, META_RES *curResPtr, - const void *origRetPtr, void *overrideRetPtr) = 0; - - virtual void EndContext(IHookContext *pCtx) = 0; + virtual void *GetOrigVfnPtrEntry(void *vfnptr) = 0; }; // For META_RESULT_ORIG_RET and META_RESULT_OVERRIDE_RET: @@ -466,6 +572,50 @@ namespace SourceHook return &ref; } }; + + // For source-level compatibility + template struct CallClass + { + T *ptr; + + CallClass(T *p) : ptr(p) + { + } + + operator T*() + { + return ptr; + } + }; + + typedef CallClass GenericCallClass; + typedef CallClass ManualCallClass; + + template + CallClass *GetCallClass(T *p) + { + return new CallClass(p); + } + + template + void ReleaseCallClass(CallClass *p) + { + delete p; + } + + template + void *GetOrigVfnPtrEntry(X *pInstance, MFP mfp, ISourceHook *pSH) + { + SourceHook::MemFuncInfo info = {true, -1, 0, 0}; + SourceHook::GetFuncInfo(pInstance, mfp, info); + + void *vfnptr = reinterpret_cast( + *reinterpret_cast(reinterpret_cast(pInstance) + info.thisptroffs + info.vtbloffs) + info.vtblindex); + + void *origentry = pSH->GetOrigVfnPtrEntry(vfnptr); + + return origentry ? origentry : *reinterpret_cast(vfnptr); + } } /************************************************************************/ @@ -481,23 +631,14 @@ namespace SourceHook #define RETURN_META(result) do { SET_META_RESULT(result); return; } while(0) #define RETURN_META_VALUE(result, value) do { SET_META_RESULT(result); return (value); } while(0) - -template -SourceHook::CallClass *SH_GET_CALLCLASS(T *p) -{ - return static_cast< SourceHook::CallClass *>(p); -} -#define SH_RELEASE_CALLCLASS(p) - -#define SH_GET_MCALLCLASS(p, size) reinterpret_cast(p) - -// only call these from the hook handlers directly! - // If a hook on a function which returns a reference does not want to specify a return value, // it can use this macro. // ONLY USE THIS WITH MRES_IGNORED AND MRES_HANDLED !!! #define RETURN_META_NOREF(result, rettype) do { SET_META_RESULT(result); return reinterpret_cast(*SH_GLOB_SHPTR); } while(0) +// only call these from the hook handlers directly! +// :TODO: enforce it ? + // Why take a memfuncptr instead of iface and func when we have to deduce the iface anyway now? // Well, without it, there'd be no way to specify which overloaded version we want in _VALUE @@ -579,7 +720,6 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) RETURN_META_VALUE(MRES_SUPERCEDE, (thisptr->*(u.mfp)) newparams); \ } while (0) - #define SH_MANUALHOOK_RECONFIGURE(hookname, pvtblindex, pvtbloffs, pthisptroffs) \ do { \ SH_GLOB_SHPTR->RemoveHookManager(SH_GLOB_PLUGPTR, SH_MFHCls(hookname)::HookManPubFunc); \ @@ -588,41 +728,49 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SH_MFHCls(hookname)::ms_MFI.vtbloffs = pvtbloffs; \ } while (0) + +#define SH_GET_ORIG_VFNPTR_ENTRY(inst, mfp) (SourceHook::GetOrigVfnPtrEntry(inst, mfp, SH_GLOB_SHPTR)) + +// For source-level compatibility + +#define SH_GET_CALLCLASS(ptr) SourceHook::GetCallClass(ptr) +#define SH_GET_MCALLCLASS(ptr, size) SourceHook::GetCallClass(reinterpret_cast(ptr)) +#define SH_RELEASE_CALLCLASS(ptr) SourceHook::ReleaseCallClass(ptr) + // New ADD / REMOVE macros. #define SH_STATIC(func) fastdelegate::MakeDelegate(func) #define SH_MEMBER(inst, func) fastdelegate::MakeDelegate(inst, func) #define SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_Normal, post, handler) + post, handler) #define SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ __SourceHook_FHRemove##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ post, handler) #define SH_ADD_MANUALHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_Normal, post, handler) + __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), post, handler) #define SH_REMOVE_MANUALHOOK(hookname, ifaceptr, handler, post) \ __SourceHook_FHMRemove##hookname(reinterpret_cast(ifaceptr), post, handler) #define SH_ADD_VPHOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_VP, post, handler) + __SourceHook_FHVPAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ + post, handler, false) -#define SH_ADD_DVPHOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_DVP, post, handler) +#define SH_ADD_DVPHOOK(ifacetype, ifacefunc, vtableptr, handler, post) \ + __SourceHook_FHVPAdd##ifacetype##ifacefunc(reinterpret_cast(vtableptr), \ + post, handler, true) #define SH_ADD_MANUALVPHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), SourceHook::ISourceHook::Hook_VP, post, handler) + __SourceHook_FHMVPAdd##hookname(reinterpret_cast(ifaceptr), post, handler, false) -#define SH_ADD_MANUALDVPHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), SourceHook::ISourceHook::Hook_DVP, post, handler) +#define SH_ADD_MANUALDVPHOOK(hookname, vtableptr, handler, post) \ + __SourceHook_FHMVPAdd##hookname(reinterpret_cast(vtableptr), post, handler, true) #define SH_REMOVE_HOOK_ID(hookid) \ - (SH_GLOB_SHPTR->RemoveHookByID(hookid)) + (SH_GLOB_SHPTR->RemoveHookByID(SH_GLOB_PLUGPTR, hookid)) // Old macros // !! These are now deprecated. Instead, use one of these: @@ -679,7 +827,12 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) #define SH_MFHCls(hookname) __SourceHook_MFHCls_##hookname #define SHINT_MAKE_HOOKMANPUBFUNC(ifacetype, ifacefunc, overload, funcptr) \ - static int HookManPubFunc(bool store, ::SourceHook::IHookManagerInfo *hi) \ + SH_FHCls(ifacetype,ifacefunc,overload)() \ + { \ + GetFuncInfo(funcptr, ms_MFI); \ + } \ + \ + static int HookManPubFunc(::SourceHook::HookManagerAction action, ::SourceHook::IHookManagerInfo *param) \ { \ using namespace ::SourceHook; \ GetFuncInfo(funcptr, ms_MFI); \ @@ -688,16 +841,31 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) return 1; \ if (SH_GLOB_SHPTR->GetImplVersion() < SH_IMPL_VERSION) \ return 1; \ - if (store) \ - ms_HI = hi; \ - if (hi) \ + \ + if (action == HA_GetInfo) \ { \ + param->SetVersion(SH_HOOKMAN_VERSION); \ + param->SetInfo(ms_MFI.vtbloffs, ms_MFI.vtblindex, \ + reinterpret_cast(&ms_Proto)); \ + \ MemFuncInfo mfi = {true, -1, 0, 0}; \ GetFuncInfo(&SH_FHCls(ifacetype,ifacefunc,overload)::Func, mfi); \ - hi->SetInfo(SH_HOOKMAN_VERSION, ms_MFI.vtbloffs, ms_MFI.vtblindex, &ms_Proto, \ - reinterpret_cast(reinterpret_cast(&ms_Inst) + mfi.vtbloffs)[mfi.vtblindex] ); \ + param->SetHookfuncVfnptr( \ + reinterpret_cast(reinterpret_cast(&ms_Inst) + mfi.vtbloffs)[mfi.vtblindex]); \ + return 0; \ } \ - return 0; \ + else if (action == HA_Register) \ + { \ + ms_HI = param; \ + return 0; \ + } \ + else if (action == HA_Unregister) \ + { \ + ms_HI = NULL; \ + return 0; \ + } \ + else \ + return 1; \ } // It has to be possible to use the macros in namespaces @@ -717,7 +885,7 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SH_FHCls(ifacetype,ifacefunc,overload) SH_FHCls(ifacetype,ifacefunc,overload)::ms_Inst; \ ::SourceHook::MemFuncInfo SH_FHCls(ifacetype,ifacefunc,overload)::ms_MFI; \ ::SourceHook::IHookManagerInfo *SH_FHCls(ifacetype,ifacefunc,overload)::ms_HI; \ - int __SourceHook_FHAdd##ifacetype##ifacefunc(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ + int __SourceHook_FHAdd##ifacetype##ifacefunc(void *iface, bool post, \ SH_FHCls(ifacetype,ifacefunc,overload)::FD handler) \ { \ using namespace ::SourceHook; \ @@ -726,9 +894,23 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) if (mfi.thisptroffs < 0 || !mfi.isVirtual) \ return false; /* No non-virtual functions / virtual inheritance supported */ \ \ - return SH_GLOB_SHPTR->AddHook(SH_GLOB_PLUGPTR, mode, \ + return SH_GLOB_SHPTR->AddHookNew(SH_GLOB_PLUGPTR, ::SourceHook::ISourceHook::Hook_Normal, iface, mfi.thisptroffs, \ + SH_FHCls(ifacetype,ifacefunc,overload)::HookManPubFunc, \ + new CSHDelegate(handler), post); \ + } \ + int __SourceHook_FHVPAdd##ifacetype##ifacefunc(void *iface, bool post, \ + SH_FHCls(ifacetype,ifacefunc,overload)::FD handler, bool direct) \ + { \ + using namespace ::SourceHook; \ + MemFuncInfo mfi = {true, -1, 0, 0}; \ + GetFuncInfo(funcptr, mfi); \ + if (mfi.thisptroffs < 0 || !mfi.isVirtual) \ + return false; /* No non-virtual functions / virtual inheritance supported */ \ + \ + return SH_GLOB_SHPTR->AddHookNew(SH_GLOB_PLUGPTR, \ + direct ? ::SourceHook::ISourceHook::Hook_DVP : ::SourceHook::ISourceHook::Hook_VP, \ iface, mfi.thisptroffs, SH_FHCls(ifacetype,ifacefunc,overload)::HookManPubFunc, \ - new SH_FHCls(ifacetype,ifacefunc,overload)::CMyDelegateImpl(handler), post); \ + new CSHDelegate(handler), post); \ } \ bool __SourceHook_FHRemove##ifacetype##ifacefunc(void *iface, bool post, \ SH_FHCls(ifacetype,ifacefunc,overload)::FD handler) \ @@ -736,7 +918,10 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) using namespace ::SourceHook; \ MemFuncInfo mfi = {true, -1, 0, 0}; \ GetFuncInfo(funcptr, mfi); \ - SH_FHCls(ifacetype,ifacefunc,overload)::CMyDelegateImpl tmp(handler); \ + if (mfi.thisptroffs < 0) \ + return false; /* No virtual inheritance supported */ \ + \ + CSHDelegate tmp(handler); \ return SH_GLOB_SHPTR->RemoveHook(SH_GLOB_PLUGPTR, iface, mfi.thisptroffs, \ SH_FHCls(ifacetype,ifacefunc,overload)::HookManPubFunc, &tmp, post); \ } \ @@ -756,24 +941,42 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) ms_MFI.vtblindex = pvtblidx; \ ms_MFI.vtbloffs = pvtbloffs; \ } \ - static int HookManPubFunc(bool store, ::SourceHook::IHookManagerInfo *hi) \ + static int HookManPubFunc(::SourceHook::HookManagerAction action, ::SourceHook::IHookManagerInfo *param) \ { \ using namespace ::SourceHook; \ + /* we don't set ms_MFI here because manual hookmans can be reconfigured */ \ + /* :FIXME: possible problem: someone adding a hook from a constructor of a global entity */ \ + /* which is construced before SH_MFHCls(hookname)() gets called? */ \ /* Verify interface version */ \ if (SH_GLOB_SHPTR->GetIfaceVersion() != SH_IFACE_VERSION) \ return 1; \ if (SH_GLOB_SHPTR->GetImplVersion() < SH_IMPL_VERSION) \ return 1; \ - if (store) \ - ms_HI = hi; \ - if (hi) \ + \ + if (action == HA_GetInfo) \ { \ + param->SetVersion(SH_HOOKMAN_VERSION); \ + param->SetInfo(ms_MFI.vtbloffs, ms_MFI.vtblindex, \ + reinterpret_cast(&ms_Proto)); \ + \ MemFuncInfo mfi = {true, -1, 0, 0}; \ GetFuncInfo(&SH_MFHCls(hookname)::Func, mfi); \ - hi->SetInfo(SH_HOOKMAN_VERSION, ms_MFI.vtbloffs, ms_MFI.vtblindex, &ms_Proto, \ - reinterpret_cast(reinterpret_cast(&ms_Inst) + mfi.vtbloffs)[mfi.vtblindex] ); \ + param->SetHookfuncVfnptr( \ + reinterpret_cast(reinterpret_cast(&ms_Inst) + mfi.vtbloffs)[mfi.vtblindex]); \ + return 0; \ } \ - return 0; \ + else if (action == HA_Register) \ + { \ + ms_HI = param; \ + return 0; \ + } \ + else if (action == HA_Unregister) \ + { \ + ms_HI = NULL; \ + return 0; \ + } \ + else \ + return 1; \ } #define SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, pvtbloffs, pvtblidx, pthisptroffs) \ @@ -781,68 +984,98 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SH_MFHCls(hookname) SH_MFHCls(hookname)::ms_Inst; \ ::SourceHook::MemFuncInfo SH_MFHCls(hookname)::ms_MFI; \ ::SourceHook::IHookManagerInfo *SH_MFHCls(hookname)::ms_HI; \ - int __SourceHook_FHMAdd##hookname(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ + int __SourceHook_FHMAdd##hookname(void *iface, bool post, \ SH_MFHCls(hookname)::FD handler) \ { \ - return SH_GLOB_SHPTR->AddHook(SH_GLOB_PLUGPTR, mode, \ + return SH_GLOB_SHPTR->AddHookNew(SH_GLOB_PLUGPTR, ::SourceHook::ISourceHook::Hook_Normal, iface, pthisptroffs, \ + SH_MFHCls(hookname)::HookManPubFunc, \ + new ::SourceHook::CSHDelegate(handler), post); \ + } \ + int __SourceHook_FHMVPAdd##hookname(void *iface, bool post, \ + SH_MFHCls(hookname)::FD handler, bool direct) \ + { \ + return SH_GLOB_SHPTR->AddHookNew(SH_GLOB_PLUGPTR, \ + direct ? ::SourceHook::ISourceHook::Hook_DVP : ::SourceHook::ISourceHook::Hook_VP, \ iface, pthisptroffs, SH_MFHCls(hookname)::HookManPubFunc, \ - new SH_MFHCls(hookname)::CMyDelegateImpl(handler), post); \ + new ::SourceHook::CSHDelegate(handler), post); \ } \ bool __SourceHook_FHMRemove##hookname(void *iface, bool post, \ SH_MFHCls(hookname)::FD handler) \ { \ - SH_MFHCls(hookname)::CMyDelegateImpl tmp(handler); \ + ::SourceHook::CSHDelegate tmp(handler); \ return SH_GLOB_SHPTR->RemoveHook(SH_GLOB_PLUGPTR, iface, pthisptroffs, \ SH_MFHCls(hookname)::HookManPubFunc, &tmp, post); \ } \ + #define SH_SETUPCALLS(rettype, paramtypes, params) \ - /* 1) Set up */ \ + /* 1) Find the vfnptr */ \ using namespace ::SourceHook; \ void *ourvfnptr = reinterpret_cast( \ *reinterpret_cast(reinterpret_cast(this) + ms_MFI.vtbloffs) + ms_MFI.vtblindex); \ - void *vfnptr_origentry; \ + IVfnPtr *vfnptr = ms_HI->FindVfnPtr(ourvfnptr); \ + SH_ASSERT(vfnptr, ("Called with vfnptr 0x%p which couldn't be found in the list", ourvfnptr)); \ \ + void *vfnptr_origentry = vfnptr->GetOrigEntry(); \ + /* ... and the iface */ \ + IIface *ifinfo = vfnptr->FindIface(reinterpret_cast(this)); \ + if (!ifinfo) \ + { \ + /* The iface info was not found. Redirect the call to the original function. */ \ + rettype (EmptyClass::*mfp)paramtypes; \ + SH_SETUP_MFP(mfp); \ + return (reinterpret_cast(this)->*mfp)params; \ + } \ + /* 2) Declare some vars and set it up */ \ + SH_GLOB_SHPTR->HookLoopBegin(ifinfo); \ + IHookList *prelist = ifinfo->GetPreHooks(); \ + IHookList *postlist = ifinfo->GetPostHooks(); \ META_RES status = MRES_IGNORED; \ META_RES prev_res; \ META_RES cur_res; \ - \ typedef ReferenceCarrier::type my_rettype; \ my_rettype orig_ret; \ my_rettype override_ret; \ my_rettype plugin_ret; \ - IMyDelegate *iter; \ - IHookContext *pContext = SH_GLOB_SHPTR->SetupHookLoop(ms_HI, ourvfnptr, reinterpret_cast(this), \ - &vfnptr_origentry, &status, &prev_res, &cur_res, &orig_ret, &override_ret); + void* ifptr; \ + my_rettype *pOverrideRet = reinterpret_cast(SH_GLOB_SHPTR->SetupHookLoop( \ + &status, &prev_res, &cur_res, &ifptr, &orig_ret, &override_ret)); #define SH_CALL_HOOKS(post, params) \ - prev_res = MRES_IGNORED; \ - while ( iter = static_cast(pContext->GetNext()) ) \ + if (SH_GLOB_SHPTR->ShouldContinue()) \ { \ - cur_res = MRES_IGNORED; \ - plugin_ret = iter->Call params; \ - prev_res = cur_res; \ - if (cur_res > status) \ - status = cur_res; \ - if (cur_res >= MRES_OVERRIDE) \ - *reinterpret_cast(pContext->GetOverrideRetPtr()) = plugin_ret; \ + prev_res = MRES_IGNORED; \ + for (AutoHookIter iter(post##list); !iter.End(); iter.Next()) \ + { \ + cur_res = MRES_IGNORED; \ + ifptr = reinterpret_cast(reinterpret_cast(this) - iter.ThisPtrOffs()); \ + plugin_ret = reinterpret_cast*>(iter.Handler())->GetDeleg() params; \ + prev_res = cur_res; \ + if (cur_res > status) \ + status = cur_res; \ + if (cur_res >= MRES_OVERRIDE) \ + *pOverrideRet = plugin_ret; \ + if (!SH_GLOB_SHPTR->ShouldContinue()) \ + { \ + iter.SetToZero(); \ + break; \ + } \ + } \ } #define SH_CALL_ORIG(rettype, paramtypes, params) \ - if (status != MRES_SUPERCEDE && pContext->ShouldCallOrig()) \ + if (status != MRES_SUPERCEDE) \ { \ rettype (EmptyClass::*mfp)paramtypes; \ SH_SETUP_MFP(mfp); \ orig_ret = (reinterpret_cast(this)->*mfp)params; \ } \ else \ - orig_ret = override_ret; /* :TODO: ??? : use pContext->GetOverrideRetPtr() or not? */ + orig_ret = override_ret; \ #define SH_RETURN() \ - const my_rettype *retptr = reinterpret_cast( \ - (status >= MRES_OVERRIDE) ? pContext->GetOverrideRetPtr() : pContext->GetOrigRetPtr()); \ - SH_GLOB_SHPTR->EndContext(pContext); \ - return *retptr; + SH_GLOB_SHPTR->HookLoopEnd(); \ + return status >= MRES_OVERRIDE ? *pOverrideRet : orig_ret; #define SH_HANDLEFUNC(paramtypes, params, rettype) \ SH_SETUPCALLS(rettype, paramtypes, params) \ @@ -853,33 +1086,56 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) ////////////////////////////////////////////////////////////////////////// #define SH_SETUPCALLS_void(paramtypes, params) \ - /* 1) Set up */ \ + /* 1) Find the vfnptr */ \ using namespace ::SourceHook; \ void *ourvfnptr = reinterpret_cast( \ *reinterpret_cast(reinterpret_cast(this) + ms_MFI.vtbloffs) + ms_MFI.vtblindex); \ - void *vfnptr_origentry; \ + IVfnPtr *vfnptr = ms_HI->FindVfnPtr(ourvfnptr); \ + SH_ASSERT(vfnptr, ("Called with vfnptr 0x%p which couldn't be found in the list", ourvfnptr)); \ \ + void *vfnptr_origentry = vfnptr->GetOrigEntry(); \ + /* ... and the iface */ \ + IIface *ifinfo = vfnptr->FindIface(reinterpret_cast(this)); \ + if (!ifinfo) \ + { \ + /* The iface info was not found. Redirect the call to the original function. */ \ + void (EmptyClass::*mfp)paramtypes; \ + SH_SETUP_MFP(mfp); \ + (reinterpret_cast(this)->*mfp)params; \ + return; \ + } \ + /* 2) Declare some vars and set it up */ \ + SH_GLOB_SHPTR->HookLoopBegin(ifinfo); \ + IHookList *prelist = ifinfo->GetPreHooks(); \ + IHookList *postlist = ifinfo->GetPostHooks(); \ META_RES status = MRES_IGNORED; \ META_RES prev_res; \ META_RES cur_res; \ - \ - IMyDelegate *iter; \ - IHookContext *pContext = SH_GLOB_SHPTR->SetupHookLoop(ms_HI, ourvfnptr, reinterpret_cast(this), \ - &vfnptr_origentry, &status, &prev_res, &cur_res, NULL, NULL); + void* ifptr; \ + SH_GLOB_SHPTR->SetupHookLoop(&status, &prev_res, &cur_res, &ifptr, NULL, NULL); \ #define SH_CALL_HOOKS_void(post, params) \ - prev_res = MRES_IGNORED; \ - while ( iter = static_cast(pContext->GetNext()) ) \ + if (SH_GLOB_SHPTR->ShouldContinue()) \ { \ - cur_res = MRES_IGNORED; \ - iter->Call params; \ - prev_res = cur_res; \ - if (cur_res > status) \ - status = cur_res; \ + prev_res = MRES_IGNORED; \ + for (AutoHookIter iter(post##list); !iter.End(); iter.Next()) \ + { \ + cur_res = MRES_IGNORED; \ + ifptr = reinterpret_cast(reinterpret_cast(this) - iter.ThisPtrOffs()); \ + reinterpret_cast*>(iter.Handler())->GetDeleg() params; \ + prev_res = cur_res; \ + if (cur_res > status) \ + status = cur_res; \ + if (!SH_GLOB_SHPTR->ShouldContinue()) \ + { \ + iter.SetToZero(); \ + break; \ + } \ + } \ } #define SH_CALL_ORIG_void(paramtypes, params) \ - if (status != MRES_SUPERCEDE && pContext->ShouldCallOrig()) \ + if (status != MRES_SUPERCEDE) \ { \ void (EmptyClass::*mfp)paramtypes; \ SH_SETUP_MFP(mfp); \ @@ -887,7 +1143,7 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) } #define SH_RETURN_void() \ - SH_GLOB_SHPTR->EndContext(pContext); + SH_GLOB_SHPTR->HookLoopEnd(); #define SH_HANDLEFUNC_void(paramtypes, params) \ SH_SETUPCALLS_void(paramtypes, params) \ @@ -915,28 +1171,6 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) ////////////////////////////////////////////////////////////////////////// -#define MAKE_DELEG(ret_type, params_decl, params_pass) \ - struct IMyDelegate : ::SourceHook::ISHDelegate { virtual ret_type Call params_decl = 0; }; \ - struct CMyDelegateImpl : IMyDelegate \ - { \ - FD m_Deleg; \ - CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \ - ret_type Call params_decl { return m_Deleg params_pass; } \ - void DeleteThis() { delete this; } \ - bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast(pOtherDeleg)->m_Deleg; } \ - }; - -#define MAKE_DELEG_void(params_decl, params_pass) \ - struct IMyDelegate : ::SourceHook::ISHDelegate { virtual void Call params_decl = 0; }; \ - struct CMyDelegateImpl : IMyDelegate \ - { \ - FD m_Deleg; \ - CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \ - void Call params_decl { m_Deleg params_pass; } \ - void DeleteThis() { delete this; } \ - bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast(pOtherDeleg)->m_Deleg; } \ - }; - // :FIXME: // sizeof on references returns the size of the datatype, NOT the pointer size or something // -> one should probably flag references in __SourceHook_ParamSizes_* ! @@ -948,37 +1182,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate0 FD; \ - MAKE_DELEG(rettype, (), ()); \ virtual rettype Func() \ { SH_HANDLEFUNC((), (), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 0, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0 }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 0, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK0_void(ifacetype, ifacefunc, attr, overload) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate0<> FD; \ - MAKE_DELEG_void((), ()); \ virtual void Func() \ { SH_HANDLEFUNC_void((), ()); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 0, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0 }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 0, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK0_vafmt(ifacetype, ifacefunc, attr, overload, rettype) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate1 FD; \ - MAKE_DELEG(rettype, (const char *px), (px)); \ - virtual rettype Func( const char *fmt, ...) \ + virtual rettype Func(const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -990,15 +1221,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 0, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1 }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 0, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK0_void_vafmt(ifacetype, ifacefunc, attr, overload) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate1 FD; \ - MAKE_DELEG_void((const char *px), (px)); \ virtual void Func(const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1011,36 +1241,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 0, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1 }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 0, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK0(hookname, vtblidx, vtbloffs, thisptroffs, rettype) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate0 FD; \ - MAKE_DELEG(rettype, (), ()); \ virtual rettype Func() \ { SH_HANDLEFUNC((), (), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 0, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0 }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 0, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK0_void(hookname, vtblidx, vtbloffs, thisptroffs) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate0<> FD; \ - MAKE_DELEG_void((), ()); \ virtual void Func() \ { SH_HANDLEFUNC_void((), ()); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 0, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0 }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 0, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 1 arguments ********* @@ -1048,37 +1276,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate1 FD; \ - MAKE_DELEG(rettype, (param1 p1), (p1)); \ virtual rettype Func(param1 p1) \ { SH_HANDLEFUNC((param1), (p1), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 1, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 1, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK1_void(ifacetype, ifacefunc, attr, overload, param1) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate1 FD; \ - MAKE_DELEG_void((param1 p1), (p1)); \ virtual void Func(param1 p1) \ { SH_HANDLEFUNC_void((param1), (p1)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 1, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 1, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK1_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate2 FD; \ - MAKE_DELEG(rettype, (param1 p1, const char *px), (p1, px)); \ - virtual rettype Func(param1 p1 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1090,15 +1315,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 1, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 1, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK1_void_vafmt(ifacetype, ifacefunc, attr, overload, param1) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate2 FD; \ - MAKE_DELEG_void((param1 p1, const char *px), (p1, px)); \ virtual void Func(param1 p1, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1111,36 +1335,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 1, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 1, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK1(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate1 FD; \ - MAKE_DELEG(rettype, (param1 p1), (p1)); \ virtual rettype Func(param1 p1) \ { SH_HANDLEFUNC((param1), (p1), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 1, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 1, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK1_void(hookname, vtblidx, vtbloffs, thisptroffs, param1) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate1 FD; \ - MAKE_DELEG_void((param1 p1), (p1)); \ virtual void Func(param1 p1) \ { SH_HANDLEFUNC_void((param1), (p1)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 1, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 1, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 2 arguments ********* @@ -1148,37 +1370,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate2 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2), (p1, p2)); \ virtual rettype Func(param1 p1, param2 p2) \ { SH_HANDLEFUNC((param1, param2), (p1, p2), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 2, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 2, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK2_void(ifacetype, ifacefunc, attr, overload, param1, param2) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate2 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2), (p1, p2)); \ virtual void Func(param1 p1, param2 p2) \ { SH_HANDLEFUNC_void((param1, param2), (p1, p2)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 2, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 2, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK2_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate3 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, const char *px), (p1, p2, px)); \ - virtual rettype Func(param1 p1, param2 p2 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1190,15 +1409,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 2, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 2, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK2_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate3 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, const char *px), (p1, p2, px)); \ virtual void Func(param1 p1, param2 p2, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1211,36 +1429,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 2, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 2, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK2(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate2 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2), (p1, p2)); \ virtual rettype Func(param1 p1, param2 p2) \ { SH_HANDLEFUNC((param1, param2), (p1, p2), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 2, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 2, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK2_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate2 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2), (p1, p2)); \ virtual void Func(param1 p1, param2 p2) \ { SH_HANDLEFUNC_void((param1, param2), (p1, p2)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 2, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 2, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 3 arguments ********* @@ -1248,37 +1464,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate3 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3), (p1, p2, p3)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3) \ { SH_HANDLEFUNC((param1, param2, param3), (p1, p2, p3), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 3, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 3, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK3_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate3 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3), (p1, p2, p3)); \ virtual void Func(param1 p1, param2 p2, param3 p3) \ { SH_HANDLEFUNC_void((param1, param2, param3), (p1, p2, p3)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 3, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 3, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK3_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate4 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, const char *px), (p1, p2, p3, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1290,15 +1503,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 3, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 3, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK3_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate4 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, const char *px), (p1, p2, p3, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1311,36 +1523,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 3, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 3, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK3(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate3 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3), (p1, p2, p3)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3) \ { SH_HANDLEFUNC((param1, param2, param3), (p1, p2, p3), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 3, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 3, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK3_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate3 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3), (p1, p2, p3)); \ virtual void Func(param1 p1, param2 p2, param3 p3) \ { SH_HANDLEFUNC_void((param1, param2, param3), (p1, p2, p3)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 3, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 3, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 4 arguments ********* @@ -1348,37 +1558,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate4 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4), (p1, p2, p3, p4)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4) \ { SH_HANDLEFUNC((param1, param2, param3, param4), (p1, p2, p3, p4), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 4, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 4, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK4_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate4 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4), (p1, p2, p3, p4)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4), (p1, p2, p3, p4)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 4, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 4, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK4_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate5 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, const char *px), (p1, p2, p3, p4, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1390,15 +1597,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 4, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 4, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK4_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate5 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, const char *px), (p1, p2, p3, p4, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1411,36 +1617,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 4, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 4, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK4(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate4 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4), (p1, p2, p3, p4)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4) \ { SH_HANDLEFUNC((param1, param2, param3, param4), (p1, p2, p3, p4), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 4, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 4, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK4_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate4 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4), (p1, p2, p3, p4)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4), (p1, p2, p3, p4)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 4, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 4, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 5 arguments ********* @@ -1448,37 +1652,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate5 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5), (p1, p2, p3, p4, p5)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5), (p1, p2, p3, p4, p5), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 5, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 5, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK5_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate5 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5), (p1, p2, p3, p4, p5)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5), (p1, p2, p3, p4, p5)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 5, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 5, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK5_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate6 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *px), (p1, p2, p3, p4, p5, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1490,15 +1691,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 5, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 5, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK5_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate6 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *px), (p1, p2, p3, p4, p5, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1511,36 +1711,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 5, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 5, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK5(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate5 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5), (p1, p2, p3, p4, p5)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5), (p1, p2, p3, p4, p5), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 5, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 5, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK5_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate5 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5), (p1, p2, p3, p4, p5)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5), (p1, p2, p3, p4, p5)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 5, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 5, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 6 arguments ********* @@ -1548,37 +1746,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate6 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6), (p1, p2, p3, p4, p5, p6)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6), (p1, p2, p3, p4, p5, p6), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 6, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 6, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK6_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate6 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6), (p1, p2, p3, p4, p5, p6)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6), (p1, p2, p3, p4, p5, p6)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 6, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 6, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK6_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate7 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *px), (p1, p2, p3, p4, p5, p6, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1590,15 +1785,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 6, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 6, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK6_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate7 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *px), (p1, p2, p3, p4, p5, p6, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1611,36 +1805,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 6, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 6, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK6(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate6 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6), (p1, p2, p3, p4, p5, p6)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6), (p1, p2, p3, p4, p5, p6), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 6, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 6, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK6_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate6 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6), (p1, p2, p3, p4, p5, p6)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6), (p1, p2, p3, p4, p5, p6)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 6, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 6, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 7 arguments ********* @@ -1648,37 +1840,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate7 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7), (p1, p2, p3, p4, p5, p6, p7)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7), (p1, p2, p3, p4, p5, p6, p7), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 7, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 7, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK7_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate7 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7), (p1, p2, p3, p4, p5, p6, p7)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7), (p1, p2, p3, p4, p5, p6, p7)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 7, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 7, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK7_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate8 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *px), (p1, p2, p3, p4, p5, p6, p7, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1690,15 +1879,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 7, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 7, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK7_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate8 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *px), (p1, p2, p3, p4, p5, p6, p7, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1711,36 +1899,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 7, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 7, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK7(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate7 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7), (p1, p2, p3, p4, p5, p6, p7)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7), (p1, p2, p3, p4, p5, p6, p7), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 7, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 7, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK7_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate7 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7), (p1, p2, p3, p4, p5, p6, p7)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7), (p1, p2, p3, p4, p5, p6, p7)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 7, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 7, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 8 arguments ********* @@ -1748,37 +1934,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate8 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8), (p1, p2, p3, p4, p5, p6, p7, p8)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8), (p1, p2, p3, p4, p5, p6, p7, p8), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 8, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 8, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK8_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate8 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8), (p1, p2, p3, p4, p5, p6, p7, p8)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8), (p1, p2, p3, p4, p5, p6, p7, p8)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 8, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 8, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK8_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate9 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1790,15 +1973,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 8, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 8, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK8_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate9 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1811,36 +1993,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 8, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 8, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK8(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate8 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8), (p1, p2, p3, p4, p5, p6, p7, p8)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8), (p1, p2, p3, p4, p5, p6, p7, p8), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 8, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 8, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK8_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate8 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8), (p1, p2, p3, p4, p5, p6, p7, p8)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8), (p1, p2, p3, p4, p5, p6, p7, p8)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 8, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 8, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 9 arguments ********* @@ -1848,37 +2028,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate9 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9), (p1, p2, p3, p4, p5, p6, p7, p8, p9), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 9, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 9, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK9_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate9 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 9, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 9, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK9_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate10 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1890,15 +2067,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 9, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 9, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK9_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate10 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -1911,36 +2087,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 9, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 9, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK9(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate9 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9), (p1, p2, p3, p4, p5, p6, p7, p8, p9), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 9, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 9, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK9_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate9 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 9, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 9, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 10 arguments ********* @@ -1948,37 +2122,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate10 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 10, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 10, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK10_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate10 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 10, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 10, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK10_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate11 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -1990,15 +2161,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 10, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 10, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK10_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate11 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2011,36 +2181,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 10, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 10, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK10(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate10 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 10, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 10, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK10_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate10 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 10, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 10, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 11 arguments ********* @@ -2048,37 +2216,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate11 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 11, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 11, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK11_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate11 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 11, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 11, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK11_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate12 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2090,15 +2255,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 11, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 11, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK11_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate12 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2111,36 +2275,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 11, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 11, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK11(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate11 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 11, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 11, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK11_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate11 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 11, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 11, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 12 arguments ********* @@ -2148,37 +2310,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate12 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 12, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 12, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK12_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate12 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 12, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 12, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK12_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate13 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2190,15 +2349,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 12, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 12, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK12_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate13 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2211,36 +2369,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 12, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 12, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK12(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate12 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 12, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 12, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK12_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate12 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 12, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 12, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 13 arguments ********* @@ -2248,37 +2404,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate13 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 13, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 13, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK13_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate13 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 13, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 13, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK13_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate14 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2290,15 +2443,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 13, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 13, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK13_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate14 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2311,36 +2463,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 13, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 13, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK13(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate13 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 13, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 13, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK13_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate13 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 13, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 13, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 14 arguments ********* @@ -2348,37 +2498,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate14 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 14, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 14, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK14_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate14 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 14, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 14, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK14_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate15 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2390,15 +2537,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 14, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 14, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK14_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate15 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2411,36 +2557,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 14, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 14, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK14(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate14 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 14, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 14, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK14_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate14 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 14, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 14, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 15 arguments ********* @@ -2448,37 +2592,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate15 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 15, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 15, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK15_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate15 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 15, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 15, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK15_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate16 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2490,15 +2631,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 15, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 15, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK15_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate16 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2511,36 +2651,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 15, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 15, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK15(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate15 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 15, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 15, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK15_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate15 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 15, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 15, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 16 arguments ********* @@ -2548,37 +2686,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate16 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 16, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 16, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK16_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate16 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 16, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 16, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK16_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate17 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2590,15 +2725,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 16, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 16, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK16_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate17 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2611,36 +2745,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 16, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 16, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK16(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate16 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 16, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 16, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK16_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate16 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 16, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 16, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 17 arguments ********* @@ -2648,37 +2780,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate17 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 17, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 17, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK17_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate17 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 17, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 17, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK17_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate18 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2690,15 +2819,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 17, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 17, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK17_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate18 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2711,36 +2839,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 17, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 17, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK17(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate17 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 17, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 17, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK17_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate17 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 17, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 17, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 18 arguments ********* @@ -2748,37 +2874,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate18 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 18, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 18, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK18_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate18 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 18, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 18, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK18_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate19 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2790,15 +2913,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 18, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 18, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK18_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate19 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2811,36 +2933,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 18, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 18, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK18(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate18 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 18, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 18, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK18_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate18 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 18, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 18, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 19 arguments ********* @@ -2848,37 +2968,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate19 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 19, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 19, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK19_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate19 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 19, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 19, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK19_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate20 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2890,15 +3007,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 19, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 19, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK19_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate20 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -2911,36 +3027,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 19, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 19, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK19(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate19 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 19, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 19, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK19_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate19 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 19, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 19, __SourceHook_ParamSizesM_##hookname); \ // ********* Support for 20 arguments ********* @@ -2948,37 +3062,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate20 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20), rettype); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0}, {sizeof(param20), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 20, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; - + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19), sizeof(param20) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 20, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK20_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate20 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); } \ SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0}, {sizeof(param20), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 20, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + \ + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19), sizeof(param20) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 20, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK20_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate21 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20 , const char *fmt, ...) \ + virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ va_list ap; \ @@ -2990,15 +3101,14 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0}, {sizeof(param20), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 20, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19), sizeof(param20) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(sizeof(rettype), \ + 20, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_HOOK20_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ (&ifacetype::ifacefunc))) \ typedef fastdelegate::FastDelegate21 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, px)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *fmt, ...) \ { \ char buf[::SourceHook::STRBUF_LEN]; \ @@ -3011,36 +3121,34 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ (static_cast(&ifacetype::ifacefunc))) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0}, {sizeof(param20), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 20, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0 }; + const int __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload[] = { -1, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19), sizeof(param20) }; \ + ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto(0, \ + 20, __SourceHook_ParamSizes_##ifacetype##ifacefunc##overload); #define SH_DECL_MANUALHOOK20(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate20 FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); \ virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20) \ { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20), rettype); } \ typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20); \ typedef rettype RetType; \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0}, {sizeof(param20), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 20, { sizeof(rettype), 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname, 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19), sizeof(param20) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(sizeof(rettype), \ + 20, __SourceHook_ParamSizesM_##hookname); \ #define SH_DECL_MANUALHOOK20_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ typedef fastdelegate::FastDelegate20 FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); \ virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20) \ { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); } \ typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20); \ SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {0, 0, 0}, {sizeof(param1), 0, 0}, {sizeof(param2), 0, 0}, {sizeof(param3), 0, 0}, {sizeof(param4), 0, 0}, {sizeof(param5), 0, 0}, {sizeof(param6), 0, 0}, {sizeof(param7), 0, 0}, {sizeof(param8), 0, 0}, {sizeof(param9), 0, 0}, {sizeof(param10), 0, 0}, {sizeof(param11), 0, 0}, {sizeof(param12), 0, 0}, {sizeof(param13), 0, 0}, {sizeof(param14), 0, 0}, {sizeof(param15), 0, 0}, {sizeof(param16), 0, 0}, {sizeof(param17), 0, 0}, {sizeof(param18), 0, 0}, {sizeof(param19), 0, 0}, {sizeof(param20), 0, 0} }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 20, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0 }; + const int __SourceHook_ParamSizesM_##hookname[] = { 0, sizeof(param1), sizeof(param2), sizeof(param3), sizeof(param4), sizeof(param5), sizeof(param6), sizeof(param7), sizeof(param8), sizeof(param9), sizeof(param10), sizeof(param11), sizeof(param12), sizeof(param13), sizeof(param14), sizeof(param15), sizeof(param16), sizeof(param17), sizeof(param18), sizeof(param19), sizeof(param20) }; \ + ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto(0, \ + 20, __SourceHook_ParamSizesM_##hookname); \ @@ -3052,9 +3160,9 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) { \ using namespace ::SourceHook; \ \ - m_pSH->SetIgnoreHooks(m_VfnPtr); \ + m_pSH->SetIgnoreHooks(m_Plug, m_VfnPtr); \ RetType tmpret = (m_ThisPtr->*m_MFP)call; \ - m_pSH->ResetIgnoreHooks(m_VfnPtr); \ + m_pSH->ResetIgnoreHooks(m_Plug, m_VfnPtr); \ return tmpret; \ } @@ -3062,24 +3170,48 @@ SourceHook::CallClass *SH_GET_CALLCLASS(T *p) { \ using namespace ::SourceHook; \ \ - m_pSH->SetIgnoreHooks(m_VfnPtr); \ + m_pSH->SetIgnoreHooks(m_Plug, m_VfnPtr); \ (m_ThisPtr->*m_MFP)call; \ - m_pSH->ResetIgnoreHooks(m_VfnPtr); \ + m_pSH->ResetIgnoreHooks(m_Plug, m_VfnPtr); \ } namespace SourceHook { + // Call Class Wrapper! + template struct CCW + { + typedef T type; + + // Get Real Pointer! + static inline T *GRP(T *p) + { + return p; + } + }; + + template struct CCW< CallClass > + { + typedef T type; + + // Get Real Pointer! + static inline T *GRP(CallClass *p) + { + return p->ptr; + } + }; + // Support for 0 arguments - template class ExecutableClass0 + template class ExecutableClass0 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass0(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass0(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()() const SH_MAKE_EXECUTABLECLASS_OB((), ()) @@ -3147,15 +3279,16 @@ namespace SourceHook }; - template class ExecutableClass0 + template class ExecutableClass0 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass0(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass0(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()() const SH_MAKE_EXECUTABLECLASS_OB_void((), ()) @@ -3224,15 +3357,16 @@ namespace SourceHook }; // Support for 1 arguments - template class ExecutableClass1 + template class ExecutableClass1 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass1(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass1(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1) const SH_MAKE_EXECUTABLECLASS_OB((p1), (Param1)) @@ -3297,15 +3431,16 @@ namespace SourceHook }; - template class ExecutableClass1 + template class ExecutableClass1 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass1(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass1(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1) const SH_MAKE_EXECUTABLECLASS_OB_void((p1), (Param1)) @@ -3371,15 +3506,16 @@ namespace SourceHook }; // Support for 2 arguments - template class ExecutableClass2 + template class ExecutableClass2 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass2(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass2(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2), (Param1, Param2)) @@ -3441,15 +3577,16 @@ namespace SourceHook }; - template class ExecutableClass2 + template class ExecutableClass2 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass2(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass2(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2), (Param1, Param2)) @@ -3512,15 +3649,16 @@ namespace SourceHook }; // Support for 3 arguments - template class ExecutableClass3 + template class ExecutableClass3 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass3(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass3(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3), (Param1, Param2, Param3)) @@ -3579,15 +3717,16 @@ namespace SourceHook }; - template class ExecutableClass3 + template class ExecutableClass3 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass3(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass3(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3), (Param1, Param2, Param3)) @@ -3647,15 +3786,16 @@ namespace SourceHook }; // Support for 4 arguments - template class ExecutableClass4 + template class ExecutableClass4 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass4(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass4(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4), (Param1, Param2, Param3, Param4)) @@ -3711,15 +3851,16 @@ namespace SourceHook }; - template class ExecutableClass4 + template class ExecutableClass4 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass4(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass4(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4), (Param1, Param2, Param3, Param4)) @@ -3776,15 +3917,16 @@ namespace SourceHook }; // Support for 5 arguments - template class ExecutableClass5 + template class ExecutableClass5 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass5(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass5(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5), (Param1, Param2, Param3, Param4, Param5)) @@ -3837,15 +3979,16 @@ namespace SourceHook }; - template class ExecutableClass5 + template class ExecutableClass5 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass5(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass5(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5), (Param1, Param2, Param3, Param4, Param5)) @@ -3899,15 +4042,16 @@ namespace SourceHook }; // Support for 6 arguments - template class ExecutableClass6 + template class ExecutableClass6 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass6(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass6(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6), (Param1, Param2, Param3, Param4, Param5, Param6)) @@ -3957,15 +4101,16 @@ namespace SourceHook }; - template class ExecutableClass6 + template class ExecutableClass6 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass6(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass6(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6), (Param1, Param2, Param3, Param4, Param5, Param6)) @@ -4016,15 +4161,16 @@ namespace SourceHook }; // Support for 7 arguments - template class ExecutableClass7 + template class ExecutableClass7 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass7(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass7(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7), (Param1, Param2, Param3, Param4, Param5, Param6, Param7)) @@ -4071,15 +4217,16 @@ namespace SourceHook }; - template class ExecutableClass7 + template class ExecutableClass7 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass7(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass7(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7), (Param1, Param2, Param3, Param4, Param5, Param6, Param7)) @@ -4127,15 +4274,16 @@ namespace SourceHook }; // Support for 8 arguments - template class ExecutableClass8 + template class ExecutableClass8 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass8(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass8(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8)) @@ -4179,15 +4327,16 @@ namespace SourceHook }; - template class ExecutableClass8 + template class ExecutableClass8 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass8(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass8(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8)) @@ -4232,15 +4381,16 @@ namespace SourceHook }; // Support for 9 arguments - template class ExecutableClass9 + template class ExecutableClass9 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass9(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass9(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9)) @@ -4281,15 +4431,16 @@ namespace SourceHook }; - template class ExecutableClass9 + template class ExecutableClass9 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass9(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass9(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9)) @@ -4331,15 +4482,16 @@ namespace SourceHook }; // Support for 10 arguments - template class ExecutableClass10 + template class ExecutableClass10 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass10(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass10(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)) @@ -4377,15 +4529,16 @@ namespace SourceHook }; - template class ExecutableClass10 + template class ExecutableClass10 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass10(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass10(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)) @@ -4424,15 +4577,16 @@ namespace SourceHook }; // Support for 11 arguments - template class ExecutableClass11 + template class ExecutableClass11 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass11(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass11(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11)) @@ -4467,15 +4621,16 @@ namespace SourceHook }; - template class ExecutableClass11 + template class ExecutableClass11 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass11(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass11(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11)) @@ -4511,15 +4666,16 @@ namespace SourceHook }; // Support for 12 arguments - template class ExecutableClass12 + template class ExecutableClass12 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass12(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass12(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12)) @@ -4551,15 +4707,16 @@ namespace SourceHook }; - template class ExecutableClass12 + template class ExecutableClass12 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass12(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass12(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12)) @@ -4592,15 +4749,16 @@ namespace SourceHook }; // Support for 13 arguments - template class ExecutableClass13 + template class ExecutableClass13 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass13(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass13(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13)) @@ -4629,15 +4787,16 @@ namespace SourceHook }; - template class ExecutableClass13 + template class ExecutableClass13 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass13(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass13(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13)) @@ -4667,15 +4826,16 @@ namespace SourceHook }; // Support for 14 arguments - template class ExecutableClass14 + template class ExecutableClass14 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass14(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass14(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14)) @@ -4701,15 +4861,16 @@ namespace SourceHook }; - template class ExecutableClass14 + template class ExecutableClass14 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass14(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass14(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14)) @@ -4736,15 +4897,16 @@ namespace SourceHook }; // Support for 15 arguments - template class ExecutableClass15 + template class ExecutableClass15 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass15(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass15(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15)) @@ -4767,15 +4929,16 @@ namespace SourceHook }; - template class ExecutableClass15 + template class ExecutableClass15 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass15(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass15(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15)) @@ -4799,15 +4962,16 @@ namespace SourceHook }; // Support for 16 arguments - template class ExecutableClass16 + template class ExecutableClass16 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass16(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass16(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16)) @@ -4827,15 +4991,16 @@ namespace SourceHook }; - template class ExecutableClass16 + template class ExecutableClass16 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass16(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass16(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16)) @@ -4856,15 +5021,16 @@ namespace SourceHook }; // Support for 17 arguments - template class ExecutableClass17 + template class ExecutableClass17 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass17(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass17(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16, Param17 p17) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17)) @@ -4881,15 +5047,16 @@ namespace SourceHook }; - template class ExecutableClass17 + template class ExecutableClass17 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass17(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass17(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16, Param17 p17) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17)) @@ -4907,15 +5074,16 @@ namespace SourceHook }; // Support for 18 arguments - template class ExecutableClass18 + template class ExecutableClass18 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass18(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass18(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16, Param17 p17, Param18 p18) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18)) @@ -4929,15 +5097,16 @@ namespace SourceHook }; - template class ExecutableClass18 + template class ExecutableClass18 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass18(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass18(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16, Param17 p17, Param18 p18) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18)) @@ -4952,15 +5121,16 @@ namespace SourceHook }; // Support for 19 arguments - template class ExecutableClass19 + template class ExecutableClass19 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass19(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass19(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16, Param17 p17, Param18 p18, Param19 p19) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19)) @@ -4971,15 +5141,16 @@ namespace SourceHook }; - template class ExecutableClass19 + template class ExecutableClass19 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass19(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass19(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16, Param17 p17, Param18 p18, Param19 p19) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19)) @@ -4991,15 +5162,16 @@ namespace SourceHook }; // Support for 20 arguments - template class ExecutableClass20 + template class ExecutableClass20 { ObjType *m_ThisPtr; void *m_VfnPtr; - MFPType m_MFP; + MFP m_MFP; ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass20(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass20(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } RetType operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16, Param17 p17, Param18 p18, Param19 p19, Param20 p20) const SH_MAKE_EXECUTABLECLASS_OB((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20)) @@ -5007,15 +5179,16 @@ namespace SourceHook }; - template class ExecutableClass20 + template class ExecutableClass20 { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; + ObjType *m_ThisPtr; + void *m_VfnPtr; + MFP m_MFP; + ISourceHook *m_pSH; + Plugin m_Plug; public: - ExecutableClass20(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) : m_ThisPtr(tp), - m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH) { } + ExecutableClass20(ObjType *tp, MFP mfp, void *vp, ISourceHook *pSH, Plugin plug) : m_ThisPtr(tp), + m_VfnPtr(vp), m_MFP(mfp), m_pSH(pSH), m_Plug(plug) { } void operator()(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8, Param9 p9, Param10 p10, Param11 p11, Param12 p12, Param13 p13, Param14 p14, Param15 p15, Param16 p16, Param17 p17, Param18 p18, Param19 p19, Param20 p20) const SH_MAKE_EXECUTABLECLASS_OB_void((p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20), (Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20)) @@ -5029,14 +5202,14 @@ namespace SourceHook #define SH__CALL_GET_VFNPTR_NORMAL \ using namespace ::SourceHook; \ MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(ptr, mfp, mfi); \ + GetFuncInfo(CCW::GRP(ptr), mfp, mfi); \ void *vfnptr = reinterpret_cast( \ *reinterpret_cast(reinterpret_cast(ptr) + mfi.thisptroffs + mfi.vtbloffs) + mfi.vtblindex); #define SH__CALL_GET_VFNPTR_MANUAL \ using namespace ::SourceHook; \ void *vfnptr = reinterpret_cast( \ - *reinterpret_cast( (reinterpret_cast(ptr) + thisptroffs + vtbloffs) ) + vtblidx); \ + *reinterpret_cast( (reinterpret_cast(CCW::GRP(ptr)) + thisptroffs + vtbloffs) ) + vtblidx); \ /* patch mfp */ \ *reinterpret_cast(&mfp) = *reinterpret_cast(vfnptr); @@ -5047,548 +5220,590 @@ namespace SourceHook // Support for 0 arguments template -SourceHook::ExecutableClass0 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass0::type, MFP, RetType> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass0(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass0::type, MFP, RetType>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass0 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)()const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass0::type, MFP, RetType> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)()const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass0(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass0::type, MFP, RetType>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass0 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass0( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 1 arguments template -SourceHook::ExecutableClass1 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass1::type, MFP, RetType, Param1> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass1(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass1::type, MFP, RetType, Param1>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass1 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass1::type, MFP, RetType, Param1> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass1(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass1::type, MFP, RetType, Param1>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass1 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass1( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 2 arguments template -SourceHook::ExecutableClass2 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass2::type, MFP, RetType, Param1, Param2> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass2(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass2::type, MFP, RetType, Param1, Param2>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass2 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass2::type, MFP, RetType, Param1, Param2> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass2(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass2::type, MFP, RetType, Param1, Param2>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass2 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass2( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 3 arguments template -SourceHook::ExecutableClass3 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass3::type, MFP, RetType, Param1, Param2, Param3> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass3(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass3::type, MFP, RetType, Param1, Param2, Param3>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass3 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass3::type, MFP, RetType, Param1, Param2, Param3> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass3(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass3::type, MFP, RetType, Param1, Param2, Param3>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass3 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass3( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 4 arguments template -SourceHook::ExecutableClass4 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass4::type, MFP, RetType, Param1, Param2, Param3, Param4> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass4(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass4::type, MFP, RetType, Param1, Param2, Param3, Param4>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass4 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass4::type, MFP, RetType, Param1, Param2, Param3, Param4> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass4(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass4::type, MFP, RetType, Param1, Param2, Param3, Param4>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass4 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass4( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 5 arguments template -SourceHook::ExecutableClass5 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass5::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass5(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass5::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass5 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass5::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass5(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass5::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass5 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass5( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 6 arguments template -SourceHook::ExecutableClass6 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass6::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass6(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass6::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass6 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass6::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass6(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass6::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass6 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass6( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 7 arguments template -SourceHook::ExecutableClass7 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass7::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass7(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass7::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass7 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass7::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass7(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass7::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass7 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass7( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 8 arguments template -SourceHook::ExecutableClass8 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass8::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass8(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass8::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass8 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass8::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass8(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass8::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass8 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass8( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 9 arguments template -SourceHook::ExecutableClass9 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass9::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass9(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass9::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass9 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass9::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass9(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass9::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass9 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass9( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 10 arguments template -SourceHook::ExecutableClass10 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass10::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass10(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass10::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass10 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass10::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass10(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass10::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass10 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass10( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 11 arguments template -SourceHook::ExecutableClass11 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass11::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass11(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass11::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass11 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass11::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass11(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass11::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass11 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass11( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 12 arguments template -SourceHook::ExecutableClass12 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass12::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass12(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass12::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass12 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass12::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass12(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass12::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass12 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass12( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 13 arguments template -SourceHook::ExecutableClass13 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass13::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass13(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass13::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass13 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass13::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass13(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass13::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass13 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass13( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 14 arguments template -SourceHook::ExecutableClass14 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass14::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass14(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass14::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass14 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass14::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass14(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass14::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass14 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass14( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 15 arguments template -SourceHook::ExecutableClass15 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass15::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass15(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass15::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass15 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass15::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass15(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass15::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass15 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass15( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 16 arguments template -SourceHook::ExecutableClass16 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass16::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass16(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass16::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass16 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass16::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass16(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass16::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass16 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass16( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 17 arguments template -SourceHook::ExecutableClass17 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass17::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass17(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass17::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass17 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass17::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass17(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass17::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass17 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass17( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 18 arguments template -SourceHook::ExecutableClass18 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass18::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass18(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass18::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass18 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass18::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass18(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass18::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass18 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass18( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 19 arguments template -SourceHook::ExecutableClass19 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass19::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass19(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass19::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass19 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass19::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass19(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass19::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass19 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass19( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } // Support for 20 arguments template -SourceHook::ExecutableClass20 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass20::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass20(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass20::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass20 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass20::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass20(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass20::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template SourceHook::ExecutableClass20 -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) +SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_MANUAL return SourceHook::ExecutableClass20( - reinterpret_cast(ptr), mfp, vfnptr, shptr); + reinterpret_cast(CCW::GRP(ptr)), mfp, vfnptr, shptr, plug); } @@ -5598,392 +5813,433 @@ SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Par // Support for 0 arguments template -SourceHook::ExecutableClass0 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass0::type, MFP, RetType> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass0(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass0::type, MFP, RetType>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass0 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass0::type, MFP, RetType> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass0(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass0::type, MFP, RetType>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 1 arguments template -SourceHook::ExecutableClass1 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass1::type, MFP, RetType, Param1> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass1(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass1::type, MFP, RetType, Param1>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass1 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass1::type, MFP, RetType, Param1> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass1(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass1::type, MFP, RetType, Param1>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 2 arguments template -SourceHook::ExecutableClass2 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass2::type, MFP, RetType, Param1, Param2> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass2(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass2::type, MFP, RetType, Param1, Param2>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass2 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass2::type, MFP, RetType, Param1, Param2> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass2(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass2::type, MFP, RetType, Param1, Param2>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 3 arguments template -SourceHook::ExecutableClass3 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass3::type, MFP, RetType, Param1, Param2, Param3> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass3(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass3::type, MFP, RetType, Param1, Param2, Param3>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass3 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass3::type, MFP, RetType, Param1, Param2, Param3> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass3(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass3::type, MFP, RetType, Param1, Param2, Param3>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 4 arguments template -SourceHook::ExecutableClass4 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass4::type, MFP, RetType, Param1, Param2, Param3, Param4> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass4(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass4::type, MFP, RetType, Param1, Param2, Param3, Param4>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass4 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass4::type, MFP, RetType, Param1, Param2, Param3, Param4> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass4(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass4::type, MFP, RetType, Param1, Param2, Param3, Param4>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 5 arguments template -SourceHook::ExecutableClass5 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass5::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass5(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass5::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass5 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass5::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass5(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass5::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 6 arguments template -SourceHook::ExecutableClass6 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass6::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass6(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass6::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass6 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass6::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass6(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass6::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 7 arguments template -SourceHook::ExecutableClass7 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass7::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass7(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass7::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass7 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass7::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass7(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass7::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 8 arguments template -SourceHook::ExecutableClass8 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass8::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass8(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass8::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass8 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass8::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass8(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass8::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 9 arguments template -SourceHook::ExecutableClass9 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass9::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass9(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass9::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass9 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass9::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass9(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass9::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 10 arguments template -SourceHook::ExecutableClass10 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass10::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass10(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass10::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass10 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass10::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass10(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass10::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 11 arguments template -SourceHook::ExecutableClass11 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass11::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass11(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass11::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass11 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass11::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass11(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass11::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 12 arguments template -SourceHook::ExecutableClass12 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass12::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass12(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass12::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass12 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass12::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass12(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass12::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 13 arguments template -SourceHook::ExecutableClass13 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass13::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass13(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass13::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass13 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass13::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass13(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass13::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 14 arguments template -SourceHook::ExecutableClass14 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass14::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass14(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass14::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass14 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass14::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass14(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass14::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 15 arguments template -SourceHook::ExecutableClass15 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass15::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass15(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass15::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass15 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass15::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass15(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass15::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 16 arguments template -SourceHook::ExecutableClass16 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass16::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass16(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass16::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass16 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass16::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass16(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass16::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 17 arguments template -SourceHook::ExecutableClass17 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass17::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass17(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass17::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass17 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass17::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass17(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass17::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 18 arguments template -SourceHook::ExecutableClass18 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass18::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass18(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass18::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass18 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass18::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass18(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass18::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 19 arguments template -SourceHook::ExecutableClass19 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass19::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass19(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass19::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass19 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass19::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass19(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass19::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } // Support for 20 arguments template -SourceHook::ExecutableClass20 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20, ...), SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass20::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20, ...), SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass20(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass20::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } template -SourceHook::ExecutableClass20 -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20, ...)const, SourceHook::ISourceHook *shptr) +SourceHook::ExecutableClass20::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20> +SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20, ...)const, SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) { SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClass20(ptr, mfp, vfnptr, shptr); + return SourceHook::ExecutableClass20::type, MFP, RetType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20>(CCW::GRP(ptr), + mfp, vfnptr, shptr, plug); } #endif -#define SH_CALL(ptr, mfp) SH_CALL2((ptr), (mfp), (mfp), SH_GLOB_SHPTR) -#define SH_MCALL2(ptr, mfp, vtblidx, vtbloffs, thisptroffs) SH_MCALL3((ptr), (mfp), (mfp), (vtblidx), (vtbloffs), (thisptroffs), SH_GLOB_SHPTR) +#define SH_CALL(ptr, mfp) SH_CALL2((ptr), (mfp), (mfp), SH_GLOB_SHPTR, SH_GLOB_PLUGPTR) +#define SH_MCALL2(ptr, mfp, vtblidx, vtbloffs, thisptroffs) SH_MCALL3((ptr), (mfp), (mfp), (vtblidx), (vtbloffs), (thisptroffs), SH_GLOB_SHPTR, SH_GLOB_PLUGPTR) #define SH_MCALL(ptr, mhookname) SH_MCALL2((ptr), SH_MFHCls(mhookname)::ECMFP(), SH_MFHCls(mhookname)::ms_MFI.vtblindex, \ SH_MFHCls(mhookname)::ms_MFI.vtbloffs, SH_MFHCls(mhookname)::ms_MFI.thisptroffs) #undef SH_MAKE_EXECUTABLECLASS_OB -#undef SH_MAKE_EXECUTABLECLASS_OB_void ////////////////////////////////////////////////////////////////////////// // SetOverrideRet and RecallGetIface for recalls