Re: Dual interface
- From: "SvenC" <SvenC@xxxxxxxxxxxxx>
- Date: Fri, 12 Sep 2008 07:45:38 +0200
Hi George,
Sorry for asking this simple question. I found after some coding, I
have some new understanding of the concept. Now I think dual
interface means the com object inherits from IDispatch, and since
IDispatch inherits from IUnknown, the COM consumer could choose to
use IDispatch or IUnknown, so called dual interface.
For non-dual interface, I think it means the com object only
implements interface IUnknown.
My understandings are both correct?
No, dual interfaces mean that you have your own custom
interface which derives from IDispatch. So your component
exposes IUnknown, IDispatch and your custom interface.
Your components functions can be called "directly" with your
custom interface or "indirectly" through IDispatch::Invoke.
This gives e.g. the advantage that your component is usable
in scripting languages which rely on IDispatch as well as in
more capable languages like C++ which know how to deal
with custom interfaces.
--
SvenC
.
- Follow-Ups:
- Re: Dual interface
- From: George
- Re: Dual interface
- From: George
- Re: Dual interface
- References:
- Dual interface
- From: George
- Dual interface
- Prev by Date: Dual interface
- Next by Date: Re: SOAP header
- Previous by thread: Dual interface
- Next by thread: Re: Dual interface
- Index(es):
Relevant Pages
|