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