User32 interface (platform library) is missing some WinAPI functions, so I tried extending it:
package myapp
import com.sun.jna.platform.win32.W32API
public interface User32 extends com.sun.jna.platform.win32.User32 {
    myapp.User32 INSTANCE
    boolean IsWindow(W32API.HWND hWnd)
}
But then calling myapp.User32.INSTANCE.FindWindow(..) results in java.lang.N开发者_如何学GoullPointerException: Cannot invoke method FindWindow() on null object
Your declaration of IsWindow is correct (I am using an identical declaration in my current project.)
Most likely you are failing to initialise INSTANCE.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论