How one extends JNA interface mappings? (Java)
Posted
by rukoche
on Stack Overflow
See other posts from Stack Overflow
or by rukoche
Published on 2010-05-30T04:09:13Z
Indexed on
2010/05/30
4:12 UTC
Read the original article
Hit count: 419
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.NullPointerException: Cannot invoke method FindWindow() on null object
© Stack Overflow or respective owner