sourcehook/test/testbail.h
changeset 117 e322da4af2d2
parent 111 aec58c99dafc
child 162 a95db73792e5
     1.1 --- a/sourcehook/test/testbail.h	Thu Sep 29 23:05:01 2005 +0000
     1.2 +++ b/sourcehook/test/testbail.h	Mon Oct 03 17:20:22 2005 +0000
     1.3 @@ -31,6 +31,58 @@
     1.4  
     1.5  	SH_DECL_HOOK0_void(IGaben, EatYams, SH_NOATTRIB, 0);
     1.6  
     1.7 +	/*
     1.8 +	SHINT_MAKE_GENERICSTUFF_BEGIN(IGaben, EatYams, 0, (static_cast<void (IGaben::*)() SH_NOATTRIB>
     1.9 +		(&IGaben::EatYams)))
    1.10 +		typedef fastdelegate::FastDelegate0<> FD;
    1.11 +		virtual void Func()
    1.12 +		{
    1.13 +			// SH_HANDLEFUNC_void(IGaben, EatYams, (), ());
    1.14 +
    1.15 +			SH_SETUPCALLS_void((), ())
    1.16 +			SH_CALL_HOOKS_void(pre, ())
    1.17 +			if (status != MRES_SUPERCEDE)
    1.18 +			{
    1.19 +				void (EmptyClass::*mfp)();
    1.20 +				SH_SETUP_MFP(mfp);
    1.21 +				(reinterpret_cast<EmptyClass*>(ifinfo->GetPtr())->*mfp)();
    1.22 +			}
    1.23 +			SH_CALL_HOOKS_void(post, ())
    1.24 +			SH_RETURN_void()
    1.25 +		}
    1.26 +	};
    1.27 +	SH_FHCls(IGaben,EatYams,0) SH_FHCls(IGaben,EatYams,0)::ms_Inst;
    1.28 +	::SourceHook::MemFuncInfo SH_FHCls(IGaben,EatYams,0)::ms_MFI;
    1.29 +	::SourceHook::IHookManagerInfo *SH_FHCls(IGaben,EatYams,0)::ms_HI;
    1.30 +	const char *SH_FHCls(IGaben,EatYams,0)::ms_Proto = "SH_NOATTRIB";
    1.31 +	bool __SourceHook_FHAddIGabenEatYams(void *iface, bool post,
    1.32 +		SH_FHCls(IGaben,EatYams,0)::FD handler)
    1.33 +	{
    1.34 +		using namespace ::SourceHook;
    1.35 +		MemFuncInfo mfi;
    1.36 +		GetFuncInfo((static_cast<void (IGaben::*)() SH_NOATTRIB>(&IGaben::EatYams)), mfi);
    1.37 +		if (mfi.thisptroffs < 0)
    1.38 +			return false;
    1.39 +
    1.40 +		return SH_GLOB_SHPTR->AddHook(SH_GLOB_PLUGPTR, iface, mfi.thisptroffs,
    1.41 +			SH_FHCls(IGaben,EatYams,0)::HookManPubFunc,
    1.42 +			new CSHDelegate<SH_FHCls(IGaben,EatYams,0)::FD>(handler), post);
    1.43 +	}
    1.44 +	bool __SourceHook_FHRemoveIGabenEatYams(void *iface, bool post,
    1.45 +		SH_FHCls(IGaben,EatYams,0)::FD handler)
    1.46 +	{
    1.47 +		using namespace ::SourceHook;
    1.48 +		MemFuncInfo mfi;
    1.49 +		GetFuncInfo((static_cast<void (IGaben::*)() SH_NOATTRIB>(&IGaben::EatYams)), mfi);
    1.50 +		if (mfi.thisptroffs < 0)
    1.51 +			return false;
    1.52 +
    1.53 +		CSHDelegate<SH_FHCls(IGaben,EatYams,0)::FD> tmp(handler);
    1.54 +		return SH_GLOB_SHPTR->RemoveHook(SH_GLOB_PLUGPTR, iface, mfi.thisptroffs,
    1.55 +			SH_FHCls(IGaben,EatYams,0)::HookManPubFunc, &tmp, post);
    1.56 +	}
    1.57 +	*/
    1.58 +
    1.59  	void EatYams0_Handler()
    1.60  	{
    1.61  		ADD_STATE(State_EatYams_Handler_Called);