S
Si
I currently have a simple MFC C++ dialog program that uses the Windows API
SendMessage() method to send a message to another third-party application
(call this "Application X") and I want to recreate that program in Java. The
program contains some fairly complicated stuff that handles the
SendMessage() calls. It also uses the WindowProc() method to handle the
response message sent back from the Application X.
I think I have two options to allow me to achieve my goal:
1) Re-write the applicaton in Java and compile my C++ message handling code
into a DLL file, then call those methods in the DLL from the Java
application using JNI. This has the advantage that I already have the
message handling code written in C++.
2) Re-write the application enitrely in Java and do all the message sending
Windows API stuff directly in Java. This may be a more stable long-term
solution but I'm not entirely sure whether it is possible or how it is done.
Does anyone have any opinions on how I should go ahead and do this? Should I
use option 1 or 2? Or any other approach I should consider? Any recommended
reading material on this area?
One other thing that concerns me is the WindowProc() method - does this work
in a DLL (i.e. how do Windows DLLs send messages to and receive messages
from other applications?)?
Thanks in advance.
SendMessage() method to send a message to another third-party application
(call this "Application X") and I want to recreate that program in Java. The
program contains some fairly complicated stuff that handles the
SendMessage() calls. It also uses the WindowProc() method to handle the
response message sent back from the Application X.
I think I have two options to allow me to achieve my goal:
1) Re-write the applicaton in Java and compile my C++ message handling code
into a DLL file, then call those methods in the DLL from the Java
application using JNI. This has the advantage that I already have the
message handling code written in C++.
2) Re-write the application enitrely in Java and do all the message sending
Windows API stuff directly in Java. This may be a more stable long-term
solution but I'm not entirely sure whether it is possible or how it is done.
Does anyone have any opinions on how I should go ahead and do this? Should I
use option 1 or 2? Or any other approach I should consider? Any recommended
reading material on this area?
One other thing that concerns me is the WindowProc() method - does this work
in a DLL (i.e. how do Windows DLLs send messages to and receive messages
from other applications?)?
Thanks in advance.