function GetWebBrowser2(nProcessID: THandle):IWebBrowser2; var x: Integer; AShellWindows: IShellWindows; AWebBrowser2:IWebBrowser2; dwProcessID: Cardinal; begin Result := nil; AShellWindows := CoShellWindows.Create; for x := 0 to AShellWindows.Count - 1 do begin if ((AShellWindows.Item(x) nil) and (AShellWindows.Item(x).QueryInterface(IWebbrowser2, AWebBrowser2) = S_OK)) then begin GetWindowThre..