IUnknown Vs IDispatch???
-
Is Automation the only major concern between IDispatch and IUnknown??? or anything else hiding in??:^) Hariharan.T
-
Is Automation the only major concern between IDispatch and IUnknown??? or anything else hiding in??:^) Hariharan.T
One small thing to know - IUnknown is a base interface from which every interface should either directly or indirectly derive. Even IDispatch is derived from IUnknown. Best thing according to me would be trying find/understand why IUnknown is really required and same abt IDispatch. This will help you understand them better.* * *
Have a great day ahead! Regards, Sohail Kadiwala (My Blog - http://blogs.wdevs.com/sohail/[^])
-
One small thing to know - IUnknown is a base interface from which every interface should either directly or indirectly derive. Even IDispatch is derived from IUnknown. Best thing according to me would be trying find/understand why IUnknown is really required and same abt IDispatch. This will help you understand them better.* * *
Have a great day ahead! Regards, Sohail Kadiwala (My Blog - http://blogs.wdevs.com/sohail/[^])
Hi Sohail Sir!, i Would also like to knwo in what case IUnKnown is better and in what case IDispatch is better. Thanks
"I Think this Will Help"
visit me at http://www.thisisalok.tk
-
Hi Sohail Sir!, i Would also like to knwo in what case IUnKnown is better and in what case IDispatch is better. Thanks
"I Think this Will Help"
visit me at http://www.thisisalok.tk
Hi!
IDispatch
was designed for usage from script languages. If you look into details, how does it work, you'll find that intent easily. So answer to your question in COM borders is quite impossible -IUnknown
cannot be better thanIDispatch
, because when you use theIDispatch
, you use theIUnknown
as well. But it's worth of use if you talk to script languages (VB counts here as script language) The core parts of theIDispatch
areGetIdsOfNames
andInvoke
. The whole IDL part is just an add-on to the automation part, I can describe that if you want (this post is quite long anyway) -
Hi!
IDispatch
was designed for usage from script languages. If you look into details, how does it work, you'll find that intent easily. So answer to your question in COM borders is quite impossible -IUnknown
cannot be better thanIDispatch
, because when you use theIDispatch
, you use theIUnknown
as well. But it's worth of use if you talk to script languages (VB counts here as script language) The core parts of theIDispatch
areGetIdsOfNames
andInvoke
. The whole IDL part is just an add-on to the automation part, I can describe that if you want (this post is quite long anyway)Hello Sir! I think, I got something in my mind from your above Post.if any problem come in my way,I think I am going to agian knock your Door. Thanks.
"I Think this Will Help"
visit me at http://www.thisisalok.tk
-
Hello Sir! I think, I got something in my mind from your above Post.if any problem come in my way,I think I am going to agian knock your Door. Thanks.
"I Think this Will Help"
visit me at http://www.thisisalok.tk
-
Thanks Dear you are Back to Help me out:)
"I Think this Will Help"
visit me at http://www.thisisalok.tk
-
Hi Sohail Sir!, i Would also like to knwo in what case IUnKnown is better and in what case IDispatch is better. Thanks
"I Think this Will Help"
visit me at http://www.thisisalok.tk
ThatsAlok wrote: in what case IUnKnown is better and in what case IDispatch is better. The magic of IDispatch is apparent in automation clients. If you have a server implementing multiple interfaces along with support for automation, an obvious method would be to have a default IDispatch derived automation interface. The smart or VTABLE aware clients can well use the IUnknown derived interfeces. So the entire interface design scenario will be governed by the requirements of your server ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~