Re: COM client in noninteractive account cannot access COM server hosted in interactive app
First off, your server is most likely not configured to be accessed
over DCOM. Judging from your post it's never been intended to
be used like that. And it being third party software there's not
a whole lot you can do about it. Just stating my understanding of
the facts.
Now, a COM server can be configured to always run as the
interactive user (e.g whoever is currently logged on). This is not
recommended for DCOM servers, but is exactly what you need
for accessing it from a service. This is done by changing the server's
identity to be the interactive user instead of the default of the
launching user (in DCOMCnfg on the Identity tab). However,
you can't do that to a third party server.
There's another complication I suspect lurks behind your problem.
You metnioned something about the third party DLL you are using
to communicate with that server and it detecting if the server is
already running. Chances are the detection is carried out by the
server registering itself in the Running Objects Table (ROT). Now
unless an object is registered using the allow any client flag, it won't
be visible in a service. Since it is not logical to assume the flag is
being used by the third party server, I assume it is not.
The solution for you would be to write a small out-of-proc COM
server to serve as the middleman between your service and the
third party COM server (via their API DLL). You configure your
server to run as the interactive user and it does its job contacting
the third party server.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Jennifer Palonus" <jpalonus@graph-intron-ical-intron-dy-intron-namics.com>
wrote in message news:ggnfc2tfoba1e1vbbqqaf7hkcmtkcjin5o@4ax.com...
Update: This is in VC++6.0 using ATL, running on Windows 2000.
Graphical Dynamics, Inc
http://www.graphicaldynamics.com