summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/YAMN/src/main.cpp')
-rw-r--r--plugins/YAMN/src/main.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index 7491051500..53ff5dbf6a 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -23,7 +23,6 @@ int YAMN_STATUS;
BOOL UninstallPlugins;
HANDLE hAccountFolder;
-HINSTANCE g_hInstance;
HINSTANCE *hDllPlugins;
static int iDllPlugins = 0;
@@ -70,6 +69,12 @@ static void GetProfileDirectory(wchar_t *szPath, int cbPath)
/////////////////////////////////////////////////////////////////////////////////////////
+CMPlugin g_plugin;
+
+extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
/////////////////////////////////////////////////////////////////////////////////////////
@@ -163,7 +168,7 @@ static IconItem iconList[] =
void LoadIcons()
{
- Icon_Register(g_hInstance, "YAMN", iconList, _countof(iconList));
+ Icon_Register(g_plugin.getInst(), "YAMN", iconList, _countof(iconList));
}
HANDLE WINAPI g_GetIconHandle(int idx)
@@ -354,18 +359,3 @@ extern "C" int __declspec(dllexport) Unload(void)
delete[] CodePageNamesSupp;
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-struct CMPlugin : public PLUGIN<CMPlugin>
-{
- CMPlugin() :
- PLUGIN<CMPlugin>(YAMN_DBMODULE)
- {
- RegisterProtocol(PROTOTYPE_VIRTUAL);
- SetUniqueId("Id");
- }
-}
- g_plugin;
-
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;