確定在uses子句中增加DDEMan。
uses Windows, ddeman, ......
function Get_URL(Servicio: string): String;
var
Cliente_DDE: TDDEClIEntConv;
temp:PChar; <<----------------/">file://<<----------------這是新的
begin
Result := ';
Cliente_DDE:= TDDEClIEntConv.Create( nil );
with ClIEnte_DDE do
begin
SetLink( Servicio,'WWW_GetWindowInfo');
temp := RequestData('0xFFFFFFFF');
Result := StrPas(temp);
StrDispose(temp); file://避免內存漏洞
CloseLink;
end;
ClIEnte_DDE.Free;
end;
procedure TForm1.Button1Click(Sender);
begin
showmessage(Get_URL('Netscape'));
or
showmessage(Get_URL('IExplore'));
end;