diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-20 15:56:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-20 15:56:25 +0000 |
commit | bfe1bd0fc087be44c70904aee0fe4276643d206d (patch) | |
tree | d5376d7cab1f6e5084a1449dc341c325b6cee45c /plugins/Dbx_tree/init.cpp | |
parent | 8593e7594773c30b35488bb6a45fcc782ed5df0c (diff) |
- db3x_mmap is completely moved to a class;
- the old nightmare in the core "How to detect a db plugin and load it" is eliminated forever;
- databases are the usual plugins now (loadable via Load)
- dynamic DATABASELINK registration
git-svn-id: http://svn.miranda-ng.org/main/trunk@1082 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_tree/init.cpp')
-rw-r--r-- | plugins/Dbx_tree/init.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/Dbx_tree/init.cpp b/plugins/Dbx_tree/init.cpp index 0ad9e6721b..eca96fac97 100644 --- a/plugins/Dbx_tree/init.cpp +++ b/plugins/Dbx_tree/init.cpp @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "Interface.h"
+#include "DatabaseLink.h"
HINSTANCE hInstance = NULL;
int hLangpack;
@@ -34,7 +35,7 @@ static PLUGININFOEX gPluginInfoEx = { sizeof(PLUGININFOEX),
gInternalNameLong,
gVersion,
- gDescription " - build " __DATE__ " @ " __TIME__,
+ gDescription,
gAutor,
gAutorEmail,
gCopyright,
@@ -43,11 +44,6 @@ static PLUGININFOEX gPluginInfoEx = { gGUID
};
-extern "C" __declspec(dllexport) DATABASELINK* DatabasePluginInfo(void * Reserved)
-{
- return &gDBLink;
-}
-
extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD MirandaVersion)
{
return &gPluginInfoEx;
@@ -58,7 +54,11 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_DATABAS extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&gPluginInfoEx);
- return 1;
+
+ RegisterDatabasePlugin(&gDBLink);
+ RegisterServices();
+ CompatibilityRegister();
+ return 0;
}
extern "C" __declspec(dllexport) int Unload(void)
@@ -66,7 +66,6 @@ extern "C" __declspec(dllexport) int Unload(void) return 0;
}
-
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserved)
{
hInstance = hInstDLL;
|