Solved

Multiple IDispatch interfaces

Posted on 1997-07-31
5
284 Views
Last Modified: 2013-11-20
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
Comment
Question by:santoshu
  • 3
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
faster earned 0 total points
ID: 1302964
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
 

Author Comment

by:santoshu
ID: 1302965
<<Of course, through vtable binding, it is still possible. >>

Is it possible to use from VB or just from a C++ container ?
0
 
LVL 7

Expert Comment

by:faster
ID: 1302966
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
 

Author Comment

by:santoshu
ID: 1302967
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
 

Author Comment

by:santoshu
ID: 1302968
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Generic progress indicator 6 117
Detect CR LF to each line 12 161
centeredAverage challenge 8 167
sumHeights  challenge 17 71
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question