diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-03 09:43:49 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-03 09:43:49 +0300 |
commit | 49a77d77a9736f169fc99134765972f8f4b79dcd (patch) | |
tree | 36f9b7422511cf01c6a33953533627748fe1ce12 | |
parent | 848d632ce9e1bc7ae076c1ea561d997641ae2b87 (diff) |
cool, services are working
-rw-r--r-- | core/main.cpp | 5 | ||||
-rw-r--r-- | 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<plugin*>::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; } |