Re: Process instanses for COM local server implementation
tigrand@gmail.com wrote:
I am designing a COM object which, due to some requirements, should
always work in current logged-in user context and should not have
multiple instances (only one process per time).
These requirements contradict each other. There may be more than one
logged-in user, what with Terminal services and fast user switching in
XP.
Currently, I am thinking of having local COM server (Executable (EXE)
in ATL Wizard). However I cannot find an answer in MSDN or somewhere
else whether it is garanteed to have always one COM server instance on
all windows platforms serving many clients?
You can configure it this way, but this usually means running it under a
specific user account.
If omitting racing create/unload condition case for my COM server, can
I be sure that my currently loaded COM process will serve also the
next client (CoCreateInstance caller from other process)?
If the server is still running, and the user account of the client is
compatible with the security settings of the server, and you didn't
explicitly disable reuse in your code, then yes, the already-running
server will also serve the new client.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925