diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-18 17:21:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-18 17:21:08 +0000 |
commit | a1d6cb7bdc354be0968c6ba5ac4615e14a90eead (patch) | |
tree | a1ed17002c33644b3362e6c1e6572f3fa7ef17d7 /plugins/mRadio/i_myservice.inc | |
parent | fef6b799309b5b9d7cbb2845fa27b777477e2a61 (diff) |
these tons of code aren't needed anymore...
git-svn-id: http://svn.miranda-ng.org/main/trunk@16850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mRadio/i_myservice.inc')
-rw-r--r-- | plugins/mRadio/i_myservice.inc | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/plugins/mRadio/i_myservice.inc b/plugins/mRadio/i_myservice.inc index 88ae278633..d55ab469e9 100644 --- a/plugins/mRadio/i_myservice.inc +++ b/plugins/mRadio/i_myservice.inc @@ -3,9 +3,9 @@ function Service_RadioPlayStop(wParam:WPARAM;lParam:LPARAM):int;cdecl;
var
p:PAnsiChar;
+ tmpw, res:PWideChar;
lnew:bool;
hContact:TMCONTACT;
- cni:TCONTACTINFO;
i:integer;
begin
result:=0;
@@ -21,30 +21,21 @@ begin // wParam = station name
else
begin
- FillChar(cni,SizeOf(cni),0);
- cni.cbSize :=sizeof(cni);
- if lParam=1 then
- cni.dwFlag:=CNF_DISPLAY
- else
- cni.dwFlag:=CNF_DISPLAY or CNF_UNICODE;
- cni.szProto :=PluginName;
-
+ AnsiToWide(pAnsiChar(wParam), tmpw);
hContact:=db_find_first(PluginName);
while hContact<>0 do
begin
- cni.hContact:=hContact;
- if CallService(MS_CONTACT_GETCONTACTINFO,0,tlparam(@cni))=0 then
+ res:=Contact_GetInfo(CNF_DISPLAY,hContact,PluginName);
+ if res <> nil then
begin
- if lParam=1 then
- i:=StrCmp(pAnsiChar(wParam),cni.retval.szVal.a)
- else
- i:=StrCmpW(pWideChar(wParam),cni.retval.szVal.w);
- mir_free(cni.retval.szVal.w);
+ i:=StrCmpW(tmpw, res);
+ mir_free(res);
if i=0 then
break;
end;
hContact:=db_find_next(hContact,PluginName);
end;
+ mFreeMem(tmpw);
end;
if hContact<>0 then
|