Re: Typelib issue
"George" <George@discussions.microsoft.com> wrote in message
news:EA270982-C95F-408D-959A-4B27E85E642F@microsoft.com
IDispatchImpl also takes a LIBID as a parameter. What do you think
it's for? You don't have to guess - just look at the source code and
find out.
I have found out the definition of class IDispatchImpl should be,
template <class T, const IID* piid = &__uuidof(T), const GUID* plibid
= &CAtlModule::m_libid, WORD wMajor = 1,
WORD wMinor = 0, class tihclass = CComTypeInfoHolder>
And it utilizes typelib through CComTypeInfoHolder, not through
plibid? Any comments?
What do you mean, not through plibid? How do you think
CComTypeInfoHolder knows _which_ type library to load?
I am not sure why ATL implements in this way, through typelib.
If you don't like it, you are free to implement it yourself,
differently.
Is it
low performance? Why not accessing the object's vtable directly?
Are you asking why late binding, IDispatch and dual interfaces exist in
the first place? I thought we'be been through this.
Or
even parsing IDL file directly? :-)
Well, why do you have to build your programs? Why doesn't the OS just
parse and execute C++ source code directly?
--
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