diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-05 00:46:19 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-05 00:46:19 +0300 |
commit | a8527496d9c8eb81710e718be7be8a9ae62a48b4 (patch) | |
tree | 962767f520dd3dea8f23fbd7161114fcab1431ff /modules/example/main.cpp | |
parent | 03951c212bc3054a6b89a9fff9a125bace52224d (diff) |
new file: api/core_services.h
modified: api/pluginapi.h
modified: core/main.cpp
modified: core/plugin.h
new file: core/sqlite3.dll
new file: lib/libsqlite3.a
new file: modules/dbsqlite/Makefile
new file: modules/dbsqlite/main.cpp
new file: modules/dbsqlite/sqlite3.h
modified: modules/example/main.cpp
Diffstat (limited to 'modules/example/main.cpp')
-rw-r--r-- | modules/example/main.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/example/main.cpp b/modules/example/main.cpp index 647654e..438e281 100644 --- a/modules/example/main.cpp +++ b/modules/example/main.cpp @@ -3,6 +3,8 @@ #include <pluginapi.h> //this is necessary, PLUGININFO structure, other related to load/unload plugin code #include <plugin_helper.h> //just helper, not necessary +#include <core_services.h> + PLUGINLINK *pluginLink; @@ -21,7 +23,7 @@ PLUGININFO pluginInfo = 0, //author 0, //author email PLUGIN_MAKE_VERSION(0,0,0,1), //version - GLOBAL_ACCESS_FLAG //flags + F_GLOBAL_ACCESS //flags }; extern "C" __declspec(dllexport) PLUGININFO* SetPluginInfo() @@ -33,12 +35,21 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) //basic initialisat { pluginLink = link; //necessary MessageBoxA(0, "Simple plugin initialisation done", "INFO", MB_OK); + TestService(); //only core servisec avaible in load return 0; //all ok, retrun 0 } 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 + CallService("Core/Test", 0, 0); //usage example of service registered in core + TestService(); //same as above, look in core_services.h + Shutdown(); //same as CallService("Core/Shutdown", 0, 0); ,this will shutdown program return 0; } +extern "C" int __declspec(dllexport) Unload() +{ + //close open files, databases, save settings in memory to db, e.t.c. here. + return 0; +} + |