Thread View: be.comp.programming
1 messages
1 total messages
Started by SLE
Mon, 14 Feb 2005 13:07
.NET Service &
Author: SLE
Date: Mon, 14 Feb 2005 13:07
Date: Mon, 14 Feb 2005 13:07
41 lines
2273 bytes
2273 bytes
Niet onmiddellijk een antwoord op de m.p.d.* nieuwsgroepen, dus probeer
ik hier nog even ;)
The following code does not work from a .NET service:
Private Sub EnumIEWindows()
Dim sw As SHDocVw.ShellWindows
Dim ie As InternetExplorer
Try
sw = New SHDocVw.ShellWindows
For Each ie In sw
Debug.WriteLine(DateTime.Now & " " & ie.LocationURL)
Next
Catch ex As Exception
(cut)
Finally
sw = Nothing
ie = Nothing
End Try
End Sub
The above code *does* work from a console/forms application on the same
machine. The service runs under local system account, with desktop
interaction. Changing it into e.g. the local Administrator does not help.
The following exception is thrown:
System.Runtime.InteropServices.COMException (0x80040154): COM object
with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} is either not valid or
not registered.
Any clues?
Thanks,
--
SLE
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads