Basic questions for designing the COM Server
- From: "b00mer" <b00mer@xxxxxxxxxxx>
- Date: 2 Feb 2006 12:01:20 -0800
Hi,
More than 5 years have passed since my last programming with ATL and
COM, so a lot has been forgotten. I have few basic questions to
address.
I am working with VC++ 2005 and I love this attributed programming.
My mission is to create few out-of-process COM servers, one would
reside in service module, the others would be in different executables.
All servers would be multithreaded, having some background worker
threads and a thread for communication to the outer world.
I wonder how to create such a service. Should my main thread be the one
that processes the message loop and does the COM stuff, and the other
threads do the background logic? I was thinking to spawn new threads in
PreMessageLoop() and terminate them nicely in PostMessageLoop(). Is
this how to do such things?
The other thing that is bothering me is the client/server
communication. The server module will work in multithreaded apartment
and I expect multiple clients calling the server in the same time.
Clients will mostly be scripts, so they will run in STA. Is the COM
framework providing me communication threads for free if more than one
client at a time calls my server? I don't want that one client blocks
other clients while making a call (except when it is needed due to
synchronization). Will even the STA clients work simultaneously and I
wouldn't need to worry about spawning new threads for communication?
Thanks for your answers,
B.
.
- Follow-Ups:
- Re: Basic questions for designing the COM Server
- From: Brian Muth
- Re: Basic questions for designing the COM Server
- Prev by Date: Override Default atl constructor
- Next by Date: Re: CStringW in atlplus.h undeclared in 64-bit
- Previous by thread: Override Default atl constructor
- Next by thread: Re: Basic questions for designing the COM Server
- Index(es):
Relevant Pages
|