Re: Fundamental COM questions
Ranjit <ranjitiyer@gmail.com> wrote:
1. Don Box mentions interpretive marshalling as one of the forms of
marshalling, other than the typelibrary, standard and custom
marshalling. Could someone briefly explain how the former works?
It's actually a form of standard marshalling. MIDL compiler can generate
proxy/stub code in two ways, depending on command line switch. It can
actually generate C code specific to the details of your interface
methods. Or, it can generate compact data structures describing your
methods, and code that interprets these data structures (in fact, this
interpreter is part of OS-provided DLLs rather than proxy/stub DLL which
makes the latter much smaller).
See the documentation for /Oi switch
2. Essential Com also says that the one extra capability that Global
Interface Table has over CoMarshalInterface/CoUnmarshalInterface is
that it can store and unmarshal interface pointers that are themselves
proxies to remote COM interface. So if a remote COM object was created
in a client STA and the proxy to which was put in the GIT, and then a
worker thread (in an other apartment, but in the client process)
accesses the proxy pointer from the GIT (GetInterfaceFromGlobal), will
a proxy to a proxy be installed now?
No. COM never, under any circumstances, creates a proxy to a proxy.
You'll get a regular proxy to an original remote 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