fingerprint.nantian.1.1.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  2. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 FINGERPRINTNANTIAN41_EXPORTS
  3. // 符号编译的。在使用此 DLL 的
  4. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  5. // FINGERPRINTNANTIAN41_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  6. // 符号视为是被导出的。
  7. #include "FingerPrintClass.h"
  8. #include "Gvar.h"
  9. // 此类是从 FingerPrint.Nantian.4.1.dll 导出的
  10. class FingerPrintNantian21 : public FingerPrintClass
  11. {
  12. public:
  13. FingerPrintNantian21();
  14. ~FingerPrintNantian21();
  15. // TODO: 在此添加您的方法。
  16. //
  17. // Open Device
  18. // if usb device, set dwPort = 0
  19. virtual ErrorCodeEnum DevOpen(DWORD dwPort, DWORD dwBaudRate);
  20. //扫描指纹并保存指纹图片到默认路径下(dep目录下)
  21. //计算特征值,iLength:输入代表buf最大长度,输出为特征实际长度
  22. //Compute features
  23. virtual ErrorCodeEnum Image2Feature(const char* imagePath, LPBYTE lpbFeature, int &iLength);
  24. //生成特征模板(注册时使用)
  25. //Convert image to template
  26. virtual ErrorCodeEnum Image2Template(const char* imagePath1, const char* imagePath2, const char* imagePath3, LPBYTE lpbTemplate, int &iLength);
  27. //比对校验
  28. //Match the feature
  29. virtual ErrorCodeEnum Match(LPBYTE lpbTemplate[], int iTemplateLen[] ,int templateNum, LPBYTE lbpFeature, int &iFeatureLen ,int level);
  30. //取消采集指纹图片
  31. virtual ErrorCodeEnum Cancel();
  32. //
  33. // Get category infomation about device.
  34. //
  35. virtual ErrorCodeEnum GetDevCategory(DevCategoryInfo &devCategory);
  36. // Reset device.
  37. // Do the cleaning work and initialize device again in order to return to
  38. // the normal condition.
  39. virtual ErrorCodeEnum Reset();
  40. //
  41. // Close device and do the cleaning work.
  42. // ex. close connection,close port,release memery and so on
  43. virtual ErrorCodeEnum DevClose();
  44. // Get last error the device issued.
  45. // Error message must include explanatory memorandum ,the original error
  46. // code and anything in favour of location problem.
  47. virtual ErrorCodeEnum GetLastErr(DevErrorInfo &devErrInfo);
  48. private:
  49. Gvar *m_gvar;
  50. DevErrorInfo m_errinfo;
  51. unsigned char pRawData[512*512+1];
  52. unsigned char pBmpData[512*512+1];
  53. char ErrInfo[500];
  54. ErrorCodeEnum m_ecode;
  55. DWORD m_mode;
  56. };
  57. #ifdef __cplusplus
  58. extern "C"
  59. {
  60. #endif
  61. #pragma pack(push, 1)
  62. #define FINGERPRINTNANTIAN21_API __attribute__((visibility("default")))
  63. FINGERPRINTNANTIAN21_API ErrorCodeEnum CreateDevComponent(DeviceBaseClass *&baseObj);
  64. FINGERPRINTNANTIAN21_API ErrorCodeEnum ReleaseDevComponent(DeviceBaseClass *&pBaseObj);
  65. #pragma pack(pop)
  66. #ifdef __cplusplus
  67. }
  68. #endif