Re: Launch a process for each COM object?
- From: "Dave Williams" <davewilliams29@xxxxxxxxx>
- Date: Fri, 10 Feb 2006 14:59:08 -0000
Thanks for the suggestion, but under the help for REGCLS_SINGLEUSE it says
this:
"Once an application is connected to a class object with CoGetClassObject,
the class object is removed from public view so that no other applications
can connect to it"
That looks to me like the first CoCreateInstance will start a new process,
but the second one will presumably fail, whereas I want the second call to
create another instance of the new process.
Am I misunderstanding it?
"Volker Hilsheimer" <vohi@xxxxxxxxxxxxx> wrote in message
news:e6ARCWkLGHA.2624@xxxxxxxxxxxxxxxxxxxxxxx
Calling CoRegisterClassObject with REGCLS_SINGLEUSE should do the trick.
Volker
"Dave Williams" <davewilliams29@xxxxxxxxx> wrote in message
news:O%232jZ7iLGHA.208@xxxxxxxxxxxxxxxxxxxxxxx
Hi all, I have what may be an unusual requirement...
I'd like to write a COM server so that a new process is launched for each
COM server instance. That is to say, if a client app calls
CoCreateInstance 3 times, it will cause 3 separate processes to be
lauched, each an instance of the COM server.
This is to handle an awkward situation of a library we need to use that's
bound by a resouce limit that is per-process (C run-time library limit of
2048 files open per process) but we need to exceed it by running multiple
processes sumultaneously.
If COM can't be configured to launch separate processes, and we instead
consider a COM connection to a single process which then iteself launces
other processes, then is there any way we can hook into the COM
marshalling logic (or anything similar) so we can take the arguments
passed to the COM service and inter-process communicate them to the
launched processes? I appreciate we could use pipes or shared memory or
file handling to communicate the arguments, but since there will be
several functions each with several arguments that may have rich COM
types, is there an easy way to packet them into a binary blob for
transfer and then unpacket them (which COM must already be doing).
Any ideas or suggestions appreciated,
Dave
.
- Follow-Ups:
- Re: Launch a process for each COM object?
- From: Igor Tandetnik
- Re: Launch a process for each COM object?
- References:
- Launch a process for each COM object?
- From: Dave Williams
- Re: Launch a process for each COM object?
- From: Volker Hilsheimer
- Launch a process for each COM object?
- Prev by Date: Re: Launch a process for each COM object?
- Next by Date: Re: Launch a process for each COM object?
- Previous by thread: Re: Launch a process for each COM object?
- Next by thread: Re: Launch a process for each COM object?
- Index(es):
Relevant Pages
|