Re: A puzzling question

From: Simon Trew (ten.egnaro_at_werts)
Date: 03/05/04


Date: Fri, 5 Mar 2004 08:32:31 -0000


"Igor Tandetnik" <itandetnik@mvps.org> wrote in message
news:OKwHYohAEHA.3048@tk2msftngp13.phx.gbl...
> It _is_ handled this way. Or rather, IUnknown is not remoted at all -
> it's a [local] interface. Except for the final Release, the proxy can
> satisfy any IUnknown calls locally.

Well, on a call to CoCreateInstance, you specify the interface you want
back, right? So wouldn't COM have to call QI remotely once if a client QI'd
for the IUnknown when it specified a different interface to
CoCreateInstance? (Because of the IUnknown identity rule.) Alternately, COM
would have to specify IID_IUnknown to the remote server's CoCreateInstance,
and then remotely QI for the interface that the client specified (this could
of course be wrapped in one remote call in the implementation of COM). But
anyway, I don't think that that would definitely be equivalent (because the
guarantees for IUnknown don't have to apply to other interfaces).

Of course, I am just guessing about the remoting implementation here,
because I take the general view of "it just works" (aka "I don't care")...

S.



Relevant Pages

  • Re: A puzzling question
    ... >> satisfy any IUnknown calls locally. ... > Well, on a call to CoCreateInstance, you specify the interface you ...
    (microsoft.public.vc.atl)
  • Marshalling a marshalled interface pointer
    ... component that contains this object holds a container of IUnknown ... It also exposes the interface 'IDiscussions' which provides the method ... Another 'ChatServer' is started and registers itself with the ... ChatBroker with the name "Server2". ...
    (microsoft.public.vc.atl)
  • Re: IUnknown interface
    ... both directly derived from IUnknown. ... two different implementations (note that usually both interface tables ... ULONG STDMETHODCALLTYPE Release ... virtual HRESULT DoSomething ...
    (microsoft.public.vc.language)
  • Re: Dual interface
    ... and exposes IDispatch (it must expose IUnknown ... I think the law should be every interface of the COM component implements, ... If a component implements a customized interface, ... then we could invoke the ...
    (microsoft.public.vc.language)
  • Re: ATL and object aggregation (more)
    ... I don't think you should call Releaseon an interface's pointer. ... an helper method that is called by the 'true' COM interface method ... > It's wrong because the IUnknown interface will be lost during the Query ... then the IInObj3Ptr InObj3Ptr constructor is ...
    (microsoft.public.vc.atl)