Re: Connect to remote COM object and registering typelib
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Wed, 12 Dec 2007 16:34:52 -0500
sawer <sawer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
While late binding , If we have nothing (no need) about COM object in
remote server. How could CLSIDFromProgId work?
The server still has to be registered locally. As you noted, you need
ProgId to CLSID mapping. You also need to know which machine on the
network the server is residing on.
Now, if you somehow know this information from some source other than
the registry, you can use CoCreateInstanceEx to create an object that is
not in any way registered on the local machine.
Late binding just frees you from the need to compile against the exact
signatures of the interface methods. You still need to know the CLSID to
create the object, of course.
2-)Why must we register type library?
For late binding (calls through IDispatch only), you don't have to.
In What conditions do COM searches registry for type library?
When you call methods on an interface that is registered to use
universal (aka TLB-driven) marshalling. Normally, dual interfaces and
interfaces marked [oleautomation] are set up this way.
--
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:
- Prev by Date: Connect to remote COM object and registering typelib
- Next by Date: Re: Connect to remote COM object and registering typelib
- Previous by thread: Connect to remote COM object and registering typelib
- Next by thread: Re: Connect to remote COM object and registering typelib
- Index(es):
Relevant Pages
|