范例:弹出win32 提示框
import com.sun.jna.Native;
import com.sun.jna.WString;
import com.sun.jna.win32.StdCallLibrary;
public class App{
public interface User32 extends StdCallLibrary {
User32 INSTANCE = (User32) Native.loadLibrary("user32", User32.class);
void MessageBoxW(int wnd, WString txt, WString caption, long type);
}
public static void main(String[] args) {
User32.INSTANCE.MessageBoxW(0, new WString("汉字正文"), new WString("汉字标题"), 1);
}
}