I wrote program in java which is using some kind of win lib and now I want to write one more program to simulate other one. I mean, it should be going like that :
- first program asking lib for some simple data ( just true false)
- and other program in this same time by using function from this lib setting some variable in this lib which might be return to first program…
- both programs are independent first (lets say “getter”) in java and second (“setter”) in c++… I have already set all variables in lib as static but it didn’t solved problem.
Is this kind of solution even possible? or I have to use maybe some kind of socket or else
thanks for replay
I’ve been working with this kind of stuff (Java + dll + another programs) and I can tell that the libraries executed from another program and Java doesn’t share the static variables, so I think you won’t be able to do it that way.
The example that I have uses a window, whose size is 0, to exchange messages between the two programs (Java and VB 6.0), the first call between the two programs share the window handler, but I think this isn’t the best way to do it, and, in addition, it has some limitations.
I expose the ways I think that could match your problem:
The last one would be the one that I’ll use if I must implement something like that, but that depends on you.