|
|
|
date: Mon, 27 Aug 2007 14:45:02 -0300,
group: microsoft.public.platformsdk.com_ole
back
Re: How to retrieve object instance from a specific instance of server
I dont want the servers to be started when an instance of a given interface
is requested. I'm using COM as an inter process mechanism. The servers are
already started and clients "connect" to Event Sinks by requesting the
server for an instance of a class. The problem I have is that I dont know
how to make a client choose a specific instance (PID?) of the running
servers to request to for that object.
Ej.
I have...
ServerA is running, then ClientA starts and requests an instance of a class
provided by ServerA
(ServerA <- ClientA)
I whant...
ServerA1 and ServerA2 are running (both are instances of ServerA, ej.
ServerA.exe)
Then ClientA1 and ClientA2 are launched (both are instances of ClientA, ej.
ClientA.exe)
So I need to be able to specify that ClientA1 must request an instance of
that object only to ServerA1 and not to ServerA2. Therefore ServerA1 <-
ClientA1 and ServerA2 <- ClientA2.
Am I explaining thing clearly?
Thanks for your reply
"Igor Tandetnik" wrote in message
news:etYSRTN6HHA.2208@TK2MSFTNGP06.phx.gbl...
> Diego L Espieira wrote:
>> I have two activex based services. Server1 and its client Server2
>> (which is an activex server too).
>> Server2 creates an object instance which is in Server1. The fact is
>> my boss asked me to make those servers multi instance on the same
>> machine, so that it allows Two or mor instances of Server2
>> comunicating with their respective Server1 instance. How do I do
>> that? Is this even posible?
>
> I'm not sure I understand the question. Anyway, be aware that you can pass
> REGCLS_SINGLEUSE flag to CoRegisterClassObject, in which case a new server
> process will run for every CoCreateInstance call the client makes. Each
> process will serve only one instance of the COM object.
> --
> 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
>
>
date: Mon, 27 Aug 2007 16:52:42 -0300
author: Diego L Espi?eira
|
|