summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-21 13:54:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-21 13:54:41 +0000
commit5dbe3cb375f54da70a80cf1a2cbc94836f82eeaa (patch)
tree5ae44b3e03d3413592934e969e20adc172416179 /src
parent7d5fd04ca483e509bfa6d532b29af4d0322c0871 (diff)
new helper ProtoCallService - simply glues module & service name, and then simplyu calls CallService()
git-svn-id: http://svn.miranda-ng.org/main/trunk@5077 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/mir_core.def1
-rw-r--r--src/mir_core/protos.cpp13
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def
index 5631c9c335..4a57e3a945 100644
--- a/src/mir_core/mir_core.def
+++ b/src/mir_core/mir_core.def
@@ -163,3 +163,4 @@ mir_base64_encode @160
mir_base64_decode @161
ProtoServiceExists @162
ProtoBroadcastAck @163
+ProtoCallService @164
diff --git a/src/mir_core/protos.cpp b/src/mir_core/protos.cpp
index dfa83a1800..6f2309e412 100644
--- a/src/mir_core/protos.cpp
+++ b/src/mir_core/protos.cpp
@@ -58,6 +58,19 @@ MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, HANDLE hContact, i
/////////////////////////////////////////////////////////////////////////////////////////
+MIR_CORE_DLL(INT_PTR) ProtoCallService(const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam)
+{
+ if (szModule == NULL || szService == NULL)
+ return false;
+
+ char str[MAXMODULELABELLENGTH * 2];
+ strncpy_s(str,szModule,strlen(szModule));
+ strncat_s(str,szService,strlen(szService));
+ return CallService(str, wParam, lParam);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
MIR_CORE_DLL(int) ProtoServiceExists(const char *szModule, const char *szService)
{
if (szModule == NULL || szService == NULL)