Re: Manual Proxy/Stub connection initiation
Nadav <Nadav@discussions.microsoft.com> wrote:
a. I have two DLLs that are loaded in separate address spaces (
processes ) b. The DLLs are COM objects, each with a corresponding
Proxy & Stub ( automatically generated by the COM framework ).
c. Though the DLLs are COM objects they are loaded as a plugin (
hence, not through a call to CoCreateInstance ) to an already
existing process ( such as SNMP Extension DLL loaded by the SNMP
service ).
d. Neither of the processes is a COM server or a surrogate.
e. The DLLs need to communicate using some sort of IPC mechanism, I
have considered using COM & RPC, BUT this require me to:
(*) Manually create the Proxy on one process and the stub on the other
process.
(*) Manually initiate the proxy stub connection.
I have the COM objects created in each separate hosting process, the
objects need to communicate using RPC ( as described in section 'e'
), how can this be accomplished?
Have the server DLL put its interface pointer into Running Object Table
(ROT, see IRunningObjectTable) under an agreed-upon moniker (item
monikers are handy for that, see CreateItemMoniker). The other process
would pick the pointer from ROT.
--
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