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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -