my dog learned polymorphism
The moose likes Other JSE/JEE APIs and the fly likes using ocx in java (JNI) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "using ocx in java (JNI)" Watch "using ocx in java (JNI)" New topic

using ocx in java (JNI)

Isha Mackker

Joined: Oct 18, 2005
Posts: 29
Hi All,
I have a third party ocx that I'll be using in my java application. For that, I need to write a wrapper dll that I can load into my application through JNI. This dll will be interacting with the ocx and will help me call the methods in ocx and mapping the data types in Java to the ones in C.
My question is how can I generate a header file from the ocx file so that I can include that in the wrapper dll and call the methods defined in the ocx. This way I'll be implicitly loading the ocx into the wraper dll. Or is there any other way to load the ocx into my wrapper dll?
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Is this really a question about JNI?

Although you want to use JNI in your product, it sound to me like the problems you are having are associated with the OCX, which if I recall correctly is a Microsoft thing.

If your question is really about Microsoft programming, you probably won't get a useful answer here. You could try JavaRanch "General Computing" section of JavaRanch or, more likely, a Microsoft-specific forum.

If your problem really is to do with JNI, please explain how, in more detail. I've done a fair amount of JNI programming, but I can't begin to answer the question, as you've so far posed it.

Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
I agree. Here's the link:
subject: using ocx in java (JNI)
It's not a secret anymore!