winapi - How to use JNA PostMessage in Java 8 -


the following code worked in older java versions, seems have quit working in java 8. know why happened, , how fix it?

public static string notifyexternalapplication() {     stringbuffer buf = new stringbuffer("");     try {         user32.hwnd fusionmsg = user32.instance.findwindow("tfusionhdtvtray","hdtv tray");         int wmuserplusoffset = 0x400 + 5014;         user32.wparam 2 = new user32.wparam(2l);         user32.lparam 0 = new user32.lparam(0l);         boolean fusresult = user32.instance.postmessage(fusionmsg, wmuserplusoffset, two, zero);         buf.append(" fusresult " + fusresult + "\n");     } catch (runtimeexception e) {         e.printstacktrace();         buf.append(" " + e.getmessage());     }      return new string(buf); } 

edit: when code runs in os's, returns " fusresult true". it's in newer java version, seems have no effect.

edit2: research done - ran same code on same system, different versions of java. results posted here. clarity - exact code posted , result stated. result if question answered (usefulness) - myself, , other coders use technique have option code working again.


Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -