summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-09-10 03:23:51 -0700
committerGeorge Hazan <ghazan@miranda.im>2022-09-10 03:23:51 -0700
commit6847777dfa98b0436a642277b757c3b09717817c (patch)
treefd042ecc582eb86a4ac29a3dfb50a31453a4e5da
parentf9bfb22761ce245be0681bec065d04388f586b72 (diff)
no need to export Miranda's offal to the outside world
-rw-r--r--include/m_extraicons.h2
-rw-r--r--include/m_fontservice.h4
-rw-r--r--include/m_genmenu.h5
-rw-r--r--include/m_hotkeys.h4
-rw-r--r--include/m_icolib.h4
-rw-r--r--include/m_skin.h4
-rw-r--r--libs/win32/mir_app.libbin227570 -> 225752 bytes
-rw-r--r--libs/win64/mir_app.libbin223672 -> 222010 bytes
-rw-r--r--plugins/MirLua/src/environment.cpp6
-rw-r--r--plugins/MirLua/src/plugin.cpp5
-rw-r--r--plugins/StatusManager/src/stdafx.h2
-rw-r--r--protocols/CloudFile/src/Services/dropbox_service.cpp10
-rw-r--r--protocols/CloudFile/src/Services/dropbox_service.h4
-rw-r--r--protocols/CloudFile/src/Services/google_service.cpp8
-rw-r--r--protocols/CloudFile/src/Services/google_service.h4
-rw-r--r--protocols/CloudFile/src/Services/microsoft_service.cpp8
-rw-r--r--protocols/CloudFile/src/Services/microsoft_service.h4
-rw-r--r--protocols/CloudFile/src/Services/yandex_service.cpp8
-rw-r--r--protocols/CloudFile/src/Services/yandex_service.h4
-rw-r--r--protocols/CloudFile/src/cloud_file.cpp9
-rw-r--r--protocols/CloudFile/src/cloud_file.h1
-rw-r--r--src/mir_app/src/CMPluginBase.cpp2
-rw-r--r--src/mir_app/src/FontOptions.cpp11
-rw-r--r--src/mir_app/src/ei_services.cpp2
-rw-r--r--src/mir_app/src/hotkeys.cpp2
-rw-r--r--src/mir_app/src/icolib.cpp2
-rw-r--r--src/mir_app/src/menu_utils.cpp6
-rw-r--r--src/mir_app/src/mir_app.def8
-rw-r--r--src/mir_app/src/mir_app64.def8
-rw-r--r--src/mir_app/src/miranda.h20
-rw-r--r--src/mir_app/src/popupOption.cpp2
-rw-r--r--src/mir_app/src/sounds.cpp2
-rw-r--r--src/mir_app/src/srmm_statusicon.cpp2
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp2
34 files changed, 58 insertions, 107 deletions
diff --git a/include/m_extraicons.h b/include/m_extraicons.h
index bba14908cc..d49e31367a 100644
--- a/include/m_extraicons.h
+++ b/include/m_extraicons.h
@@ -101,8 +101,6 @@ struct EXTRAICON_INFO
LPARAM onClickParam;
};
-EXTERN_C MIR_APP_DLL(void) KillModuleExtraIcons(HPLUGIN pPlugin);
-
#pragma warning(disable:4505)
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_fontservice.h b/include/m_fontservice.h
index 05c4730dab..bb156bd07e 100644
--- a/include/m_fontservice.h
+++ b/include/m_fontservice.h
@@ -218,8 +218,4 @@ EXTERN_C MIR_APP_DLL(int) Effect_GetW(const wchar_t *wszGroup, const wchar_t *sz
// wparam = lparam = 0
#define ME_EFFECT_RELOAD "Effect/Reload"
-EXTERN_C MIR_APP_DLL(void) KillModuleFonts(HPLUGIN);
-EXTERN_C MIR_APP_DLL(void) KillModuleColours(HPLUGIN);
-EXTERN_C MIR_APP_DLL(void) KillModuleEffects(HPLUGIN);
-
#endif // _FONT_SERVICE_API_INC
diff --git a/include/m_genmenu.h b/include/m_genmenu.h
index 5bd1d3b84f..3a9a23195f 100644
--- a/include/m_genmenu.h
+++ b/include/m_genmenu.h
@@ -252,10 +252,5 @@ __forceinline int Menu_ConfigureItem(HGENMENU hMenu, int iSetting, LPCSTR pszVal
EXTERN_C MIR_APP_DLL(HGENMENU) Menu_GetProtocolRoot(PROTO_INTERFACE *pThis);
-/////////////////////////////////////////////////////////////////////////////////////////
-// kills all menu items & submenus that belong to the language id given
-
-EXTERN_C MIR_APP_DLL(void) KillModuleMenus(HPLUGIN pPlugin);
-
#endif // M_GENMENU_H__
diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h
index 61728eca8b..1b9152d12f 100644
--- a/include/m_hotkeys.h
+++ b/include/m_hotkeys.h
@@ -86,8 +86,4 @@ EXTERN_C MIR_APP_DLL(void) Hotkey_Unsubclass(HWND hwndEdit);
#define ME_HOTKEYS_CHANGED "CoreHotkeys/Changed"
-/////////////////////////////////////////////////////////////////////////////////////////
-
-EXTERN_C MIR_APP_DLL(void) KillModuleHotkeys(HPLUGIN pPlugin);
-
#endif // M_HOTKEYS_H__
diff --git a/include/m_icolib.h b/include/m_icolib.h
index a732a8a320..07255a5a4b 100644
--- a/include/m_icolib.h
+++ b/include/m_icolib.h
@@ -122,10 +122,6 @@ MIR_APP_DLL(int) ImageList_AddProtoIcon(HIMAGELIST hIml, const char *szProto, in
#define ME_SKIN_ICONSCHANGED "Skin/IconsChanged"
-///////////////////////////////////////////////////////////////////////////////
-
-MIR_APP_DLL(void) KillModuleIcons(HPLUGIN pPlugin);
-
#if defined(__cplusplus)
}
#endif
diff --git a/include/m_skin.h b/include/m_skin.h
index d40848c3bd..7727910f3a 100644
--- a/include/m_skin.h
+++ b/include/m_skin.h
@@ -133,10 +133,6 @@ EXTERN_C MIR_APP_DLL(int) Skin_PlaySound(const char *name);
EXTERN_C MIR_APP_DLL(int) Skin_PlaySoundFile(const wchar_t *pwszFileName);
/////////////////////////////////////////////////////////////////////////////////////////
-
-EXTERN_C MIR_APP_DLL(void) KillModuleSounds(HPLUGIN);
-
-/////////////////////////////////////////////////////////////////////////////////////////
// wParam: 0 when playing sound (1 when sound is being previewed)
// lParam: (wchar_t*) pszSoundFile
// Affect: This hook is fired when the sound module needs to play a sound
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 649d08771d..72427341a7 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index 81024ccfa7..eaa2e47d40 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/MirLua/src/environment.cpp b/plugins/MirLua/src/environment.cpp
index 2c34af11bd..7d8319746d 100644
--- a/plugins/MirLua/src/environment.cpp
+++ b/plugins/MirLua/src/environment.cpp
@@ -5,6 +5,7 @@
extern PLUGININFOEX pluginInfoEx;
EXTERN_C MIR_APP_DLL(void) RegisterPlugin(CMPluginBase *pPlugin);
+EXTERN_C MIR_APP_DLL(void) UnregisterPlugin(CMPluginBase *pPlugin);
CMLuaEnvironment::CMLuaEnvironment(lua_State *L) :
CMPluginBase(nullptr, pluginInfoEx), L(L)
@@ -15,10 +16,7 @@ CMLuaEnvironment::CMLuaEnvironment(lua_State *L) :
int CMLuaEnvironment::Unload()
{
- KillModuleIcons(this);
- KillModuleSounds(this);
- KillModuleMenus(this);
- KillModuleHotkeys(this);
+ ::UnregisterPlugin(this);
KillObjectEventHooks(this);
KillObjectServices(this);
diff --git a/plugins/MirLua/src/plugin.cpp b/plugins/MirLua/src/plugin.cpp
index 70cd628fab..9376355a7f 100644
--- a/plugins/MirLua/src/plugin.cpp
+++ b/plugins/MirLua/src/plugin.cpp
@@ -76,11 +76,6 @@ void CMPlugin::UnloadLua()
lua_close(L);
}
-
- KillModuleIcons(this);
- KillModuleSounds(this);
- KillModuleMenus(this);
- KillModuleHotkeys(this);
}
void CMPlugin::ReloadLuaScripts()
diff --git a/plugins/StatusManager/src/stdafx.h b/plugins/StatusManager/src/stdafx.h
index 4d348ca203..03afaef415 100644
--- a/plugins/StatusManager/src/stdafx.h
+++ b/plugins/StatusManager/src/stdafx.h
@@ -40,7 +40,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
- bool bMirandaLoaded;
+ bool bMirandaLoaded = false;
int Load() override;
int Unload() override;
diff --git a/protocols/CloudFile/src/Services/dropbox_service.cpp b/protocols/CloudFile/src/Services/dropbox_service.cpp
index 46a096df0b..805a7f2800 100644
--- a/protocols/CloudFile/src/Services/dropbox_service.cpp
+++ b/protocols/CloudFile/src/Services/dropbox_service.cpp
@@ -8,10 +8,10 @@ struct CMPluginDropbox : public PLUGIN<CMPluginDropbox>
{
m_hInst = g_plugin.getInst();
- RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CDropboxService::Init, (pfnUninitProto)CDropboxService::UnInit);
+ RegisterProtocol(PROTOTYPE_PROTOWITHACCS, CDropboxService::Init, CDropboxService::UnInit);
}
}
-g_pluginDropbox;
+ g_pluginDropbox;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -21,16 +21,16 @@ CDropboxService::CDropboxService(const char *protoName, const wchar_t *userName)
m_hProtoIcon = g_plugin.getIconHandle(IDI_DROPBOX);
}
-CDropboxService* CDropboxService::Init(const char *moduleName, const wchar_t *userName)
+PROTO_INTERFACE* CDropboxService::Init(const char *moduleName, const wchar_t *userName)
{
CDropboxService *proto = new CDropboxService(moduleName, userName);
Services.insert(proto);
return proto;
}
-int CDropboxService::UnInit(CDropboxService *proto)
+int CDropboxService::UnInit(PROTO_INTERFACE *proto)
{
- Services.remove(proto);
+ Services.remove((CDropboxService *)proto);
delete proto;
return 0;
}
diff --git a/protocols/CloudFile/src/Services/dropbox_service.h b/protocols/CloudFile/src/Services/dropbox_service.h
index b6c5a7dfcd..5166a9c17c 100644
--- a/protocols/CloudFile/src/Services/dropbox_service.h
+++ b/protocols/CloudFile/src/Services/dropbox_service.h
@@ -21,8 +21,8 @@ private:
public:
CDropboxService(const char *protoName, const wchar_t *userName);
- static CDropboxService* Init(const char *szModuleName, const wchar_t *szUserName);
- static int UnInit(CDropboxService*);
+ static PROTO_INTERFACE* Init(const char *szModuleName, const wchar_t *szUserName);
+ static int UnInit(PROTO_INTERFACE *);
const char* GetModuleName() const override;
diff --git a/protocols/CloudFile/src/Services/google_service.cpp b/protocols/CloudFile/src/Services/google_service.cpp
index c7498d936c..58b32eaa7f 100644
--- a/protocols/CloudFile/src/Services/google_service.cpp
+++ b/protocols/CloudFile/src/Services/google_service.cpp
@@ -9,7 +9,7 @@ struct CMPluginGoogle : public CMPluginBase
{
m_hInst = g_plugin.getInst();
- RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CGDriveService::Init, (pfnUninitProto)CGDriveService::UnInit);
+ RegisterProtocol(PROTOTYPE_PROTOWITHACCS, CGDriveService::Init, CGDriveService::UnInit);
}
}
g_pluginGoogle;
@@ -22,16 +22,16 @@ CGDriveService::CGDriveService(const char *protoName, const wchar_t *userName) :
m_hProtoIcon = g_plugin.getIconHandle(IDI_GDRIVE);
}
-CGDriveService* CGDriveService::Init(const char *moduleName, const wchar_t *userName)
+PROTO_INTERFACE* CGDriveService::Init(const char *moduleName, const wchar_t *userName)
{
CGDriveService *proto = new CGDriveService(moduleName, userName);
Services.insert(proto);
return proto;
}
-int CGDriveService::UnInit(CGDriveService *proto)
+int CGDriveService::UnInit(PROTO_INTERFACE *proto)
{
- Services.remove(proto);
+ Services.remove((CGDriveService*)proto);
delete proto;
return 0;
}
diff --git a/protocols/CloudFile/src/Services/google_service.h b/protocols/CloudFile/src/Services/google_service.h
index 919babb86f..7133ab9a52 100644
--- a/protocols/CloudFile/src/Services/google_service.h
+++ b/protocols/CloudFile/src/Services/google_service.h
@@ -20,8 +20,8 @@ private:
public:
CGDriveService(const char *protoName, const wchar_t *userName);
- static CGDriveService* Init(const char *szModuleName, const wchar_t *szUserName);
- static int UnInit(CGDriveService*);
+ static PROTO_INTERFACE* Init(const char *szModuleName, const wchar_t *szUserName);
+ static int UnInit(PROTO_INTERFACE*);
const char* GetModuleName() const override;
diff --git a/protocols/CloudFile/src/Services/microsoft_service.cpp b/protocols/CloudFile/src/Services/microsoft_service.cpp
index 1c74d469e8..8d63f4a23f 100644
--- a/protocols/CloudFile/src/Services/microsoft_service.cpp
+++ b/protocols/CloudFile/src/Services/microsoft_service.cpp
@@ -8,7 +8,7 @@ struct CMPluginOnedrive : public CMPluginBase
{
m_hInst = g_plugin.getInst();
- RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)COneDriveService::Init, (pfnUninitProto)COneDriveService::UnInit);
+ RegisterProtocol(PROTOTYPE_PROTOWITHACCS, COneDriveService::Init, COneDriveService::UnInit);
}
}
g_pluginOnedrive;
@@ -21,16 +21,16 @@ COneDriveService::COneDriveService(const char *protoName, const wchar_t *userNam
m_hProtoIcon = g_plugin.getIconHandle(IDI_ONEDRIVE);
}
-COneDriveService* COneDriveService::Init(const char *moduleName, const wchar_t *userName)
+PROTO_INTERFACE* COneDriveService::Init(const char *moduleName, const wchar_t *userName)
{
COneDriveService *proto = new COneDriveService(moduleName, userName);
Services.insert(proto);
return proto;
}
-int COneDriveService::UnInit(COneDriveService *proto)
+int COneDriveService::UnInit(PROTO_INTERFACE *proto)
{
- Services.remove(proto);
+ Services.remove((COneDriveService *)proto);
delete proto;
return 0;
}
diff --git a/protocols/CloudFile/src/Services/microsoft_service.h b/protocols/CloudFile/src/Services/microsoft_service.h
index d993410003..b8fe3c2bde 100644
--- a/protocols/CloudFile/src/Services/microsoft_service.h
+++ b/protocols/CloudFile/src/Services/microsoft_service.h
@@ -19,8 +19,8 @@ private:
public:
COneDriveService(const char *protoName, const wchar_t *userName);
- static COneDriveService* Init(const char *szModuleName, const wchar_t *szUserName);
- static int UnInit(COneDriveService*);
+ static PROTO_INTERFACE* Init(const char *szModuleName, const wchar_t *szUserName);
+ static int UnInit(PROTO_INTERFACE *);
const char* GetModuleName() const override;
diff --git a/protocols/CloudFile/src/Services/yandex_service.cpp b/protocols/CloudFile/src/Services/yandex_service.cpp
index 739d8a2722..f21e9ef2e0 100644
--- a/protocols/CloudFile/src/Services/yandex_service.cpp
+++ b/protocols/CloudFile/src/Services/yandex_service.cpp
@@ -8,7 +8,7 @@ struct CMPluginYandex : public CMPluginBase
{
m_hInst = g_plugin.getInst();
- RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CYandexService::Init, (pfnUninitProto)CYandexService::UnInit);
+ RegisterProtocol(PROTOTYPE_PROTOWITHACCS, CYandexService::Init, CYandexService::UnInit);
}
}
g_pluginYandex;
@@ -21,16 +21,16 @@ CYandexService::CYandexService(const char *protoName, const wchar_t *userName) :
m_hProtoIcon = g_plugin.getIconHandle(IDI_YADISK);
}
-CYandexService* CYandexService::Init(const char *moduleName, const wchar_t *userName)
+PROTO_INTERFACE* CYandexService::Init(const char *moduleName, const wchar_t *userName)
{
CYandexService *proto = new CYandexService(moduleName, userName);
Services.insert(proto);
return proto;
}
-int CYandexService::UnInit(CYandexService *proto)
+int CYandexService::UnInit(PROTO_INTERFACE *proto)
{
- Services.remove(proto);
+ Services.remove((CYandexService*)proto);
delete proto;
return 0;
}
diff --git a/protocols/CloudFile/src/Services/yandex_service.h b/protocols/CloudFile/src/Services/yandex_service.h
index 0fdcdf679a..c83a49f22c 100644
--- a/protocols/CloudFile/src/Services/yandex_service.h
+++ b/protocols/CloudFile/src/Services/yandex_service.h
@@ -20,8 +20,8 @@ private:
public:
CYandexService(const char *protoName, const wchar_t *userName);
- static CYandexService* Init(const char *szModuleName, const wchar_t *szUserName);
- static int UnInit(CYandexService*);
+ static PROTO_INTERFACE* Init(const char *szModuleName, const wchar_t *szUserName);
+ static int UnInit(PROTO_INTERFACE *);
const char* GetModuleName() const override;
diff --git a/protocols/CloudFile/src/cloud_file.cpp b/protocols/CloudFile/src/cloud_file.cpp
index 6cd398adb3..81e2c37a2b 100644
--- a/protocols/CloudFile/src/cloud_file.cpp
+++ b/protocols/CloudFile/src/cloud_file.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
-CCloudService::CCloudService(const char *protoName, const wchar_t *userName, HPLUGIN pPlugin)
- : PROTO<CCloudService>(protoName, userName),
+CCloudService::CCloudService(const char *protoName, const wchar_t *userName, HPLUGIN pPlugin) :
+ PROTO<CCloudService>(protoName, userName),
m_pPlugin(pPlugin)
{
NETLIBUSER nlu = {};
@@ -19,11 +19,6 @@ CCloudService::~CCloudService()
m_hConnection = nullptr;
}
-void CCloudService::OnErase()
-{
- KillModuleMenus(m_pPlugin);
-}
-
HPLUGIN CCloudService::GetId() const
{
return m_pPlugin;
diff --git a/protocols/CloudFile/src/cloud_file.h b/protocols/CloudFile/src/cloud_file.h
index 1e70671054..f02589c2bd 100644
--- a/protocols/CloudFile/src/cloud_file.h
+++ b/protocols/CloudFile/src/cloud_file.h
@@ -24,7 +24,6 @@ protected:
virtual void HandleHttpError(NETLIBHTTPREQUEST *response);
virtual void HandleJsonError(JSONNode &node) = 0;
- void OnErase() override;
void OnModulesLoaded() override;
JSONNode GetJsonResponse(NETLIBHTTPREQUEST *response);
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp
index ee5628f1d0..bc768335a2 100644
--- a/src/mir_app/src/CMPluginBase.cpp
+++ b/src/mir_app/src/CMPluginBase.cpp
@@ -106,8 +106,6 @@ static void wipePluginData(CMPluginBase *pPlugin)
KillModuleMenus(pPlugin);
KillModuleFonts(pPlugin);
- KillModuleColours(pPlugin);
- KillModuleEffects(pPlugin);
KillModuleIcons(pPlugin);
KillModuleHotkeys(pPlugin);
KillModulePopups(pPlugin);
diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp
index 3bd772ae77..071da22914 100644
--- a/src/mir_app/src/FontOptions.cpp
+++ b/src/mir_app/src/FontOptions.cpp
@@ -84,8 +84,9 @@ void notifyOptions()
SetTimer(hwndFontOptions, 1, 100, nullptr);
}
-MIR_APP_DLL(void) KillModuleFonts(HPLUGIN pPlugin)
+void KillModuleFonts(CMPluginBase *pPlugin)
{
+ // kill fonts
for (auto &it : font_id_list.rev_iter())
if (it->pPlugin == pPlugin) {
font_id_list.removeItem(&it);
@@ -99,10 +100,8 @@ MIR_APP_DLL(void) KillModuleFonts(HPLUGIN pPlugin)
for (auto &it : font_id_list_w3.rev_iter())
if (it->pPlugin == pPlugin)
font_id_list_w3.removeItem(&it);
-}
-MIR_APP_DLL(void) KillModuleColours(HPLUGIN pPlugin)
-{
+ // kill colors
for (auto &it : colour_id_list.rev_iter())
if (it->pPlugin == pPlugin) {
colour_id_list.removeItem(&it);
@@ -116,10 +115,8 @@ MIR_APP_DLL(void) KillModuleColours(HPLUGIN pPlugin)
for (auto &it : colour_id_list_w3.rev_iter())
if (it->pPlugin == pPlugin)
colour_id_list_w3.removeItem(&it);
-}
-MIR_APP_DLL(void) KillModuleEffects(HPLUGIN pPlugin)
-{
+ // kill effects
for (auto &it : effect_id_list.rev_iter())
if (it->pPlugin == pPlugin) {
effect_id_list.removeItem(&it);
diff --git a/src/mir_app/src/ei_services.cpp b/src/mir_app/src/ei_services.cpp
index fa6bbd21e1..9f41eb4679 100644
--- a/src/mir_app/src/ei_services.cpp
+++ b/src/mir_app/src/ei_services.cpp
@@ -185,7 +185,7 @@ static void ResetSlots(BaseExtraIcon *extra, ExtraIconGroup *group, int iOldSlot
}
}
-MIR_APP_DLL(void) KillModuleExtraIcons(HPLUGIN pPlugin)
+void KillModuleExtraIcons(CMPluginBase *pPlugin)
{
LIST<ExtraIcon> arIcons(1);
diff --git a/src/mir_app/src/hotkeys.cpp b/src/mir_app/src/hotkeys.cpp
index da631b75ae..336bf3602e 100644
--- a/src/mir_app/src/hotkeys.cpp
+++ b/src/mir_app/src/hotkeys.cpp
@@ -282,7 +282,7 @@ void RegisterHotkeys()
}
}
-MIR_APP_DLL(void) KillModuleHotkeys(HPLUGIN pPlugin)
+void KillModuleHotkeys(CMPluginBase *pPlugin)
{
for (auto &it : hotkeys.rev_iter())
if (it->pPlugin == pPlugin)
diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp
index 86d551e9eb..aaccc00fd1 100644
--- a/src/mir_app/src/icolib.cpp
+++ b/src/mir_app/src/icolib.cpp
@@ -607,7 +607,7 @@ MIR_APP_DLL(void) IcoLib_RemoveIconByHandle(HANDLE hIcoLib)
}
}
-MIR_APP_DLL(void) KillModuleIcons(HPLUGIN pPlugin)
+void KillModuleIcons(CMPluginBase *pPlugin)
{
if (!bModuleInitialized)
return;
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp
index c5c83d1a26..12df821386 100644
--- a/src/mir_app/src/menu_utils.cpp
+++ b/src/mir_app/src/menu_utils.cpp
@@ -661,13 +661,13 @@ MIR_APP_DLL(int) Menu_RemoveItem(HGENMENU hMenuItem)
struct KillMenuItemsParam
{
- KillMenuItemsParam(HPLUGIN _pPlugin) :
+ KillMenuItemsParam(CMPluginBase *_pPlugin) :
pPlugin(_pPlugin),
arItems(10)
{
}
- HPLUGIN pPlugin;
+ CMPluginBase *pPlugin;
LIST<TMO_IntMenuItem> arItems;
};
@@ -678,7 +678,7 @@ int KillMenuItems(TMO_IntMenuItem *pimi, KillMenuItemsParam* param)
return FALSE;
}
-MIR_APP_DLL(void) KillModuleMenus(HPLUGIN pPlugin)
+void KillModuleMenus(CMPluginBase *pPlugin)
{
if (!bIsGenMenuInited)
return;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 3bb3706b0b..9e7f962980 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -128,7 +128,6 @@ Proto_ChainSend @139
Proto_IsProtoOnContact @140
Proto_RegisterModule @141
Proto_RemoveFromContact @142
-KillModuleMenus @198
Utils_ReplaceVars @199
Utils_ReplaceVarsW @200
Menu_ShowItem @201
@@ -171,13 +170,6 @@ ExtraIcon_SetIconByName @238
ExtraIcon_Clear @239
ExtraIcon_RegisterCallback @240
ExtraIcon_RegisterIcolib @241
-KillModuleIcons @242
-KillModuleColours @243
-KillModuleEffects @244
-KillModuleExtraIcons @245
-KillModuleFonts @246
-KillModuleHotkeys @247
-KillModuleSounds @248
IsPluginLoaded @249
Clist_GroupBuildMenu @250
Clist_GroupCreate @251
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 3f49b78264..0f48f3e0f2 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -128,7 +128,6 @@ Proto_ChainSend @139
Proto_IsProtoOnContact @140
Proto_RegisterModule @141
Proto_RemoveFromContact @142
-KillModuleMenus @198
Utils_ReplaceVars @199
Utils_ReplaceVarsW @200
Menu_ShowItem @201
@@ -171,13 +170,6 @@ ExtraIcon_SetIconByName @238
ExtraIcon_Clear @239
ExtraIcon_RegisterCallback @240
ExtraIcon_RegisterIcolib @241
-KillModuleIcons @242
-KillModuleColours @243
-KillModuleEffects @244
-KillModuleExtraIcons @245
-KillModuleFonts @246
-KillModuleHotkeys @247
-KillModuleSounds @248
IsPluginLoaded @249
Clist_GroupBuildMenu @250
Clist_GroupCreate @251
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h
index 97aee60c7b..b3dd931124 100644
--- a/src/mir_app/src/miranda.h
+++ b/src/mir_app/src/miranda.h
@@ -63,18 +63,28 @@ int LaunchServicePlugin(pluginEntry *p);
void InitPathVar(void);
+/**** plugins.cpp **********************************************************************/
+
+void KillModuleAccounts(HINSTANCE);
+
+void KillModuleExtraIcons(CMPluginBase *pPlugin);
+void KillModuleFonts(CMPluginBase *pPlugin);
+void KillModuleHotkeys(CMPluginBase *pPlugin);
+void KillModuleIcons(CMPluginBase *pPlugin);
+void KillModuleMenus(CMPluginBase *pPlugin);
+void KillModulePopups(CMPluginBase *pPlugin);
+void KillModuleSounds(CMPluginBase *pPlugin);
+void KillModuleSrmmIcons(CMPluginBase *pPlugin);
+void KillModuleToolbarIcons(CMPluginBase *pPlugin);
+
/**** popupOptions.cpp *****************************************************************/
int PopupOptionsInit(WPARAM);
-void KillModulePopups(HPLUGIN);
/**** srmm.cpp *************************************************************************/
#define SRMM_MODULE "SRMsg"
-void KillModuleSrmmIcons(HPLUGIN);
-void KillModuleToolbarIcons(HPLUGIN);
-
/**** utf.cpp **************************************************************************/
__forceinline char* Utf8DecodeA(const char* src)
@@ -174,8 +184,6 @@ void WriteDbAccounts(void);
void InitStaticAccounts();
-void KillModuleAccounts(HINSTANCE);
-
INT_PTR CallProtoServiceInt(MCONTACT hContact, const char* szModule, const char* szService, WPARAM wParam, LPARAM lParam);
INT_PTR stubChainRecv(WPARAM, LPARAM);
diff --git a/src/mir_app/src/popupOption.cpp b/src/mir_app/src/popupOption.cpp
index 95323b8ca6..6749ba4e9c 100644
--- a/src/mir_app/src/popupOption.cpp
+++ b/src/mir_app/src/popupOption.cpp
@@ -60,7 +60,7 @@ int CMPluginBase::addPopupOption(const wchar_t *pwszDescr, CMOption<bool> &pVal)
return 0;
}
-void KillModulePopups(HPLUGIN pPlugin)
+void KillModulePopups(CMPluginBase *pPlugin)
{
for (auto &it : g_arOptions.rev_iter())
if (it->m_plugin == pPlugin)
diff --git a/src/mir_app/src/sounds.cpp b/src/mir_app/src/sounds.cpp
index d8911ffd9a..54b8b00ca6 100644
--- a/src/mir_app/src/sounds.cpp
+++ b/src/mir_app/src/sounds.cpp
@@ -363,7 +363,7 @@ static int SkinOptionsInit(WPARAM wParam, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(void) KillModuleSounds(HPLUGIN pPlugin)
+void KillModuleSounds(CMPluginBase *pPlugin)
{
bool bFound = false;
diff --git a/src/mir_app/src/srmm_statusicon.cpp b/src/mir_app/src/srmm_statusicon.cpp
index ff7105bfb2..1324a30eb7 100644
--- a/src/mir_app/src/srmm_statusicon.cpp
+++ b/src/mir_app/src/srmm_statusicon.cpp
@@ -259,7 +259,7 @@ MIR_APP_DLL(void) Srmm_ClickStatusIcon(MCONTACT hContact, const StatusIconClickD
/////////////////////////////////////////////////////////////////////////////////////////
-void KillModuleSrmmIcons(HPLUGIN pPlugin)
+void KillModuleSrmmIcons(CMPluginBase *pPlugin)
{
for (auto &it : arIcons.rev_iter())
if (it->pPlugin == pPlugin)
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 93e9c3d8c8..f833ea16f9 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -815,7 +815,7 @@ MIR_APP_DLL(int) Srmm_RemoveButton(BBButton *bbdi)
/////////////////////////////////////////////////////////////////////////////////////////
-void KillModuleToolbarIcons(HPLUGIN pPlugin)
+void KillModuleToolbarIcons(CMPluginBase *pPlugin)
{
int oldCount = arButtonsList.getCount();