From f9c9f7a27456f98ac84f27add1c2aea5bd99a35c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:42:33 +0000 Subject: more HCONTACT git-svn-id: http://svn.miranda-ng.org/main/trunk@8079 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YahooGroups/src/utils.cpp | 10 +++++----- plugins/YahooGroups/src/utils.h | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/YahooGroups') diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp index 4274f8c38a..93b84691c8 100644 --- a/plugins/YahooGroups/src/utils.cpp +++ b/plugins/YahooGroups/src/utils.cpp @@ -314,7 +314,7 @@ TCHAR *GetContactID(HCONTACT hContact, char *szProto) } } -HANDLE GetContactFromID(TCHAR *szID, char *szProto) +HCONTACT GetContactFromID(TCHAR *szID, char *szProto) { TCHAR *szHandle; TCHAR dispName[1024]; @@ -330,12 +330,12 @@ HANDLE GetContactFromID(TCHAR *szID, char *szProto) _tcsncpy(dispName, tmp, SIZEOF(dispName)); if ((szHandle) && ((_tcsicmp(szHandle, szID) == 0) || (_tcsicmp(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0))) - { found = 1; - } + if (szHandle) { free(szHandle); } - if (found) return hContact; + if (found) + return hContact; } return NULL; @@ -343,7 +343,7 @@ HANDLE GetContactFromID(TCHAR *szID, char *szProto) #pragma warning (default: 4312) #pragma warning (disable: 4312) -HANDLE GetContactFromID(TCHAR *szID, wchar_t *szProto) +HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto) { char protocol[1024]; WideCharToMultiByte(CP_ACP, 0, szProto, -1, protocol, sizeof(protocol), NULL, NULL); diff --git a/plugins/YahooGroups/src/utils.h b/plugins/YahooGroups/src/utils.h index c3dc480dfa..9e07609dc6 100644 --- a/plugins/YahooGroups/src/utils.h +++ b/plugins/YahooGroups/src/utils.h @@ -49,12 +49,12 @@ int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, int size); int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, int count); -TCHAR *GetContactName(HCONTACT hContact, char *szProto); -TCHAR *GetContactID(HCONTACT hContact); -TCHAR *GetContactID(HCONTACT hContact, char *szProto); -HANDLE GetContactFromID(TCHAR *szID, char *szProto); -HANDLE GetContactFromID(TCHAR *szID, wchar_t *szProto); -void GetContactProtocol(HCONTACT hContact, char *szProto, int size); +TCHAR *GetContactName(HCONTACT hContact, char *szProto); +TCHAR *GetContactID(HCONTACT hContact); +TCHAR *GetContactID(HCONTACT hContact, char *szProto); +HCONTACT GetContactFromID(TCHAR *szID, char *szProto); +HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto); +void GetContactProtocol(HCONTACT hContact, char *szProto, int size); int MyPUShowMessage(char *lpzText, BYTE kind); -- cgit v1.2.3