| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #ifndef FINGERDEV_H
- #define FINGERDEV_H
- //#include "FpDriver.h"
- #include "serial.h"
- #include "public.h"
- #include "smutex.h"
- #define LS_ERROR_SUCCESS (1) //成功
- #define LS_ERROR_MATCH (0) //比对失败
- #define LS_ERROR_INVALID_PARAMETER (-1) //参数错误
- #define LS_ERROR_NOT_ENOUGH_MEMORY (-2) //内存分配失败,没有分配到足够的内存
- #define LS_ERROR_NOT_SUPPORT_FUNCTION (-3) //功能未实现
- #define LS_ERROR_DEVICE_NOT_FOUND (-4) //设备不存在
- #define LS_ERROR_DEVICE_NOT_INIT (-5) //设备未初始化
- #define LS_ERROR_INVALIDE_CODE (-6) //非法错误号
- #define LS_ERROR_OTHERERROR (-9) //其它错误
- #define LS_ERROR_TIMEOUT (-7) //超时
- #define LS_ERROR_FEATURE (-11) //特征错误
- #define LS_ERROR_TEMPLATE (-12) //模板错误
- #define LS_ERROR_KEY (-13) //密钥错误
- #define LS_ERROR_IMAGE_ERR (-14) //图像错误
- typedef char* (*WELLGetErrorInfo)(int nRetCode);
- typedef int (*WELLDeviceInit)(void);
- typedef int (*WELLDeviceClose)(void);
- typedef int (*WELLGetFingerprintAndMatch)(char *psRegBuf, int nTimeout);
- typedef int (*WELLGetFeature)(int nFinPos, int nTimeout, char *psVerBuf);
- typedef int (*WELLGetTemplate)(int nFinPos, int nTimeout, char *psRegBuf);
- // typedef int (*WELLFingerImageDecompress)(char *psCompressedFI,int nTimeout, char *psUnCompressedFI);
- // typedef int (*WELLLoadMainKey) (int iAlgorithm, int iMainKeyId, char *psKey, int nTimeout);
- // typedef int (*WELLLoadWorkKey) (int iMainKeyId, int iWorkKeyType, int iWorkKeyId, char *psKey, int nTimeout);
- // typedef int (*WELLCalculateData)(int iMode,int iWorkKeyId, char *psData, char *psCalculateData);
- // typedef int (*WELLFormatKey)(int nChannel);
- // typedef int (*WELLisKeyExist)(int iKeyType, int iKeyId);
- typedef int (*WELLMatch)( char *psRegBuf, char *psVerBuf, int iLevel);
- typedef int (*WELLGetVersion)( char *psRegBuf, char *psVerBuf);
- typedef int (*WELLImg2Bmp)(int nTimeOut, char* psBmpFile);
- typedef int (*WELLBmp2Feature)(int nFinPos, char* psImgPath1, char* psTZ, int* lpLength);
- typedef int (*WELLBmp2Template)(int nFinPos, char *psImgPath1, char *psImgPath2, char *psImgPath3, char *psMB, int *lpLength);
- typedef void( *WELLCancel)();
- class FingerDev
- {
- public:
- FingerDev();
- ~FingerDev();
- public:
- int Open(const char* sPathFile);
- int Close();
- int Reset();
- int GetFPIImg2Bmp(char *psImgPath);
- int GetFPIBmp2Feature(const char* imagePath, LPBYTE lpbFeature, int &iLength);
- int GetFPIBmp2Template(const char* imagePath1, const char* imagePath2, const char* imagePath3, LPBYTE lpbTemplate, int &iLength);
- int FPIMatch(LPBYTE lpbTemplate, LPBYTE lbpFeature, int level);
- int Cancel();
- int GetErrInfo(char* errMsg, int iRet);
- int GetVersion(char* ver);
- private:
- int Load_so(const char* sPathFile);
- int UnLoad_so();
- private:
- WELLGetErrorInfo pWELLGetErrorInfo;
- WELLDeviceInit pWELLDeviceInit;
- WELLDeviceClose pWELLDeviceClose;
- //WELLGetFingerprintAndMatch pWELLGetFingerprintAndMatch;
- WELLGetFeature pWELLGetFeature;
- WELLGetTemplate pWELLGetTemplate;
- // WELLFingerImageDecompress pWELLFingerImageDecompress;
- // WELLLoadMainKey pWELLLoadMainKey;
- // WELLLoadWorkKey pWELLLoadWorkKey;
- // WELLCalculateData pWELLCalculateData;
- // WELLFormatKey pWELLFormatKey;
- // WELLisKeyExist pWELLisKeyExist;
- WELLMatch pWELLMatch;
- WELLGetVersion pWELLGetVersion;
- WELLImg2Bmp pWELLImg2Bmp;
- WELLBmp2Feature pWELLBmp2Feature;
- WELLBmp2Template pWELLBmp2Template;
- WELLCancel pWELLCancel;
- HINSTANCE m_hDll;
- int m_iPort;
- };
- #endif // FINGERDEV_H
|