• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 312
  • Last Modified:

Multiple IDispatch interfaces

Is it okay to create an ActiveX component which implements multiple interfaces derived from IDispatch.
If such a component is created can it be used in a Visual Basic application
0
santoshu
Asked:
santoshu
  • 3
  • 2
1 Solution
 
fasterCommented:
You can, however, what pointer are you going to return when there is a request for IDispatch?  VB will not know there are other interfaces in your control.  Of course, through vtable binding, it is still possible.
0
 
santoshuAuthor Commented:
<<Of course, through vtable binding, it is still possible. >>

Is it possible to use from VB or just from a C++ container ?
0
 
fasterCommented:
From VB, Yes.  From container, I am not sure, probably can.  But I don't think it is a good idea to do it in this way.  You can implement several controls and combine them in one ocx (dll) file.
0
 
santoshuAuthor Commented:
I though VB is an interpreted environment and would not be able to make calls to functions present in  the Vtable. For making OLE calls it would get the IDispatch interface and make the calls with the proper dispid. I don't know how it can resolve a function call to a method which has same name in two interfaces derived from IDispatch.

Can any one please shed more light on this.

Thanks

Santosh
0
 
santoshuAuthor Commented:
I thought VB is an interpreted environment and would not be able to make calls to functions present in  the Vtable. For making OLE calls it would get the IDispatch interface and make the calls with the proper dispid. I don't know how it can resolve a function call to a method which has same name in two interfaces derived from IDispatch.

Can any one please shed more light on this.

Thanks

Santosh
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now