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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -