Click here to Skip to main content
15,914,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: dual interface Pin
Steve Echols11-Sep-08 19:59
Steve Echols11-Sep-08 19:59 
GeneralRe: dual interface Pin
George_George11-Sep-08 20:21
George_George11-Sep-08 20:21 
GeneralRe: dual interface Pin
SandipG 11-Sep-08 20:28
SandipG 11-Sep-08 20:28 
GeneralRe: dual interface Pin
George_George11-Sep-08 20:34
George_George11-Sep-08 20:34 
GeneralRe: dual interface Pin
SandipG 11-Sep-08 20:38
SandipG 11-Sep-08 20:38 
GeneralRe: dual interface Pin
George_George11-Sep-08 20:50
George_George11-Sep-08 20:50 
GeneralRe: dual interface Pin
CPallini11-Sep-08 21:54
mveCPallini11-Sep-08 21:54 
GeneralRe: dual interface Pin
George_George11-Sep-08 21:58
George_George11-Sep-08 21:58 
Thanks CPallini,


I have did more study and I want to share my points here. Could you help to
review whether my points are correct please? Smile | :)

1. If a component implements IDispatch directly, we can only invoke its
member methods through IDispatch.Invoke -- only one way, so it is not dual
interface;

2. If a component implements IUnknown directly, we can only use
AddRef/Release/QueryInterface, it is useless since we can only use the 3
methods;

3. If a component implements a customized interface, then the customized
interface implements IUnknown, then we could invoke the component's member
methods through QueryInterface to get the customized interface, and using the
vtable in the customized interface to invoke member methods. But still one
way, so it is not dual interface;

4. If a component implements a customized interface, then the customized
interface implements IDispatch, then we could invoke the component's member
methods through QueryInterface to get the customized interface, and using the
vtable in the customized interface to invoke member methods, and also we
could invoke through IDispatch.Invoke. Two ways to invoke it, so called dual
interface.

All of my understandings are correct? Anything missing? Smile | :)


regards,
George
GeneralRe: dual interface Pin
CPallini11-Sep-08 22:11
mveCPallini11-Sep-08 22:11 
GeneralRe: dual interface Pin
George_George11-Sep-08 23:02
George_George11-Sep-08 23:02 
GeneralRe: dual interface Pin
Swathee11-Sep-08 22:44
Swathee11-Sep-08 22:44 
GeneralRe: dual interface Pin
George_George11-Sep-08 23:09
George_George11-Sep-08 23:09 
GeneralRe: dual interface [modified] Pin
SandipG 11-Sep-08 22:13
SandipG 11-Sep-08 22:13 
GeneralRe: dual interface Pin
CPallini11-Sep-08 22:33
mveCPallini11-Sep-08 22:33 
GeneralRe: dual interface Pin
George_George11-Sep-08 22:56
George_George11-Sep-08 22:56 
GeneralRe: dual interface Pin
CPallini11-Sep-08 23:05
mveCPallini11-Sep-08 23:05 
GeneralRe: dual interface Pin
SandipG 11-Sep-08 23:12
SandipG 11-Sep-08 23:12 
GeneralRe: dual interface Pin
George_George11-Sep-08 23:14
George_George11-Sep-08 23:14 
GeneralRe: dual interface Pin
CPallini11-Sep-08 23:32
mveCPallini11-Sep-08 23:32 
GeneralRe: dual interface Pin
George_George11-Sep-08 23:13
George_George11-Sep-08 23:13 
GeneralRe: dual interface Pin
CPallini11-Sep-08 23:45
mveCPallini11-Sep-08 23:45 
GeneralRe: dual interface Pin
George_George11-Sep-08 23:48
George_George11-Sep-08 23:48 
GeneralRe: dual interface Pin
CPallini12-Sep-08 0:44
mveCPallini12-Sep-08 0:44 
GeneralRe: dual interface Pin
George_George12-Sep-08 19:48
George_George12-Sep-08 19:48 
GeneralRe: dual interface Pin
Scott Holt12-Sep-08 14:38
Scott Holt12-Sep-08 14:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.