Board index » delphi » NT Service - both COM server and client

NT Service - both COM server and client

Hello!

I need to have a NT service which does a lot of stuff, mostly on it's own.
To communicate with it I want to use Ole automation.

The normal answer to this is to use svCom, which is a splendid product which
you can find at http://www.chat.ru/~aldyn/svcom_frame.html

To my big frustation I'm having problem when using svCom which I don't get
when I use Delphi's classes (*). The problem is that calls to
CoCreateInstance from inside the service never returns (!). (sometimes I can
make it work, but I can't figure out why, then it suddenly stop
rking...   - I have example for anyone interested in trying to verify /
solve this)

I'm now considering to use the Delphi NT Service instead.

But before I spend another week getting nowhere - perhaps somebody has some
feedback on the kind of problems I'll get when using a Delphi Service as a
COM server.

/Thanks!
Martin

(*) A footnote about svCom - I have more fate in svCom than in my
understanding of com in NT services and threads, so please don't let this
letter make you think there's somthing wrong with svCom.

 

Re:NT Service - both COM server and client


Hi again !

I just want to tell you that this is solved. (5 minutes after my initial
post, "doing the last attempt")

When using a DLL com server from within a service - always use aparment
threading, never use single,always include a typelibrary and always check
the 'automation' flag for your interfaces. Also, remeber that GUID is not a
automation compatable datatype (cost me several days!).
In service which uses the com class, don't forget to call coInitialize.

Thanks to everybody who has helped me out the latest weeks!

/Martin

Re:NT Service - both COM server and client


Hi, Martin !

Martin Liesn D??? ???Y?? <7hstei$d...@forums.borland.com> ...

Quote
>I need to have a NT service which does a lot of stuff, mostly on it's own.
>To communicate with it I want to use Ole automation.

>The normal answer to this is to use svCom, which is a splendid product
which
>you can find at http://www.chat.ru/~aldyn/svcom_frame.html

>To my big frustation I'm having problem when using svCom which I don't get
>when I use Delphi's classes (*).

Thank you very much for your appreciation of SvCom.
Why not to contact with me if you have problems with it ?

Regards,

Alexey Dynnikov <al...@chat.ru>
http://members.tripod.com/~aldyn
http://al.irt.ustu.ru/~aldyn/
http://www.chat.ru/~aldyn/
SvCom - The Joy of Services

Other Threads