Re: Launch a process for each COM object?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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








.



Relevant Pages

  • Re: How to reconnect to a db automatically?
    ... was tested at application launch to make sure it was valid and could ... 'The connection could not be opened ... Catch ex as exception ... For instance if the sql server is just rebooting after an update, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Can I make a class file self destruct?
    ... a connection to a server of yours, and ask for permission to launch. ... Can I put some code in the class file to do this? ...
    (comp.lang.java.programmer)
  • VPN connection in Startup folder doesnt work
    ... I created a VPN network connection that I want to launch ... I have to manual launch the connection. ... The server is configured as a domain controller in our ... I've created the VPN shortcut in the Startup folder on XP ...
    (microsoft.public.windows.server.networking)
  • Re: Share objects
    ... I need to save the connection because the applications will be connected to a server by identification. ... It work when I launch a server and after my process, but not when my process launch the server. ... I wouldn't pass a connection object around between applications. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Outgoing POP3 email missing/lost/not received
    ... Funny thing is that I have had this ISP for 8 years and it has always been ... It looks like when you last ran CEICW, you set the ISP's mail server to: ... Internet Connection Wizard. ... After the wizard completes, the following network connection ...
    (microsoft.public.windows.server.sbs)