Re: Typelib issue
"George" <George@discussions.microsoft.com> wrote in message
news:9F59DA75-A4FF-4B82-906A-EF21233BC1A0@microsoft.com
It is good to know new things from you. Sorry my English is not very
good. I mean using information in typelib file is better or accessing
instance vtable to achieve function pointer is better -- in essence,
Invoke of IDispatch is just a way to find function pointer and
passing parameters?
Like I said, if you want to know what IDispatch is for, there's copious
literature on the matter, and I'm pretty sure we have discussed this
before. I have nothing to add.
I think accessing vtable address directly is of better performance,
Better than what? Let's assume as a given that you need to implement
IDispatch::Invoke, say as part of a dual interface. So you have
something like this:
STDMETHODIMP MyObject::Invoke(DISPID dispid, DISPPARAMS* params, ...) {
// XXX
}
What would you put in place of XXX ? Show me how you are going to
"access vtable address directly" from inside your Invoke implementation.
--
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