Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I pass 'MyClass object' to a custom ActiveX control? 1

Status
Not open for further replies.

joelwenzel

Programmer
Jun 28, 2002
448
I am creating an activeX control for graphing. I have completed the code to work without activeX and now I want to transfer it to activeX for easy implementation in other projects. Unfortunately, I cannot figure out a way to pass an object from a class I made to a public control method. I can only pass standard objects such as int, char, etc. Is this a limitation of activeX or is there something I am missing?

Thanks
 
You can do that only if your class is a COM object as a COM interface inherited from IUnknown. Also you may do it if your ActiveX is inproc and knows how to work with your class, but not always. Another situation is passing by value. You can pass by vale, but also in this situation the ActiveX must know how to handle that information.

Ion Filipski
1c.bmp
 
thanks....I do not know anything about COM but is it generally avoided? Is activeX the standard? Should I try to 'make' my code work with activeX?
 
Yes, you should do that. I'd say you should do all your objects that comunicate with ActiveX at IDL level.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top