package me.kagura;
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Platform;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.PointerByReference;
import java.util.HashMap;
import java.util.Map;
/**
* Java通过JNA调用WinRing0.dll实现模拟驱动级别按键
* 运行前请从https://github.com/QCute/WinRing0下载对应的.sys跟.dll并放置到jre或jdk的bin目录下
*/
public class WinRing0Util {
static final String WR0_DLL_NAME = "WinRing0" + (Platform.is64Bit() ? "x64" : "");
static WR0 WR0_INSTANCE = Native.loadLibrary(WR0_DLL_NAME, WR0.class);
static U32 U32_INSTANCE = Native.loadLibrary("User32", U32.class);
// 虚拟键值码对应表,可以