summaryrefslogtreecommitdiff
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
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
-rw-r--r--bin10/lib/mir_core.libbin36730 -> 36960 bytes
-rw-r--r--bin10/lib/mir_core64.libbin33526 -> 33732 bytes
-rw-r--r--bin11/lib/mir_core.libbin36730 -> 36960 bytes
-rw-r--r--bin11/lib/mir_core64.libbin33526 -> 33732 bytes
-rw-r--r--include/delphi/m_core.inc3
-rw-r--r--include/m_core.h1
-rw-r--r--src/mir_core/mir_core.def1
-rw-r--r--src/mir_core/protos.cpp13
8 files changed, 18 insertions, 0 deletions
diff --git a/bin10/lib/mir_core.lib b/bin10/lib/mir_core.lib
index c91ae88aa6..8997fe9dd9 100644
--- a/bin10/lib/mir_core.lib
+++ b/bin10/lib/mir_core.lib
Binary files differ
diff --git a/bin10/lib/mir_core64.lib b/bin10/lib/mir_core64.lib
index d0d80964d2..8a267f612e 100644
--- a/bin10/lib/mir_core64.lib
+++ b/bin10/lib/mir_core64.lib
Binary files differ
diff --git a/bin11/lib/mir_core.lib b/bin11/lib/mir_core.lib
index b1a0f8e48c..14d30e8010 100644
--- a/bin11/lib/mir_core.lib
+++ b/bin11/lib/mir_core.lib
Binary files differ
diff --git a/bin11/lib/mir_core64.lib b/bin11/lib/mir_core64.lib
index 583d63393c..8a267f612e 100644
--- a/bin11/lib/mir_core64.lib
+++ b/bin11/lib/mir_core64.lib
Binary files differ
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc
index 2ab7632acc..c7f7dc6428 100644
--- a/include/delphi/m_core.inc
+++ b/include/delphi/m_core.inc
@@ -524,6 +524,9 @@ function mir_vsntprintf(buffer:pWideChar;count:size_t;fmt:pWideChar;va:va_list):
function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr; stdcall;
external CoreDLL name 'ProtoBroadcastAck';
+function ProtoCallService(const szModule, szName:PAnsiChar; wParam:WPARAM; lParam:LPARAM):int_ptr; stdcall;
+ external CoreDLL name 'ProtoServiceExists';
+
function ProtoServiceExists(const szModule, szName:PAnsiChar):int; stdcall;
external CoreDLL name 'ProtoServiceExists';
diff --git a/include/m_core.h b/include/m_core.h
index 7e3c4ea99f..1cb48af582 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -433,6 +433,7 @@ MIR_CORE_DLL(int) mir_vsntprintf(TCHAR *buffer, size_t count, const TCHAR* fm
///////////////////////////////////////////////////////////////////////////////
// protocol functions
+MIR_CORE_DLL(INT_PTR) ProtoCallService(const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam);
MIR_CORE_DLL(int) ProtoServiceExists(const char *szModule, const char *szService);
MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
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)