diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-05 04:40:30 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-05 04:40:30 +0300 |
commit | 599d73442416d9bad663e4d0900265e073946600 (patch) | |
tree | c04b85575c0e26004233b8d57532590d32962c6f /modules/example | |
parent | 8784e4b981c88f051946ed4901f0b91dd0ded5b5 (diff) |
modified: ../dbsqlite/main.cpp
modified: main.cpp
Diffstat (limited to 'modules/example')
-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() |