Solved

Multiple IDispatch interfaces

Posted on 1997-07-31
5
291 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.

735 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