Can COM Servers run as NT Services?

Skip to first unread message

Remco de Boer

Dec 29, 1999, 3:00:00 AM12/29/99
I've created a DCOM server (using Visual Basic) which on startup loads a
form and does not unload it until I explicitly tell it to, thus running even
when no clients are connected to it. I am able to check this behavior a.o.
using the taskmanager and a timer in the COM server. When I execute the
server (by starting the .exe) it starts running and when I start a client
some time after that, it perfectly connects to the server and shows me the
time the server has been running. No problems so far....

However, this server must be started when Windows NT is started. This
implies that it should be implemented as an NT-Service. The only problem is
that when I let it run as a service (using either SRVANY.exe or the
NTSVC.ocx) the clients can no longer connect to it. It is running (I've
checked this with the taskmanager) but when a client wants to connect to it,
a new process is started and it connects to this 'new' server, instead of to
the server that was already running.

My question is: is it possible to run a (D)COM server as an NT-Service. If
so, what am I doing wrong? If not, is there another possibility to start a
COM server _together with_ Win NT in such a way that it doesn't create a new
process when a client wants to connect to it? (Again, it already works when
I'm logged in and start the executable by hand).

Please reply to as well as to this list.

Many greetings and thanks,

Remco de Boer

Steve Araiza

Jan 2, 2000, 3:00:00 AM1/2/00
See MSDN Article ID: Q169321, INFO: COM Servers Activation and NT Windows

Reply all
Reply to author
0 new messages