From 11e70d8c4e224d80015fffe0378c53abee5fd824 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 17 May 2018 19:41:35 +0300 Subject: Popup, PManagerEx, QuickContacts, RemovePersonalSettings, Restart, SeenPlugin, SendSS, ShlExt, SimpleAR, SimpleStatusMsg, SkypeStatusChange, SmileyAdd, SMS => CMPlugin --- plugins/SmileyAdd/src/main.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'plugins/SmileyAdd/src/main.cpp') diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index 05698d2c75..0d936dec12 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -20,11 +20,13 @@ along with this program. If not, see . #include "stdafx.h" // globals -HINSTANCE g_hInst; HANDLE hEvent1; HGENMENU hContactMenuItem; int hLangpack; +CMPlugin g_plugin; + +///////////////////////////////////////////////////////////////////////////////////////// static const PLUGININFOEX pluginInfoEx = { @@ -45,6 +47,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD /* mira return (PLUGININFOEX*)&pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + static IconItem icon = { LPGEN("Button smiley"), "SmileyAdd_ButtonSmiley", IDI_SMILINGICON }; static int ModulesLoaded(WPARAM, LPARAM) @@ -91,7 +95,7 @@ extern "C" __declspec(dllexport) int Load(void) InitImageCache(); - Icon_Register(g_hInst, MODULENAME, &icon, 1); + Icon_Register(g_plugin.getInst(), MODULENAME, &icon, 1); g_SmileyCategories.SetSmileyPackStore(&g_SmileyPacks); @@ -125,6 +129,8 @@ extern "C" __declspec(dllexport) int Load(void) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) int Unload(void) { RemoveDialogBoxHook(); @@ -142,18 +148,3 @@ extern "C" __declspec(dllexport) int Unload(void) DownloadClose(); return 0; } - -extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID /*lpvReserved*/) -{ - switch (fdwReason) { - case DLL_PROCESS_ATTACH: - g_hInst = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - break; - - case DLL_PROCESS_DETACH: - break; - } - - return TRUE; -} -- cgit v1.2.3