Solved

Multiple IDispatch interfaces

Posted on 1997-07-31
5
288 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
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.

827 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