How to create an object in C# which inherits from IDispatch that can be incorporated into older programs that use ActiveX

StackOverflow https://stackoverflow.com/questions/18081130

Question

first time on SO though I've used the site a lot, I will get straight to the point.

My actual end goal is to create an object which inherits from the IDispatch interface in C# which can be used in Canvases inside of Oracle Forms Builder (Oracle Developer Suite 10g (10.1.2.0.2))

Does anyone have any resources where I can learn how to do this or where any examples of this are shown?

In order to achieve my goal thus far I went to this site : http://www.codeproject.com/Articles/24089/Create-ActiveX-in-NET-Step-by-Step

Here I got some code which allowed me to create and test an activeX object. I believe that all objects utilized by the COM structure. I then registered this using regasm and then I tried to call it. I was able to call it successful in IE.

I was about to recreate this active X object after some time; however, whenever I attempt to import it to Oracle forms I got an error like:

enter image description here

To me the error seems very clear, I obviously did not implement some method that oracle forms needs me to implement. What are the methods I need to implement and how should it be implemented.

Sorry for the long question, any help regarding this will be appreciated.

Was it helpful?

Solution

I suggest you start by reading this description in MSDN of the interfaces which ActiveX controls may expose.

You will need to implement at least the minimum functionality (i.e. minimal set of interfaces) to keep the Oracle Forms Builder happy. Just implementing IDispatch is not sufficient.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top