Startseite ¦  was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews ¦  sonstiges
kylix ¦  tutorials ¦  online shop ¦  fotos ¦  Add&Win Gewinnspiel


Willkommen Gast. Bitte einloggen oder registrieren.
04.02.2012, 09:06:43
Übersicht Hilfe Suche Einloggen Registrieren

+  SwissDelphiCenter Forum
|-+  English Forums
| |-+  General Forum
| | |-+  List web pages from a service application
« vorheriges nächstes »
Seiten: [1] Drucken
Autor Thema: List web pages from a service application  (Gelesen 1524 mal)
alberto.iniguez
Newbie
*
Offline Offline

Beiträge: 1


E-Mail
« am: 19.02.2010, 20:33:05 »

Good Day to All

I'm trying to implement the following code

TForm1.GetBrowsersButtonClick procedure (Sender: TObject);
var
  ShellWindows: TShellWindows / / ShellWindows class, to access all Shell Window
  ShellWindowDisp: IDispatch / / Dispatch interface to found shell window
  WebBrowser: IWebBrowser2; / / Interface to web browser found
  Count: integer; / / counter of shell window
begin
  BrowserList.Clear; / / Clear URL list
  ShellWindows: = TShellWindows.Create (nil); / / Create class
  try
    for Count: = 0 to ShellWindows.Count - 1 do / / Enumerate all shell window
    begin
      ShellWindowDisp: = ShellWindows.Item (Count); / / Get interface to current shell window
      if ShellWindowDisp = nil then Continue; / / Interface is present
      ShellWindowDisp.QueryInterface (IWebBrowser2, WebBrowser); / / if the Web Browser window
      if WebBrowser.LocationURL =''then Continue; / / The browser is navigate?
      if Assigned (WebBrowser.Document) then / / The Documet complite Web browser have?
        BrowserList.Items.Add (WebBrowser.LocationURL) / / Add URL form browser to list
    end;
  finally
    ShellWindows.Free / / Destroy class
  end;
end;

downloaded from the web

http://delphi.about.com/od/internetintranet/a/webbrowserenum.htm

and works perfectly but when trying to implement this as a service application
i get the next error exception

EOleSysError: The system can not find the file specified

Can you help please

Best regards
Gespeichert
Seiten: [1] Drucken 
« vorheriges nächstes »
Gehe zu:  


Einloggen mit Benutzername, Passwort und Sitzungslänge

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC Prüfe XHTML 1.0 Prüfe CSS