sourcehook/test/sourcehook_test.h
branchhookman_autogen
changeset 455 deec66cea8cc
parent 432 f26dd3e3030b
     1.1 --- a/sourcehook/test/sourcehook_test.h	Fri Nov 09 21:14:37 2007 +0000
     1.2 +++ b/sourcehook/test/sourcehook_test.h	Sat Nov 10 16:10:55 2007 +0000
     1.3 @@ -34,3 +34,16 @@
     1.4  void Test_UnloadPlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug);
     1.5  void Test_PausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug);
     1.6  void Test_UnpausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug);
     1.7 +
     1.8 +SourceHook::IHookManagerAutoGen *Test_HMAG_Factory(SourceHook::ISourceHook *pSHPtr);
     1.9 +void Test_HMAG_Delete(SourceHook::IHookManagerAutoGen *ptr);
    1.10 +
    1.11 +struct CHMAGAutoDestruction
    1.12 +{
    1.13 +	SourceHook::IHookManagerAutoGen *m_Ptr;
    1.14 +	CHMAGAutoDestruction(SourceHook::IHookManagerAutoGen *ptr) : m_Ptr(ptr) {}
    1.15 +	~CHMAGAutoDestruction() { Test_HMAG_Delete(m_Ptr); }
    1.16 +};
    1.17 +
    1.18 +
    1.19 +#define GET_HMAG(var, shptr) var = Test_HMAG_Factory(shptr); CHMAGAutoDestruction __hmagautodestruction(var);