summaryrefslogtreecommitdiff
path: root/plugins/HistoryPlusPlus
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistoryPlusPlus')
-rw-r--r--plugins/HistoryPlusPlus/hpp_contacts.pas9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/HistoryPlusPlus/hpp_contacts.pas b/plugins/HistoryPlusPlus/hpp_contacts.pas
index fa8b9f6a4e..e898d003f3 100644
--- a/plugins/HistoryPlusPlus/hpp_contacts.pas
+++ b/plugins/HistoryPlusPlus/hpp_contacts.pas
@@ -88,7 +88,6 @@ end;
function GetContactDisplayName(hContact: TMCONTACT; Proto: AnsiString = ''; Contact: boolean = false): String;
var
- ci: TContactInfo;
RetPWideChar, UW: PChar;
begin
if (hContact = 0) and Contact then
@@ -101,13 +100,9 @@ begin
Result := TranslateW('''(Unknown Contact)''' { TRANSLATE-IGNORE } )
else
begin
- ci.cbSize := SizeOf(ci);
- ci.hContact := hContact;
- ci.szProto := PAnsiChar(Proto);
- ci.dwFlag := CNF_DISPLAY + CNF_UNICODE;
- if CallService(MS_CONTACT_GETCONTACTINFO, 0, LPARAM(@ci)) = 0 then
+ RetPWideChar := Contact_GetInfo(CNF_DISPLAY, hContact, PAnsiChar(Proto));
+ if RetPWideChar <> nil then
begin
- RetPWideChar := ci.retval.szVal.w;
UW := TranslateW('''(Unknown Contact)''' { TRANSLATE-IGNORE } );
if WideCompareText(RetPWideChar, UW) = 0 then
Result := AnsiToWideString(GetContactID(hContact, Proto), CP_ACP)