From 57edbfdb0eea5ca07e8052f576c52a4fd9398204 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 21 Jun 2013 15:11:57 +0000 Subject: fix for regression in rev. 5010 git-svn-id: http://svn.miranda-ng.org/main/trunk@5080 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Alarms/src/alarmlist.cpp | 5 +- plugins/BossKeyPlus/src/BossKey.cpp | 2 +- plugins/CSList/src/cslist.cpp | 2 +- plugins/Clist_modern/src/modern_clistmod.cpp | 2 +- plugins/Clist_modern/src/modern_statusbar.cpp | 2 +- plugins/Clist_mw/src/clcitems.cpp | 2 +- plugins/Clist_mw/src/clistmod.cpp | 2 +- plugins/Clist_mw/src/clistopts.cpp | 2 +- plugins/Clist_nicer/src/clcitems.cpp | 2 +- plugins/Clist_nicer/src/clui.cpp | 4 +- plugins/MetaContacts/src/meta_services.cpp | 17 +++--- plugins/ModernOpt/src/mopt_selector.cpp | 6 +- plugins/New_GPG/src/main.cpp | 4 +- plugins/New_GPG/src/messages.cpp | 6 +- plugins/New_GPG/src/utilities.cpp | 4 +- plugins/Ping/src/pingthread.cpp | 4 +- plugins/SMS/src/send.cpp | 4 +- plugins/Scriver/src/chat/window.cpp | 14 ++--- plugins/TabSRMM/src/chat/window.cpp | 85 +++++++++++++-------------- src/modules/protocols/protocols.cpp | 5 +- src/modules/protocols/protoint.cpp | 75 +++++++++++------------ 21 files changed, 118 insertions(+), 131 deletions(-) diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index 0076292e50..73fa940a61 100644 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -452,8 +452,7 @@ static LRESULT CALLBACK PopupAlarmDlgProc(HWND hWnd, UINT message, WPARAM wParam switch(message) { case WM_COMMAND: // snooze if (HIWORD(wParam) == STN_CLICKED) { //It was a click on the Popup. - ALARM *mpd = NULL; - mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd); + ALARM *mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, 0); if (mpd->flags & ALF_NOSNOOZE) return TRUE; @@ -490,7 +489,7 @@ static LRESULT CALLBACK PopupAlarmDlgProc(HWND hWnd, UINT message, WPARAM wParam return TRUE; case UM_FREEPLUGINDATA: - ALARM *mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd); + ALARM *mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, 0); if (mpd > 0) { free_alarm_data(mpd); delete mpd; diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 622a20cda9..d155536a5e 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -266,7 +266,7 @@ static int ChangeAllProtoStatuses(unsigned statusMode, TCHAR *msg) if (g_wMask & OPT_SETONLINEBACK){ // need to save old statuses & status messages oldStatus[i] = status; if (ProtoServiceExists(proto[i]->szModuleName, PS_GETMYAWAYMSG)) - oldStatusMsg[i] = (TCHAR*)CallProtoService(proto[i]->szModuleName, PS_GETMYAWAYMSG, 0, SGMA_TCHAR); + oldStatusMsg[i] = (TCHAR*)ProtoCallService(proto[i]->szModuleName, PS_GETMYAWAYMSG, 0, SGMA_TCHAR); else oldStatusMsg[i] = GetDefStatusMsg(status, proto[i]->szModuleName); } diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 0ce1c3f5cd..dd417c6160 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -207,7 +207,7 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName) else return; ics.status = &statusToSet; - CallProtoService(szAccName, PS_SETCUSTOMSTATUSEX, 0, (LPARAM)&ics); + ProtoCallService(szAccName, PS_SETCUSTOMSTATUSEX, 0, (LPARAM)&ics); } INT_PTR showList(WPARAM wparam, LPARAM lparam, LPARAM param) diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index 87fa738081..291ed4ac4c 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -110,7 +110,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) int result = -1; if ( ProtoServiceExists(szActProto, PS_GETADVANCEDSTATUSICON)) - result = CallProtoService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0); + result = ProtoCallService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0); if (result == -1 || !(LOWORD(result))) { //Get normal Icon diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index b18c3c5008..7f4033bfe7 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -382,7 +382,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if ((p.xStatusMode & 3)) { if (p.ProtoStatus > ID_STATUS_OFFLINE) { if ( ProtoServiceExists(p.AccountName, PS_GETCUSTOMSTATUSICON)) - p.extraIcon = (HICON)CallProtoService(p.AccountName, PS_GETCUSTOMSTATUSICON, 0, 0); + p.extraIcon = (HICON)ProtoCallService(p.AccountName, PS_GETCUSTOMSTATUSICON, 0, 0); if (p.extraIcon && (p.xStatusMode & 3) == 3) w += GetSystemMetrics(SM_CXSMICON)+1; } diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index 19c9c139aa..35e76d189d 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -135,7 +135,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group group->cl.items[i]->subcontacts = NULL; if ( ProtoServiceExists(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON)) - img = CallProtoService(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0); + img = ProtoCallService(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0); if (img == -1 || !(LOWORD(img))) img = CallService(MS_CLIST_GETCONTACTICON,(WPARAM)hContact,0); diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index 1b3181d095..a859352a18 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -62,7 +62,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) } if ( ProtoServiceExists(szActProto, PS_GETADVANCEDSTATUSICON)) - result = CallProtoService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0); + result = ProtoCallService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0); if (result == -1 || !(LOWORD(result))) // result == -1 means no Advanced icon. LOWORD(result) == 0 happens when Advanced icon returned by ICQ (i.e. no transpot) diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index 2fe399d467..2f77d6b109 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -140,7 +140,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)TranslateT("Global")); SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,0); for ( i = 0; i < count; i++ ) { - if ( !IsAccountEnabled( accs[i] ) || CallProtoService( accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0 ) == 0 ) + if ( !IsAccountEnabled(accs[i]) || CallProtoService(accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0) continue; item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)accs[i]->tszAccountName); diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 6bc3a2a65f..0952f744e7 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -274,7 +274,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) CUSTOM_STATUS cst = { sizeof(cst) }; cst.flags = CSSF_MASK_STATUS; cst.status = &xStatus; - if (ProtoServiceExists(szProto, PS_GETCUSTOMSTATUSEX) && !CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, (WPARAM)hContact, (LPARAM)&cst) && xStatus > 0) { + if (ProtoServiceExists(szProto, PS_GETCUSTOMSTATUSEX) && !ProtoCallService(szProto, PS_GETCUSTOMSTATUSEX, (WPARAM)hContact, (LPARAM)&cst) && xStatus > 0) { cst.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR; cst.wParam = &xStatus2; cst.ptszName = xStatusName; diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 2b346b8ccc..b76cd24a80 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1386,7 +1386,7 @@ skipbg: if (contactOK) { char *szProto = GetContactProto(hContact); if (ProtoServiceExists(szProto, item->szService)) - CallProtoService(szProto, item->szService, wwParam, llParam); + ProtoCallService(szProto, item->szService, wwParam, llParam); else serviceFailure = TRUE; } @@ -1710,7 +1710,7 @@ buttons_done: CUSTOM_STATUS cst = { sizeof(cst) }; cst.flags = CSSF_MASK_STATUS; cst.status = &xStatus; - if (ProtoServiceExists(pd->RealName, PS_GETCUSTOMSTATUSEX) && !CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cst) && xStatus > 0) + if (ProtoServiceExists(pd->RealName, PS_GETCUSTOMSTATUSEX) && !ProtoCallService(pd->RealName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cst) && xStatus > 0) hIcon = (HICON)CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSICON, 0, LR_SHARED); // get OWN xStatus icon (if set) else hIcon = LoadSkinnedProtoIcon(szProto, status); diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp index bcbb6dcd19..6bd121f736 100755 --- a/plugins/MetaContacts/src/meta_services.cpp +++ b/plugins/MetaContacts/src/meta_services.cpp @@ -413,7 +413,7 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam) DWORD flags = pre->flags; ccs->hContact = hMeta; pre->flags |= (db_get_b(hMeta, META_PROTO, "WindowOpen", 0) ? 0 : PREF_CREATEREAD); - if (ProtoServiceExists(proto, PSR_MESSAGE) && !CallProtoService(proto, PSR_MESSAGE, 0, (LPARAM)ccs)) + if (ProtoServiceExists(proto, PSR_MESSAGE) && !ProtoCallService(proto, PSR_MESSAGE, 0, (LPARAM)ccs)) added = TRUE; ccs->hContact = hSub; pre->flags = flags; @@ -465,18 +465,16 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam) CCSDATA *ccs = (CCSDATA*)lParam; PROTORECVEVENT *pre = (PROTORECVEVENT *) ccs->lParam; - char *proto = GetContactProto(ccs->hContact); - // contact is not a meta proto contact - just leave it + char *proto = GetContactProto(ccs->hContact); if ( !proto || strcmp(proto, META_PROTO)) return 0; if (options.use_proto_recv) { // use the subcontact's protocol to add the db if possible (AIMOSCAR removes HTML here!) HANDLE most_online = Meta_GetMostOnline(ccs->hContact); - char *proto = GetContactProto(most_online); - if (proto) - if (CallProtoService(proto, PSR_MESSAGE, wParam, lParam) != CALLSERVICE_NOTFOUND) + if (char *subProto = GetContactProto(most_online)) + if ( ProtoCallService(subProto, PSR_MESSAGE, wParam, lParam) != CALLSERVICE_NOTFOUND) return 0; } @@ -839,7 +837,7 @@ INT_PTR Meta_UserIsTyping(WPARAM wParam, LPARAM lParam) char *proto = GetContactProto(most_online); if (proto) if ( ProtoServiceExists(proto, PSS_USERISTYPING)) - CallProtoService(proto, PSS_USERISTYPING, (WPARAM)most_online, (LPARAM)lParam); + ProtoCallService(proto, PSS_USERISTYPING, (WPARAM)most_online, (LPARAM)lParam); return 0; } @@ -1249,9 +1247,10 @@ INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) { AI->hContact = hSub; - int result = CallProtoService(proto, PS_GETAVATARINFOT, wParam, lParam); + INT_PTR result = ProtoCallService(proto, PS_GETAVATARINFOT, wParam, lParam); AI->hContact = hMeta; - if (result != CALLSERVICE_NOTFOUND) return result; + if (result != CALLSERVICE_NOTFOUND) + return result; } return GAIR_NOAVATAR; // fail } diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index 73316f82a0..515e23f8f6 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -27,13 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static void sttApplySkin(MODERNOPTOBJECT *obj, TCHAR *fn) { - CallProtoService(obj->lpzThemeModuleName, TS_SKIN_APPLY, NULL, (LPARAM)fn); + ProtoCallService(obj->lpzThemeModuleName, TS_SKIN_APPLY, NULL, (LPARAM)fn); } static TCHAR *sttGetActiveSkin(MODERNOPTOBJECT *obj) { return ProtoServiceExists(obj->lpzThemeModuleName, TS_SKIN_ACTIVE) ? - (TCHAR*)CallProtoService(obj->lpzThemeModuleName, TS_SKIN_ACTIVE, 0, 0) : 0; + (TCHAR*)ProtoCallService(obj->lpzThemeModuleName, TS_SKIN_ACTIVE, 0, 0) : 0; } static void sttPreviewSkin(MODERNOPTOBJECT *obj, TCHAR *fn, LPDRAWITEMSTRUCT lps) @@ -41,7 +41,7 @@ static void sttPreviewSkin(MODERNOPTOBJECT *obj, TCHAR *fn, LPDRAWITEMSTRUCT lps if (!fn) return; if ( ProtoServiceExists(obj->lpzThemeModuleName, TS_SKIN_PREVIEW)) { - CallProtoService(obj->lpzThemeModuleName, TS_SKIN_PREVIEW, (WPARAM)lps, (LPARAM)fn); + ProtoCallService(obj->lpzThemeModuleName, TS_SKIN_PREVIEW, (WPARAM)lps, (LPARAM)fn); return; } diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 9ea00ce899..41d568f8fa 100644 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -2287,7 +2287,7 @@ void InitCheck() for(int i = 0; i < count; i++) if( ProtoServiceExists(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY)) - CallProtoService(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY, 0, (LPARAM)&cap); + ProtoCallService(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY, 0, (LPARAM)&cap); } if(bFileTransfers) { @@ -2302,7 +2302,7 @@ void InitCheck() for(int i = 0; i < count; i++) if( ProtoServiceExists(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY)) - CallProtoService(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY, 0, (LPARAM)&cap); + ProtoCallService(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY, 0, (LPARAM)&cap); } } diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index a7239171b0..5c702b7484 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -561,7 +561,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) { ICQ_CUSTOMCAP cap = {0}; strcpy(cap.caps, "GPG AutoExchange"); - if(CallProtoService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) { + if(ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) { CallContactService(ccs->hContact, PSS_MESSAGE, PREF_UTF, (LPARAM)"-----PGP KEY REQUEST-----"); return 0; } @@ -880,12 +880,12 @@ int HookSendMsg(WPARAM w, LPARAM l) debuglog<flags & DBEF_UTF) ? PREF_UTF : 0, (LPARAM)"-----PGP KEY REQUEST-----"); diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index ef34f756bc..a7aee1a7cf 100644 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -546,11 +546,11 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) bool cap_found = false, supported_proto = false; if(uin) { - if(ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) { + if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) { supported_proto = true; ICQ_CUSTOMCAP cap = {0}; strcpy(cap.caps, "GPG FileTransfer"); - if(CallProtoService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) + if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) cap_found = true; } } diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 5e13f0b9b0..bf9372c0fa 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -72,13 +72,13 @@ void SetProtoStatus(char *pszLabel, char *pszProto, int if_status, int new_statu } } else { if(ProtoServiceExists(pszProto, PS_GETSTATUS)) { - if(CallProtoService(pszProto, PS_GETSTATUS, 0, 0) == if_status) { + if(ProtoCallService(pszProto, PS_GETSTATUS, 0, 0) == if_status) { if(options.logging) { char buf[1024]; mir_snprintf(buf, 1024, Translate("%s - setting status of protocol '%s' (%d)"), pszLabel, pszProto, new_status); CallService(PLUG "/Log", (WPARAM)buf, 0); } - CallProtoService(pszProto, PS_SETSTATUS, new_status, 0); + ProtoCallService(pszProto, PS_SETSTATUS, new_status, 0); } } } diff --git a/plugins/SMS/src/send.cpp b/plugins/SMS/src/send.cpp index ed40d645c6..f843707d15 100644 --- a/plugins/SMS/src/send.cpp +++ b/plugins/SMS/src/send.cpp @@ -66,9 +66,9 @@ void StartSmsSend(HWND hWndDlg,SIZE_T dwModuleIndex,LPWSTR lpwszPhone,SIZE_T dwP SendSMSWindowDbeiSet(hWndDlg,pdbei); char *szProto = ssSMSSettings.ppaSMSAccounts[dwModuleIndex]->szModuleName; - if (ProtoServiceExists(szProto, MS_ICQ_SENDSMS)) { + if ( ProtoServiceExists(szProto, MS_ICQ_SENDSMS)) { WideCharToMultiByte(CP_UTF8,0,lpwszMessageXMLEncoded,dwMessageXMLEncodedSize,lpszMessageUTF,dwMessageUTFBuffSize,NULL,NULL); - hProcess = (HANDLE)CallProtoService(szProto, MS_ICQ_SENDSMS, (WPARAM)szPhone,(LPARAM)lpszMessageUTF); + hProcess = (HANDLE)ProtoCallService(szProto, MS_ICQ_SENDSMS, (WPARAM)szPhone,(LPARAM)lpszMessageUTF); SendSMSWindowHProcessSet(hWndDlg,hProcess); } else MEMFREE(pdbei); diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 9baf53f490..25a9d74adb 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -815,14 +815,14 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESS // wParam = roomID parentdat->ptszID // lParam = userID ui1->pszUID if ( ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) - ti.lpszText=(TCHAR*)CallProtoService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID); + ti.lpszText = (TCHAR*)ProtoCallService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID); else { - TCHAR ptszBuf[ 1024 ]; - mir_sntprintf( ptszBuf, SIZEOF(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"), - TranslateT( "Nick name" ), ui1->pszNick, - TranslateT( "Unique id" ), ui1->pszUID, - TranslateT( "Status" ), TM_WordToString( parentdat->pStatuses, ui1->Status )); - ti.lpszText = mir_tstrdup( ptszBuf ); + TCHAR ptszBuf[1024]; + mir_sntprintf(ptszBuf, SIZEOF(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"), + TranslateT("Nick name"), ui1->pszNick, + TranslateT("Unique id"), ui1->pszUID, + TranslateT("Status"), TM_WordToString( parentdat->pStatuses, ui1->Status)); + ti.lpszText = mir_tstrdup(ptszBuf); } } diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 8700c05e3e..6f9beeffd2 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1411,12 +1411,10 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESS static int currentHovered = -1; static HWND hwndToolTip = NULL; static HWND oldParent = NULL; - TOOLINFO ti = {0}; - RECT clientRect; - BOOL bNewTip = FALSE; - USERINFO *ui1 = NULL; - if (hoveredItem == currentHovered) return; + if (hoveredItem == currentHovered) + return; + currentHovered = hoveredItem; if (oldParent != hwnd && hwndToolTip) { @@ -1424,50 +1422,49 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESS DestroyWindow(hwndToolTip); hwndToolTip = NULL; } - if (hoveredItem == -1) { + if (hoveredItem == -1) { SendMessage(hwndToolTip, TTM_ACTIVATE, 0, 0); + return; + } - } else { - - if (!hwndToolTip) { - hwndToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, - WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hwnd, NULL, g_hInst, NULL); - bNewTip = TRUE; - } - - GetClientRect(hwnd, &clientRect); - ti.cbSize = sizeof(TOOLINFO); - ti.uFlags = TTF_SUBCLASS; - ti.hinst = g_hInst; - ti.hwnd = hwnd; - ti.uId = 1; - ti.rect = clientRect; - - ti.lpszText = NULL; + BOOL bNewTip = FALSE; + if (!hwndToolTip) { + hwndToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, + WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + hwnd, NULL, g_hInst, NULL); + bNewTip = TRUE; + } - ui1 = SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, currentHovered); - if (ui1) { - if ( ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) - ti.lpszText = (TCHAR*)CallProtoService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID); - else { - TCHAR ptszBuf[ 1024 ]; - mir_sntprintf( ptszBuf, SIZEOF(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"), - TranslateT("Nick name"), ui1->pszNick, - TranslateT("Unique Id"), ui1->pszUID, - TranslateT("Status"), TM_WordToString( parentdat->pStatuses, ui1->Status )); - ti.lpszText = mir_tstrdup( ptszBuf ); - } + RECT clientRect; + GetClientRect(hwnd, &clientRect); + + TOOLINFO ti = { sizeof(ti) }; + ti.uFlags = TTF_SUBCLASS; + ti.hinst = g_hInst; + ti.hwnd = hwnd; + ti.uId = 1; + ti.rect = clientRect; + + TCHAR ptszBuf[1024]; + + USERINFO *ui1 = SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, currentHovered); + if (ui1) { + if ( ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) + ti.lpszText = (TCHAR*)ProtoCallService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID); + else { + mir_sntprintf(ptszBuf, SIZEOF(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"), + TranslateT("Nick name"), ui1->pszNick, + TranslateT("Unique Id"), ui1->pszUID, + TranslateT("Status"), TM_WordToString( parentdat->pStatuses, ui1->Status)); + ti.lpszText = ptszBuf; } - - SendMessage(hwndToolTip, bNewTip ? TTM_ADDTOOL : TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); - SendMessage(hwndToolTip, TTM_ACTIVATE, (ti.lpszText != NULL) , 0); - SendMessage(hwndToolTip, TTM_SETMAXTIPWIDTH, 0 , 400); - if (ti.lpszText) - mir_free(ti.lpszText); } + + SendMessage(hwndToolTip, bNewTip ? TTM_ADDTOOL : TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); + SendMessage(hwndToolTip, TTM_ACTIVATE, (ti.lpszText != NULL) , 0); + SendMessage(hwndToolTip, TTM_SETMAXTIPWIDTH, 0 , 400); } /* @@ -1843,7 +1840,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, ti.cbSize = sizeof(ti); if (ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) - _tcsncpy(ptszBuf, (TCHAR*)CallProtoService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID), SIZEOF(ptszBuf)); + _tcsncpy(ptszBuf, (TCHAR*)ProtoCallService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID), SIZEOF(ptszBuf)); else mir_sntprintf(ptszBuf, SIZEOF(ptszBuf), _T("%s:\t%s\n%s:\t%s\n%s:\t%s"), TranslateT("Nick"), ui1->pszNick, diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp index 24aef1670e..426bf039fb 100644 --- a/src/modules/protocols/protocols.cpp +++ b/src/modules/protocols/protocols.cpp @@ -65,7 +65,6 @@ LIST filters(10, CompareProtos2); //------------------------------------------------------------------------------------ -INT_PTR __fastcall MyCallProtoService(const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam); void FreeFilesMatrix(TCHAR ***files); PROTOCOLDESCRIPTOR* __fastcall Proto_IsProtocolLoaded(const char* szProtoName) @@ -565,7 +564,7 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s psra->lastName = (PROTOCHAR*)mir_u2a(psr->lastName); psra->email = (PROTOCHAR*)mir_u2a(psr->email); - INT_PTR res = MyCallProtoService(szModule, szService, wParam, (LPARAM)psra); + INT_PTR res = ProtoCallService(szModule, szService, wParam, (LPARAM)psra); mir_free(psra->nick); mir_free(psra->firstName); @@ -576,7 +575,7 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s } } - INT_PTR res = MyCallProtoService(szModule, szService, wParam, lParam); + INT_PTR res = ProtoCallService(szModule, szService, wParam, lParam); if (res == CALLSERVICE_NOTFOUND && pa && pa->bOldProto && pa->ppro && strchr(szService, 'W')) { TServiceListItem *item = serviceItems.find((TServiceListItem*)&szService); diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp index 1c80a97565..83c9d1dac5 100644 --- a/src/modules/protocols/protoint.cpp +++ b/src/modules/protocols/protoint.cpp @@ -44,53 +44,46 @@ void FreeFilesMatrix(TCHAR ***files) *files = NULL; } -INT_PTR __fastcall MyCallProtoService(const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam) -{ - char str[MAXMODULELABELLENGTH]; - mir_snprintf(str, sizeof(str), "%s%s", szModule, szService); - return CallService(str, wParam, lParam); -} - struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE { HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr) { - return (HANDLE)MyCallProtoService(m_szModuleName, PS_ADDTOLIST, flags, (LPARAM)psr); + return (HANDLE)ProtoCallService(m_szModuleName, PS_ADDTOLIST, flags, (LPARAM)psr); } HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { - return (HANDLE)MyCallProtoService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), (LPARAM)hDbEvent); + return (HANDLE)ProtoCallService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), (LPARAM)hDbEvent); } int __cdecl Authorize(HANDLE hContact) { - return (int)MyCallProtoService(m_szModuleName, PS_AUTHALLOW, (WPARAM)hContact, 0); + return (int)ProtoCallService(m_szModuleName, PS_AUTHALLOW, (WPARAM)hContact, 0); } int __cdecl AuthDeny(HANDLE hContact, const TCHAR* szReason) { - return (int)MyCallProtoService(m_szModuleName, PS_AUTHDENY, (WPARAM)hContact, (LPARAM)StrConvA(szReason)); + return (int)ProtoCallService(m_szModuleName, PS_AUTHDENY, (WPARAM)hContact, (LPARAM)StrConvA(szReason)); } int __cdecl AuthRecv(HANDLE hContact, PROTORECVEVENT* evt) { CCSDATA ccs = { hContact, PSR_AUTH, 0, (LPARAM)evt }; - return (int)MyCallProtoService(m_szModuleName, PSR_AUTH, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSR_AUTH, 0, (LPARAM)&ccs); } int __cdecl AuthRequest(HANDLE hContact, const TCHAR* szMessage) { CCSDATA ccs = { hContact, PSS_AUTHREQUEST, 0, (LPARAM)szMessage }; ccs.lParam = (LPARAM)mir_t2a(szMessage); - int res = (int)MyCallProtoService(m_szModuleName, PSS_AUTHREQUEST, 0, (LPARAM)&ccs); + int res = (int)ProtoCallService(m_szModuleName, PSS_AUTHREQUEST, 0, (LPARAM)&ccs); mir_free((char*)ccs.lParam); return res; } HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData) { - return (HANDLE)MyCallProtoService(m_szModuleName, PS_CHANGEINFO, iInfoType, (LPARAM)pInfoData); + return (HANDLE)ProtoCallService(m_szModuleName, PS_CHANGEINFO, iInfoType, (LPARAM)pInfoData); } HANDLE __cdecl FileAllow(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath) @@ -98,7 +91,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE CCSDATA ccs = { hContact, PSS_FILEALLOW, (WPARAM)hTransfer, (LPARAM)szPath }; ccs.lParam = (LPARAM)mir_t2a(szPath); - HANDLE res = (HANDLE)MyCallProtoService(m_szModuleName, PSS_FILEALLOW, 0, (LPARAM)&ccs); + HANDLE res = (HANDLE)ProtoCallService(m_szModuleName, PSS_FILEALLOW, 0, (LPARAM)&ccs); mir_free((char*)ccs.lParam); return res; } @@ -106,7 +99,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE int __cdecl FileCancel(HANDLE hContact, HANDLE hTransfer) { CCSDATA ccs = { hContact, PSS_FILECANCEL, (WPARAM)hTransfer, 0 }; - return (int)MyCallProtoService(m_szModuleName, PSS_FILECANCEL, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSS_FILECANCEL, 0, (LPARAM)&ccs); } int __cdecl FileDeny(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason) @@ -114,7 +107,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE CCSDATA ccs = { hContact, PSS_FILEDENY, (WPARAM)hTransfer, (LPARAM)szReason }; ccs.lParam = (LPARAM)mir_t2a(szReason); - int res = (int)MyCallProtoService(m_szModuleName, PSS_FILEDENY, 0, (LPARAM)&ccs); + int res = (int)ProtoCallService(m_szModuleName, PSS_FILEDENY, 0, (LPARAM)&ccs); mir_free((char*)ccs.lParam); return res; } @@ -124,7 +117,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE PROTOFILERESUME pfr = { *action, *szFilename }; pfr.szFilename = (PROTOCHAR*)mir_t2a(pfr.szFilename); - int res = (int)MyCallProtoService(m_szModuleName, PS_FILERESUME, (WPARAM)hTransfer, (LPARAM)&pfr); + int res = (int)ProtoCallService(m_szModuleName, PS_FILERESUME, (WPARAM)hTransfer, (LPARAM)&pfr); mir_free((PROTOCHAR*)*szFilename); *action = pfr.action; *szFilename = (PROTOCHAR*)pfr.szFilename; @@ -133,28 +126,28 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE DWORD_PTR __cdecl GetCaps(int type, HANDLE hContact) { - return (DWORD_PTR)MyCallProtoService(m_szModuleName, PS_GETCAPS, type, (LPARAM)hContact); + return (DWORD_PTR)ProtoCallService(m_szModuleName, PS_GETCAPS, type, (LPARAM)hContact); } HICON __cdecl GetIcon(int iconIndex) { - return (HICON)MyCallProtoService(m_szModuleName, PS_LOADICON, iconIndex, 0); + return (HICON)ProtoCallService(m_szModuleName, PS_LOADICON, iconIndex, 0); } int __cdecl GetInfo(HANDLE hContact, int flags) { CCSDATA ccs = { hContact, PSS_GETINFO, flags, 0 }; - return MyCallProtoService(m_szModuleName, PSS_GETINFO, 0, (LPARAM)&ccs); + return ProtoCallService(m_szModuleName, PSS_GETINFO, 0, (LPARAM)&ccs); } HANDLE __cdecl SearchBasic(const PROTOCHAR* id) { - return (HANDLE)MyCallProtoService(m_szModuleName, PS_BASICSEARCH, 0, (LPARAM)StrConvA(id)); + return (HANDLE)ProtoCallService(m_szModuleName, PS_BASICSEARCH, 0, (LPARAM)StrConvA(id)); } HANDLE __cdecl SearchByEmail(const PROTOCHAR* email) { - return (HANDLE)MyCallProtoService(m_szModuleName, PS_SEARCHBYEMAIL, 0, (LPARAM)StrConvA(email)); + return (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYEMAIL, 0, (LPARAM)StrConvA(email)); } HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName) @@ -164,7 +157,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE psn.pszNick = (PROTOCHAR*)mir_t2a(nick); psn.pszFirstName = (PROTOCHAR*)mir_t2a(firstName); psn.pszLastName = (PROTOCHAR*)mir_t2a(lastName); - HANDLE res = (HANDLE)MyCallProtoService(m_szModuleName, PS_SEARCHBYNAME, 0, (LPARAM)&psn); + HANDLE res = (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYNAME, 0, (LPARAM)&psn); mir_free(psn.pszNick); mir_free(psn.pszFirstName); mir_free(psn.pszLastName); @@ -174,42 +167,42 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE HWND __cdecl SearchAdvanced(HWND owner) { - return (HWND)MyCallProtoService(m_szModuleName, PS_SEARCHBYADVANCED, 0, (LPARAM)owner); + return (HWND)ProtoCallService(m_szModuleName, PS_SEARCHBYADVANCED, 0, (LPARAM)owner); } HWND __cdecl CreateExtendedSearchUI(HWND owner) { - return (HWND)MyCallProtoService(m_szModuleName, PS_CREATEADVSEARCHUI, 0, (LPARAM)owner); + return (HWND)ProtoCallService(m_szModuleName, PS_CREATEADVSEARCHUI, 0, (LPARAM)owner); } int __cdecl RecvContacts(HANDLE hContact, PROTORECVEVENT* evt) { CCSDATA ccs = { hContact, PSR_CONTACTS, 0, (LPARAM)evt }; - return (int)MyCallProtoService(m_szModuleName, PSR_CONTACTS, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSR_CONTACTS, 0, (LPARAM)&ccs); } int __cdecl RecvFile(HANDLE hContact, PROTOFILEEVENT* evt) { CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)evt }; - return MyCallProtoService(m_szModuleName, PSR_FILE, 0, (LPARAM)&ccs); + return ProtoCallService(m_szModuleName, PSR_FILE, 0, (LPARAM)&ccs); } int __cdecl RecvMsg(HANDLE hContact, PROTORECVEVENT* evt) { CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)evt }; - return (int)MyCallProtoService(m_szModuleName, PSR_MESSAGE, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSR_MESSAGE, 0, (LPARAM)&ccs); } int __cdecl RecvUrl(HANDLE hContact, PROTORECVEVENT* evt) { CCSDATA ccs = { hContact, PSR_URL, 0, (LPARAM)evt }; - return (int)MyCallProtoService(m_szModuleName, PSR_URL, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSR_URL, 0, (LPARAM)&ccs); } int __cdecl SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList) { CCSDATA ccs = { hContact, PSS_CONTACTS, MAKEWPARAM(flags, nContacts), (LPARAM)hContactsList }; - return (int)MyCallProtoService(m_szModuleName, PSS_CONTACTS, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSS_CONTACTS, 0, (LPARAM)&ccs); } HANDLE __cdecl SendFile(HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles) @@ -218,7 +211,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE ccs.wParam = (WPARAM)mir_t2a(szDescription); ccs.lParam = (LPARAM)Proto_FilesMatrixA(ppszFiles); - HANDLE res = (HANDLE)MyCallProtoService(m_szModuleName, PSS_FILE, 0, (LPARAM)&ccs); + HANDLE res = (HANDLE)ProtoCallService(m_szModuleName, PSS_FILE, 0, (LPARAM)&ccs); if (res == 0) FreeFilesMatrix((TCHAR***)&ccs.lParam); mir_free((char*)ccs.wParam); return res; @@ -227,53 +220,53 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE int __cdecl SendMsg(HANDLE hContact, int flags, const char* msg) { CCSDATA ccs = { hContact, PSS_MESSAGE, flags, (LPARAM)msg }; - return (int)MyCallProtoService(m_szModuleName, PSS_MESSAGE, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSS_MESSAGE, 0, (LPARAM)&ccs); } int __cdecl SendUrl(HANDLE hContact, int flags, const char* url) { CCSDATA ccs = { hContact, PSS_URL, flags, (LPARAM)url }; - return (int)MyCallProtoService(m_szModuleName, PSS_URL, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSS_URL, 0, (LPARAM)&ccs); } int __cdecl SetApparentMode(HANDLE hContact, int mode) { CCSDATA ccs = { hContact, PSS_SETAPPARENTMODE, mode, 0 }; - return (int)MyCallProtoService(m_szModuleName, PSS_SETAPPARENTMODE, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSS_SETAPPARENTMODE, 0, (LPARAM)&ccs); } int __cdecl SetStatus(int iNewStatus) { - return (int)MyCallProtoService(m_szModuleName, PS_SETSTATUS, iNewStatus, 0); + return (int)ProtoCallService(m_szModuleName, PS_SETSTATUS, iNewStatus, 0); } HANDLE __cdecl GetAwayMsg(HANDLE hContact) { CCSDATA ccs = { hContact, PSS_GETAWAYMSG, 0, 0 }; - return (HANDLE)MyCallProtoService(m_szModuleName, PSS_GETAWAYMSG, 0, (LPARAM)&ccs); + return (HANDLE)ProtoCallService(m_szModuleName, PSS_GETAWAYMSG, 0, (LPARAM)&ccs); } int __cdecl RecvAwayMsg(HANDLE hContact, int statusMode, PROTORECVEVENT* evt) { CCSDATA ccs = { hContact, PSR_AWAYMSG, statusMode, (LPARAM)evt }; - return (int)MyCallProtoService(m_szModuleName, PSR_AWAYMSG, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSR_AWAYMSG, 0, (LPARAM)&ccs); } int __cdecl SendAwayMsg(HANDLE hContact, HANDLE hProcess, const char* msg) { CCSDATA ccs = { hContact, PSS_AWAYMSG, (WPARAM)hProcess, (LPARAM)msg }; - return (int)MyCallProtoService(m_szModuleName, PSS_AWAYMSG, 0, (LPARAM)&ccs); + return (int)ProtoCallService(m_szModuleName, PSS_AWAYMSG, 0, (LPARAM)&ccs); } int __cdecl SetAwayMsg(int iStatus, const TCHAR* msg) { - return (int)MyCallProtoService(m_szModuleName, PS_SETAWAYMSG, iStatus, (LPARAM)StrConvA(msg)); + return (int)ProtoCallService(m_szModuleName, PS_SETAWAYMSG, iStatus, (LPARAM)StrConvA(msg)); } int __cdecl UserIsTyping(HANDLE hContact, int type) { CCSDATA ccs = { hContact, PSS_USERISTYPING, (WPARAM)hContact, type }; - return MyCallProtoService(m_szModuleName, PSS_USERISTYPING, 0, (LPARAM)&ccs); + return ProtoCallService(m_szModuleName, PSS_USERISTYPING, 0, (LPARAM)&ccs); } int __cdecl OnEvent(PROTOEVENTTYPE, WPARAM, LPARAM) -- cgit v1.2.3