diff options
Diffstat (limited to 'modules/example/main.cpp')
-rw-r--r-- | modules/example/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/example/main.cpp b/modules/example/main.cpp index c416393..acc8eae 100644 --- a/modules/example/main.cpp +++ b/modules/example/main.cpp @@ -3,7 +3,7 @@ #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> +#include <core_services.h> //services implemented in core #include <db.h> //database support @@ -51,7 +51,13 @@ extern "C" int __declspec(dllexport) OnModulesLoaded() //load main code from her dat.wType = D_INT; dat.pData = (void*)123; dat.szSetting = (char*)"some_name"; - dbSetSetting((WPARAM)&pluginInfo, (LPARAM)&dat); + dbSetSetting((WPARAM)&pluginInfo, (LPARAM)&dat); //write integer to db + dat.szSetting = (char*)"useless"; + dbDeleteSetting((WPARAM)&pluginInfo, (LPARAM)&dat); //delete "useless" from db + dat.wType = D_STRING; + dat.szSetting = (char*)"some_string"; + dat.szModule = (char*)"some module shortName"; + dbGetSetting(0, (LPARAM)&dat); //retrieve "some_string" from "some modules shortName", or retrieve "some_string" from self if dat.szModules = 0 and WPARAM is PLUGININFO link (currently unimplemented in db plugin) return 0; } extern "C" int __declspec(dllexport) Unload() |