Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

COMServer running as service

8 views
Skip to first unread message

bourgui

unread,
May 22, 2008, 4:41:54 PM5/22/08
to
Hi all,

I have an application which uses a COM server. It works without a
hitch when I run the application normally through the exe.
However, if I runn my application as a service ( I set it up using the
Windows toolkit, using instsrv.exe and srvany.exe), I cannot seem to
connect to the COM server.
For exemple, if I try to connect in a macro in vba (one that works
when the app is run from the exe), I get the following message:
"ActiveX Control can't create object"

Do I need to set anything special for my server to register properly
when running as a service?
Here is my registration code:

mySvr := coServer. Create;
RegisterActiveObject (mySvr, Class_Server, ActiveObject_Weak, ROT);
CoLockObjectExternal (mySvr, True, True);

and my initialization:

{ AutoObjectFactory }
TAutoObjectFactory. Create(ComServer, TServer, Class_Server,
ciMultiInstance, tmApartment);
ComServer. UIInteractive := False;

This is not really my area of expertise so any help would be
appreciated!
Thanks a lot

Bourgui

0 new messages