1.1 --- a/sourcehook/test/main.cpp Sat Apr 16 19:59:26 2005 +0000
1.2 +++ b/sourcehook/test/main.cpp Sat Apr 16 20:26:33 2005 +0000
1.3 @@ -359,7 +359,7 @@
1.4 };
1.5
1.6 // Sourcehook needs g_Plug and g_SHPtr, it will be customizable in the next release
1.7 -void *g_Plug = (void*)1337;
1.8 +int g_PLID = 1337;
1.9 SourceHook::ISourceHook *g_SHPtr;
1.10
1.11 SourceHook::CSourceHookImpl g_SHImpl;
1.12 @@ -465,6 +465,19 @@
1.13 printf("TEST2.8: Calling F16(155) through CC\n");
1.14 printf("Returned: %d\n", cc->F16(155) ? 1 : 0);
1.15 printf("TEST2.9: Removing pre hook\n");
1.16 + printf("TEST2.XX.1: Pausing the plugin\n");
1.17 + g_SHImpl.PausePlugin(g_PLID);
1.18 + printf("TEST2.XX.2: Calling F16(155)\n");
1.19 + printf("Returned: %d\n", zLOL_Ptr->F16(155) ? 1 : 0);
1.20 + printf("TEST2.XX.3: Calling F16(155) through CC\n");
1.21 + printf("Returned: %d\n", cc->F16(155) ? 1 : 0);
1.22 + printf("TEST2.XX.4: Unpausing the plugin\n");
1.23 + g_SHImpl.UnpausePlugin(g_PLID);
1.24 + printf("TEST2.XX.5: Calling F16(155)\n");
1.25 + printf("Returned: %d\n", zLOL_Ptr->F16(155) ? 1 : 0);
1.26 + printf("TEST2.XX.6: Calling F16(155) through CC\n");
1.27 + printf("Returned: %d\n", cc->F16(155) ? 1 : 0);
1.28 + printf("TEST2.9: Removing pre hook\n");
1.29 SH_REMOVE_HOOK_STATICFUNC(Test, F16, zLOL_Ptr, Test_F16_int_pre_handler, false);
1.30 printf("TEST2.10: Calling F16(155)\n");
1.31 printf("Returned: %d\n", zLOL_Ptr->F16(155) ? 1 : 0);