From 5dbe3cb375f54da70a80cf1a2cbc94836f82eeaa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 21 Jun 2013 13:54:41 +0000 Subject: 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 --- src/mir_core/protos.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mir_core/protos.cpp') 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) -- cgit v1.2.3