summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-10-26 14:38:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-10-26 14:38:37 +0000
commit222cd09a54fa24a87614addbc6f68781f5344299 (patch)
tree79c09a1eb5df0bf805a110299b8606bbea1996e3 /src/mir_app
parent618febeffb16eaf488517671b26a2810b66ac7f6 (diff)
IsPluginLoaded - a function to detect if plugin is loaded
git-svn-id: http://svn.miranda-ng.org/main/trunk@15619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/newplugins.cpp14
3 files changed, 16 insertions, 0 deletions
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index c61b7bdcbc..d82042dec2 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -247,3 +247,4 @@ KillModuleExtraIcons @245
KillModuleFonts @246
KillModuleHotkeys @247
KillModuleSounds @248
+IsPluginLoaded @249
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 42779c7546..9cfc6c404d 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -247,3 +247,4 @@ KillModuleExtraIcons @245
KillModuleFonts @246
KillModuleHotkeys @247
KillModuleSounds @248
+IsPluginLoaded @249
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp
index 496e1184ae..f44872363c 100644
--- a/src/mir_app/src/newplugins.cpp
+++ b/src/mir_app/src/newplugins.cpp
@@ -218,6 +218,20 @@ MIR_APP_DLL(int) GetPluginLangId(const MUUID &uuid, int _hLang)
return 0;
}
+MIR_APP_DLL(int) IsPluginLoaded(const MUUID &uuid)
+{
+ for (int i = 0; i < pluginList.getCount(); i++) {
+ pluginEntry *p = pluginList[i];
+ if (!p->bpi.hInst)
+ continue;
+
+ if (equalUUID(p->bpi.pluginInfo->uuid, uuid))
+ return true;
+ }
+
+ return false;
+}
+
static bool validInterfaceList(MUUID *piface)
{
if (piface == NULL)