From 599d73442416d9bad663e4d0900265e073946600 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Thu, 5 Aug 2010 04:40:30 +0300 Subject: modified: ../dbsqlite/main.cpp modified: main.cpp --- modules/example/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'modules/example/main.cpp') 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 //this is necessary, PLUGININFO structure, other related to load/unload plugin code #include //just helper, not necessary -#include +#include //services implemented in core #include //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() -- cgit v1.2.3