• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calling ActiveX OCX from Java

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I'm trying to call an ocx component from my java application. As the ocx is written by third party, I have to create a wrapper class for the ocx.
Now, if I use the microsoft jactivex.exe to create the wrapper class, I will have to use their compiler and interpreter to run my application, which is what I don't want.
I know that there are some activex-java bridge, but it is just too expensive. The one by Sun only works one way, ie. allows java code to be called from activex/com, but not the other way.
Is there any other way I can do it? Does anyone knows how I can call the methods inside the ocx through C program?
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use VC++ to generate a wrapper for any ocx objects (written in VC++ or VB or even Java (I guess). When I was using it, the ocx was written in VB w/o source code.
Then you can start from there.

Thanks!
Roseanne
Join our Study Group when certified

[This message has been edited by Roseanne Zhang (edited August 28, 2001).]
 
ST Moong
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
Thanx for your reply.
I was thinking of using the C code corresponding to the header file generated using javah, to call the C++ wrapper class methods, which in turn call the ActiveX component method.
But the problem is how do I instantiate the wrapper class so that I can call its methods. I'm not able to instantiate the C++ wrapper class from my java code.
 
yeah, but ... what would PIE do? Especially concerning this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic