diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/main.cpp | 9 | ||||
-rw-r--r-- | core/plugin.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/core/main.cpp b/core/main.cpp index 3438d66..7e7586d 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -25,11 +25,15 @@ int main(int argc, char *argv[]) { if(LoadModules()) return 1; //something wrong - for(list<plugin*>::iterator p = plugins.begin(); p != plugins.end(); p++) + for(list<plugin*>::iterator p = plugins.begin(); p != plugins.end(); p++) //initializing plugins { - cout<<"Loaded plugin: "<<(*p)->getName()<<'\n'; (*p)->getFuncs().load(&link); } + for(list<plugin*>::iterator p = plugins.begin(); p != plugins.end(); p++) + { + if((*p)->getFuncs().loaded) + (*p)->getFuncs().loaded(); + } // CreateServiceFunction("GetPluginInfoList", GetPluginInfoList); for(;;) Sleep(1000); @@ -52,6 +56,7 @@ int LoadModules() hPlugin = LoadLibraryA(tmp); funcs.info = (SetPluginInfo)GetProcAddress(hPlugin, "SetPluginInfo"); funcs.load = (Load)GetProcAddress(hPlugin, "Load"); + funcs.loaded = (OnModulesLoaded)GetProcAddress(hPlugin, "OnModulesLoaded"); if(funcs.info && funcs.load) { PLUGININFO *pi = funcs.info(); diff --git a/core/plugin.h b/core/plugin.h index 01e59c9..f79c2de 100644 --- a/core/plugin.h +++ b/core/plugin.h @@ -6,6 +6,7 @@ typedef PLUGININFO * (__cdecl * SetPluginInfo) (); typedef int (__cdecl * Load) (PLUGINLINK *link); +typedef int (__cdecl * OnModulesLoaded) (); class plugin { @@ -14,6 +15,7 @@ public: { SetPluginInfo info; Load load; + OnModulesLoaded loaded; }; const HMODULE getHmodule(); const exported_funcs_s getFuncs(); |