Re: Does IUnknown pointer comparison work across process boundarie
- From: armarw <armarw@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 13 Aug 2009 09:38:01 -0700
Many thanks Igor, thats the gist of what I am asking.
In the example given the pUnknown1==pUnknown2 comparison would happen in
ObjectComparer.exe process within in the CompareSetObjects() method.
These interface pointers would arrive in theObjectComparer.exe process via
calls to SetObject1() and SetObject2().
In the example given, the interfaces passed to SetObject1() and SetObject2()
both originate from the same object, held within the ObjectContainer.exe
process. However, one of the interfaces passes through the intermediary
process ObjectRouter.exe prior to its arrival at ObjectComparer.exe.
"Igor Tandetnik" wrote:
armarw <armarw@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:.
Does IUnknown pointer comparison work across process boundaries?
This question doesn't make much sense. Before you can write "p1 == p2",
you need both p1 and p2 in your proces, don't you?
Standard COM rules dictate that if you want to see if 2 interfaces
belong to the same object, you query IUnknown from each interface and
then compare the 2 IUnknown pointers. If pUnknown1==pUnknown2 they
are the same object.
Does this still hold across process boundaries after the interfaces
have been marshalled several times?
If you are asking whether you can use this approach to determine that
two proxy pointers refer to the same object (possibly in another
process), then yes you can.
--
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
- References:
- Does IUnknown pointer comparison work across process boundaries?
- From: armarw
- Re: Does IUnknown pointer comparison work across process boundaries?
- From: Igor Tandetnik
- Does IUnknown pointer comparison work across process boundaries?
- Prev by Date: Re: Does IUnknown pointer comparison work across process boundaries?
- Next by Date: Inheriting an interface from COM obj
- Previous by thread: Re: Does IUnknown pointer comparison work across process boundaries?
- Next by thread: Inheriting an interface from COM obj
- Index(es):
Relevant Pages
|