| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- // 下列 ifdef 块是创建使从 DLL 导出更简单的
- // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 FINGERPRINTNANTIAN41_EXPORTS
- // 符号编译的。在使用此 DLL 的
- // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
- // FINGERPRINTNANTIAN41_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
- // 符号视为是被导出的。
- #include "FingerPrintClass.h"
- #include "Gvar.h"
- // 此类是从 FingerPrint.Nantian.4.1.dll 导出的
- class FingerPrintNantian21 : public FingerPrintClass
- {
- public:
- FingerPrintNantian21();
- ~FingerPrintNantian21();
- // TODO: 在此添加您的方法。
- //
- // Open Device
- // if usb device, set dwPort = 0
- virtual ErrorCodeEnum DevOpen(DWORD dwPort, DWORD dwBaudRate);
- //扫描指纹并保存指纹图片到默认路径下(dep目录下)
- //计算特征值,iLength:输入代表buf最大长度,输出为特征实际长度
- //Compute features
- virtual ErrorCodeEnum Image2Feature(const char* imagePath, LPBYTE lpbFeature, int &iLength);
- //生成特征模板(注册时使用)
- //Convert image to template
- virtual ErrorCodeEnum Image2Template(const char* imagePath1, const char* imagePath2, const char* imagePath3, LPBYTE lpbTemplate, int &iLength);
- //比对校验
- //Match the feature
- virtual ErrorCodeEnum Match(LPBYTE lpbTemplate[], int iTemplateLen[] ,int templateNum, LPBYTE lbpFeature, int &iFeatureLen ,int level);
- //取消采集指纹图片
- virtual ErrorCodeEnum Cancel();
- //
- // Get category infomation about device.
- //
- virtual ErrorCodeEnum GetDevCategory(DevCategoryInfo &devCategory);
- // Reset device.
- // Do the cleaning work and initialize device again in order to return to
- // the normal condition.
- virtual ErrorCodeEnum Reset();
- //
- // Close device and do the cleaning work.
- // ex. close connection,close port,release memery and so on
- virtual ErrorCodeEnum DevClose();
- // Get last error the device issued.
- // Error message must include explanatory memorandum ,the original error
- // code and anything in favour of location problem.
- virtual ErrorCodeEnum GetLastErr(DevErrorInfo &devErrInfo);
- private:
- Gvar *m_gvar;
- DevErrorInfo m_errinfo;
- unsigned char pRawData[512*512+1];
- unsigned char pBmpData[512*512+1];
- char ErrInfo[500];
- ErrorCodeEnum m_ecode;
- DWORD m_mode;
- };
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #pragma pack(push, 1)
- #define FINGERPRINTNANTIAN21_API __attribute__((visibility("default")))
- FINGERPRINTNANTIAN21_API ErrorCodeEnum CreateDevComponent(DeviceBaseClass *&baseObj);
- FINGERPRINTNANTIAN21_API ErrorCodeEnum ReleaseDevComponent(DeviceBaseClass *&pBaseObj);
- #pragma pack(pop)
- #ifdef __cplusplus
- }
- #endif
|