This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java-COM, Jacob, C++

 
Alexandr Shvedov
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I have a couple of questions concerning of Java - COM access.
I need to organize data exchange beetween C and Java Program. I decided to use COM technology for that task. I did COM object and registered it. This object represents hardware device and Java program simulate this device, drawing some blinking lamps and so on. The C++-program on the other side communicate with this device.
The idea is that user might "switch ON" device only from Java program. "Switch ON" means that COM object must be created by command. C-program when lanched must be connected to this object, and must not create a new one. I know that there is ROT(Running Object Table) in system, and it is possible to get object from there. The questions are:

1. Does anybody do something like that? Do you have any advices for me?
2. If I'll use JACOB does it register object in ROT, when I'll call createActiveXInstance()? If not then I'll probably should deal with JNI.
3. Do you have some sources of information where to get C++ code samples (Creating object, registering in in ROT, getting reference to it)?
Thank you.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google for "Java COM Bridge". There are many products of varying costs and capabilities. There are even all Java implementations of DDE.
 
Jean-Francois Briere
Ranch Hand
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With JACOB you have the ActiveXComponent.connectToActiveInstance() method so you could verify if its already running before creating it.

Regards
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic