From 9a44caeb992e365d747fa9f6900310f72785836a Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 3 Aug 2010 13:22:34 +0300 Subject: starting plugins in threads --- modules/example/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/example/main.cpp') diff --git a/modules/example/main.cpp b/modules/example/main.cpp index 1df2774..2e15520 100644 --- a/modules/example/main.cpp +++ b/modules/example/main.cpp @@ -1,4 +1,5 @@ #include +#include #include //this is necessary, PLUGININFO structure, other related to load/unload plugin code #include //just helper, not necessary @@ -28,7 +29,7 @@ extern "C" __declspec(dllexport) PLUGININFO* SetPluginInfo() return &pluginInfo; } -extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) //basic initialisation, registering new functions, do other basic initialisation +extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) //basic initialisation, registering new functions, do other basic initialisation, you can create infinite loop, or other code which use many time here, only fast basic initialisation { pluginLink = link; //necessary MessageBoxA(0, "Simple plugin initialisation done", "INFO", MB_OK); @@ -39,5 +40,6 @@ extern "C" int __declspec(dllexport) OnModulesLoaded() //load main code from her { 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 + std::list *pluglist = (std::list*)CallService("GetPluginInfoList", 0, 0); //get list with info for all plugins return 0; } -- cgit v1.2.3