I have read and saw example for COM, but I couldn't clearly get there Interface difference.
-
Welcome to StackOverflow. Please read: http://stackoverflow.com/help/how-to-ask You should at least show what you have tried to get an answer by yourself. – harper Jun 21 '16 at 06:55
-
You should also read the documentation, [here](https://msdn.microsoft.com/en-us/library/windows/desktop/ms221608%28v=vs.85%29.aspx) and [here](https://msdn.microsoft.com/en-us/library/windows/desktop/ms680509%28v=vs.85%29.aspx) – molbdnilo Jun 21 '16 at 07:15
3 Answers
IUnknown is the primal COM interface. It provides the basic ability to "cast" a instance of a COM object to any of it's supported interfaces (QueryInterface).
IDispatch builds on IUnknown adding the facility to discover at run-time the attributes and interfaces supported by the specified COM object. This allows for late-binding and dynamic-binding. A remedial reflection of sorts. With IDispatch, an application can discover the capability of components and invoke discovered methods (which was simplistically called automation).
See Implementing the IDispatch Interface [Automation] on MSDN (resurrected from WayBack Machine - current online version).

- 39,960
- 25
- 91
- 164

- 778
- 5
- 10
IUnkown is the basic interface for all COM interfaces.
IDispatch exposes an interfacea for objects, methods and properties to programming tools and other applications that support Automation.

- 13,345
- 8
- 56
- 105
The IDispatch interface inherits from the IUnknown interface. Please have a look at the below link.

- 105
- 3
- 14