From 49a77d77a9736f169fc99134765972f8f4b79dcd Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 3 Aug 2010 09:43:49 +0300 Subject: cool, services are working --- core/main.cpp | 5 ++--- modules/example/main.cpp | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/main.cpp b/core/main.cpp index db901c3..017ddcf 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -30,15 +30,14 @@ int main(int argc, char *argv[]) { (*p)->getFuncs().load(&link); } + CreateServiceFunction("GetPluginInfoList", (SERVICE)GetPluginInfoList); + CreateServiceFunction("Test", (SERVICE)Test); for(list::iterator p = plugins.begin(); p != plugins.end(); p++) { if((*p)->getFuncs().loaded) (*p)->getFuncs().loaded(); } - CreateServiceFunction("GetPluginInfoList", (SERVICE)GetPluginInfoList); - CreateServiceFunction("Test", (SERVICE)Test); CallService("GetPluginInfoList", 0, 0); - CallService("Test", 0, 0); for(;;) Sleep(1000); return 0; diff --git a/modules/example/main.cpp b/modules/example/main.cpp index 85ae212..1df2774 100644 --- a/modules/example/main.cpp +++ b/modules/example/main.cpp @@ -38,5 +38,6 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) //basic initialisat extern "C" int __declspec(dllexport) OnModulesLoaded() //load main code from here, all services from other plugins must be avaible here { MessageBoxA(0, "Advanced plugin features needed services from other plugins are working from now", "INFO", MB_OK); + CallService("Test", 0, 0); //usage example of service registered in core return 0; } -- cgit v1.2.3