Article View: be.comp.programming
Article #1515.NET Service &
From: 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
Technical Details
Message-ID:
<OsednXOylOYZP43fRVnyrA@scarlet.biz>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fcea4,8d5b08b3b8b81013,start X-Google-Attributes: gidfcea4,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Mon, 14 Feb 2005 07:07:15 -0600 Date: Mon, 14 Feb 2005 14:07:14 +0100 From: SLE <info@NOSPAM.dataworx.be> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: be.comp.programming Subject: .NET Service & Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <OsednXOylOYZP43fRVnyrA@scarlet.biz> Lines: 41 NNTP-Posting-Host: 193.121.250.209 X-Trace: sv3-KZ5/cYsLmAeEcBuQXhbeGJQXcig7cNesdTkaKzjjNPZO18VCvb3jgN4fOJ73UOZFthF4J2F2iw7E/Xr!m7nRuWbTb/RSdSoHeOJUTQYd0XdjcUgwrdCM5ci1QO8QtwLAv9fAaxc9hF4Fr9tyAJpIeA1oNutr!hw== X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.23