Вот код, который вытащит адрес из активного окна IE.
Код:
uses
..., DdeMan;
type
TForm1 = class(TForm)
private
{ Private declarations }
function Get_URL(Servicio: string): String;
public
{ Public declarations }
end;
function TForm1.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: TObject);
begin
ShowMessage( Get_URL( 'IExplore' ) );
// ShowMessage( Get_URL( 'Netscape' ) );
end;