From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- plugins/SecureIM/src/commonheaders.h | 4 +--- plugins/SecureIM/src/main.cpp | 18 +++++++----------- 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'plugins/SecureIM/src') diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h index 6770296d73..75f2149272 100644 --- a/plugins/SecureIM/src/commonheaders.h +++ b/plugins/SecureIM/src/commonheaders.h @@ -64,9 +64,7 @@ struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULENAME) - {} + CMPlugin(); }; extern char TEMP[MAX_PATH]; diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index e40c7ca475..30a7c11db4 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -18,22 +18,15 @@ PLUGININFOEX pluginInfoEx = { { 0x1B2A39E5, 0xE2F6, 0x494D, { 0x95, 0x8D, 0x18, 0x08, 0xFD, 0x11, 0x0D, 0xD5 } } }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfoEx; } -///////////////////////////////////////////////////////////////////////////////////////// - -BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) -{ - if (dwReason == DLL_PROCESS_ATTACH) { - INITCOMMONCONTROLSEX icce = { sizeof(icce), ICC_LISTVIEW_CLASSES | ICC_TAB_CLASSES }; - InitCommonControlsEx(&icce); - } - return TRUE; -} - ///////////////////////////////////////////////////////////////////////////////////////// // basic events: onModuleLoad, onModulesLoad, onShutdown @@ -290,6 +283,9 @@ extern "C" __declspec(dllexport) int __cdecl Load(void) { mir_getLP(&pluginInfoEx); + INITCOMMONCONTROLSEX icce = { sizeof(icce), ICC_LISTVIEW_CLASSES | ICC_TAB_CLASSES }; + InitCommonControlsEx(&icce); + DisableThreadLibraryCalls(g_plugin.getInst()); char temp[MAX_PATH]; -- cgit v1.2.3