summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-08-29 19:28:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-08-29 19:28:47 +0300
commit634ded759c8208a62ea1ce4dd9bb5fa708ff0c33 (patch)
tree3b43e4205996717669737182455a423aeeb27b79 /src/mir_app
parent7bf8d7b243bb4d667b07c20858a15880b0625cce (diff)
fixes #1555 (Import shouldn't import .bak second time in service mode)
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/newplugins.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp
index 876ec44280..6be83b3358 100644
--- a/src/mir_app/src/newplugins.cpp
+++ b/src/mir_app/src/newplugins.cpp
@@ -578,6 +578,8 @@ int UnloadPlugin(wchar_t* buf, int bufLen)
/////////////////////////////////////////////////////////////////////////////////////////
// Service plugins functions
+static WPARAM g_srvWParam = 0, g_srvLParam = 0;
+
int LaunchServicePlugin(pluginEntry *p)
{
// plugin load failed - terminating Miranda
@@ -589,7 +591,7 @@ int LaunchServicePlugin(pluginEntry *p)
p->bLoaded = true;
}
- INT_PTR res = CallService(MS_SERVICEMODE_LAUNCH, 0, 0);
+ INT_PTR res = CallService(MS_SERVICEMODE_LAUNCH, g_srvWParam, g_srvLParam);
if (res != CALLSERVICE_NOTFOUND)
return res;
@@ -598,7 +600,7 @@ int LaunchServicePlugin(pluginEntry *p)
return SERVICE_FAILED;
}
-MIR_APP_DLL(int) SetServiceModePlugin(const wchar_t *wszPluginName)
+MIR_APP_DLL(int) SetServiceModePlugin(const wchar_t *wszPluginName, WPARAM wParam, LPARAM lParam)
{
size_t cbLen = mir_wstrlen(wszPluginName);
if (cbLen == 0)
@@ -607,6 +609,8 @@ MIR_APP_DLL(int) SetServiceModePlugin(const wchar_t *wszPluginName)
for (auto &p : servicePlugins) {
if (!wcsnicmp(p->pluginname, wszPluginName, cbLen)) {
plugin_service = p;
+ g_srvWParam = wParam;
+ g_srvLParam = lParam;
return 0;
}
}