summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-17 19:41:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-17 19:41:35 +0300
commit11e70d8c4e224d80015fffe0378c53abee5fd824 (patch)
tree8b21511f57aad4a9aaaa9391450cf5b83146a2f8 /plugins/SmileyAdd/src/main.cpp
parent0c12fe889baeced3e7d8c3f2558d10f563a43612 (diff)
Popup, PManagerEx, QuickContacts, RemovePersonalSettings, Restart, SeenPlugin, SendSS, ShlExt, SimpleAR, SimpleStatusMsg, SkypeStatusChange, SmileyAdd, SMS => CMPlugin
Diffstat (limited to 'plugins/SmileyAdd/src/main.cpp')
-rw-r--r--plugins/SmileyAdd/src/main.cpp25
1 files changed, 8 insertions, 17 deletions
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 <http://www.gnu.org/licenses/>.
#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;
-}