导入jna
<dependency>
<groupId>com.sun.jna</groupId>
<artifactId>jna</artifactId>
<version>3.0.9</version>
</dependency>
/**
* 获取指纹插件 初始化DLL(JNA调用dll)
* ps:dll需是对应jdk 位数
* C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\dumpbin.exe" /headers C:\Windows\SysWOW64\MXOTDLL.dll
* windows查看 对应 Visual Studio /headers dll 查看dll位数
* @author liu
* 2019年4月17日
*/
public static interface RtcPubLibrary extends Library {
// JNA调用dll 初始化
RtcPubLibrary instance = (RtcPubLibrary) Native.loadLibrary("C:\\Windows\\SysWOW64\\MXOTDLL.dll", RtcPubLibrary.class);
// dll函数
int MXIdentify(byte[] T1,byte[] T2);
}
/**
* 比对
* liu
* 2019年4月17日
* @param t1
* @param t2
* @return
* @throws Exception
*/
public static int autoGetHtldt(String t1,String t2) throws Exception {
return RtcPubLibrary.instance.MXIdentify(DatatypeConverter.parseBase64Binary(t1).clone(), DatatypeConverter.parseBase64Binary(t2).clone());
}
ps:DatatypeConverter.parseBase64Binary 解码base64
下载插件 https://download.youkuaiyun.com/download/qq_19471197/11252017 64位
https://download.youkuaiyun.com/download/qq_19471197/11252014 32位