diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/Db_autobackups/src | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/Db_autobackups/src')
-rw-r--r-- | plugins/Db_autobackups/src/main.cpp | 24 | ||||
-rw-r--r-- | plugins/Db_autobackups/src/stdafx.h | 4 |
2 files changed, 18 insertions, 10 deletions
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp index 2a58bc7140..6e1e4111f8 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -6,7 +6,9 @@ int &hLangpack(g_plugin.m_hLang); HANDLE hFolder;
char g_szMirVer[100];
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
@@ -19,6 +21,17 @@ PLUGININFOEX pluginInfo = { { 0x81c220a6, 0x226, 0x4ad6, { 0xbf, 0xca, 0x21, 0x7b, 0x17, 0xa1, 0x60, 0x53 } }
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULE, pluginInfoEx)
+{}
+
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
+{
+ return &pluginInfoEx;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
static INT_PTR ABService(WPARAM, LPARAM)
{
BackupStart(nullptr);
@@ -103,14 +116,9 @@ static int PreShutdown(WPARAM, LPARAM) return 0;
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfo;
-}
-
extern "C" __declspec(dllexport) int Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
Miranda_GetVersionText(g_szMirVer, sizeof(g_szMirVer));
@@ -129,6 +137,8 @@ extern "C" __declspec(dllexport) int Load(void) return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) int Unload(void)
{
return 0;
diff --git a/plugins/Db_autobackups/src/stdafx.h b/plugins/Db_autobackups/src/stdafx.h index 5152963200..e6acf25c7b 100644 --- a/plugins/Db_autobackups/src/stdafx.h +++ b/plugins/Db_autobackups/src/stdafx.h @@ -29,9 +29,7 @@ namespace fs = std::experimental::filesystem; struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULE)
- {}
+ CMPlugin();
};
#include "options.h"
|