procedure TForm1.Button3Click(Sender: TObject);
var
p : Pchar;
s : string;
begin
if DDEClientConv1.SetLink('IEXPLORE','WWW_GetWindowInfo') then
begin
Label1.Caption := 'Connected';
if DDEClientConv1.OpenLink then
begin
p := (DDEClientConv1.RequestData('0xFFFFFFFF'));
s := String(p);
Label2.Caption := copy(s,2,pos('","',s)-2); {pick out url from '"www.somewhere.com","title of page",'}
strdispose(p);
DDEClientConv1.CloseLink;
end
else
Label2.Caption := 'Openlink Failed';
end
else
Label1.Caption := 'Connect Failed';
end;