Re: Communicating with a Windows mfc application



matteo.dt@xxxxxxxxx wrote:

i have a swing java program with a Timer thread. In this thread I need
to set tasks and to retrieve parameters to a Windows mfc application
every time the Timer activates. I could implement a jni dll that
manages the communication with the Win application. For now i've tried
with RegisterWindowMessage, SendMessage and GetMessage sdk functions
but, as these are based on windows handlers, nothing works.

I'm not a specialist Windows programmer, but I think that you'd have to start a
separate thread (Windows not Java) with its own Windows event dispatch loop.
Your JNI code would start that thread. Later calls (via) JNI would communicate
with that thread to ask it to use the window/thread related Windows APIs.

-- chris



.



Relevant Pages

  • Re: Text aus anderen (nicht-Java) Applikationen lesen
    ... Evtl. ... Unter Windows 98 (mit späteren Windows habe ich keine API-Programmierung ... Das ist toll:) Mit JNI hab ich schonmal gearbeitet, ... Windows-API hab ich null Erfahrung. ...
    (de.comp.lang.java)
  • Re: [JNI] Catch Ctrl+Mouseclick on Windows?
    ... > of how to create my the .dll and do the communication with java. ... I did this kind of JNI programm. ... Under Windows, i use the GetAsyncKeyState functiun but it's not obvious ...
    (comp.lang.java.programmer)
  • Re: UTF-8 in Filenamen unter Solaris
    ... MBCS (Ketten von Zeichen, die aus mehr als einem Byte bestehen ... Per JNI auf die POSIX-API zugreifen, mit einer Schnittstelle, die ... Windows einsetzen. ...
    (de.comp.lang.java)
  • Re: volume label
    ... This would be for a program that I would run in Windows XP. ... because the label shouldn't be changing. ... This is a platform specific notion, so you need JNI to do this. ...
    (comp.lang.java.programmer)
  • How can I get the stack trace when Java JVM/JNI crashes ?
    ... I succeeded in entering in my JNI C++ code with VS .NET (I start the ... Under Windows, we have Structured Exception Handler which allows you, ... Dr. Watson or other crash handlers to inspect the crash context. ... VS .NET catching the SEH exception. ...
    (comp.lang.java.programmer)