uses windows, ddeman, ......
function Get_URL(Servicio: string): String;
var
Cliente_DDE: TDDEClientConv;
temp:PChar; //<<----------------这是新的
begin
Result := '';
Cliente_DDE:= TDDEClientConv.Create( nil );
with Cliente_DDE do
begin
SetLink( Servicio,'WWW_GetWindowInfo');
temp := RequestData('0xFFFFFFFF');
Result := StrPas(temp);
StrDispose(temp); //避免内存漏洞
CloseLink;
end;
Cliente_DDE.Free;
end;procedure TForm1.Button1Click(Sender);
begin
showmessage(Get_URL('Netscape'));
or
showmessage(Get_URL('IExplore'));
end;
function Get_URL(Servicio: string): String;
var
Cliente_DDE: TDDEClientConv;
temp:PChar; //<<----------------这是新的
begin
Result := '';
Cliente_DDE:= TDDEClientConv.Create( nil );
with Cliente_DDE do
begin
SetLink( Servicio,'WWW_GetWindowInfo');
temp := RequestData('0xFFFFFFFF');
Result := StrPas(temp);
StrDispose(temp); //避免内存漏洞
CloseLink;
end;
Cliente_DDE.Free;
end;procedure TForm1.Button1Click(Sender);
begin
showmessage(Get_URL('Netscape'));
or
showmessage(Get_URL('IExplore'));
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货