Re: Does IUnknown pointer comparison work across process boundarie

Tech-Archive recommends: Fix windows errors by optimizing your registry



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



.



Relevant Pages

  • Re: The Failure of OOP
    ... >> Hi Calum, ... > could definitely rig something that will show interfaces in your favour. ... In some scenarios you would have more pointers than objects, ... Christopher Diggins ...
    (comp.object)
  • Re: Passing Smart Pointers as Parameters
    ... How do you obtain interface pointers on your own object? ... It's not the problem with the interfaces on my object. ... debug output... ... should see the debug output, ...
    (microsoft.public.vc.atl)
  • Re: What I dont like about C# so far, compared to C++ (managed or otherwise)
    ... 1/ no pointers or tracking pointers or handles--this is absurd. ... order to support them. ... In what way aren't interfaces supported? ... inheritance of interface and single inheritance of implementation. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Looking for a plotting package
    ... > I just did a quick perusal on their web sites(SigmaPlot and IGOR) and ... > generated by my program w/o user intervention. ... (but I'm pretty sure they have all common interfaces). ... finite element or similar engineering graphics rather than just simple ...
    (comp.programming)
  • Re: Problem with multiple video renderer in a graph
    ... querying IVideoWindow from IBaseFilter. ... The first thing you should do is use smart COM pointers for your ... interfaces. ...
    (microsoft.public.win32.programmer.directx.video)