|
@@ -3,6 +3,7 @@
|
|
|
#include "EventCode.h"
|
|
|
#include "FingerPrint_UserErrorCode.h"
|
|
|
#include "GetDevInfoHelper.h"
|
|
|
+#include "path.h"
|
|
|
|
|
|
#define FINGERPRINT_SCAN_TIMEOUT 15000
|
|
|
#define FINGERPRINT_SCAN_INTERNAL 100
|
|
@@ -280,7 +281,7 @@ ErrorCodeEnum CFingerPrintFSM::OnInit()
|
|
|
if(strDepPath.IsNullOrEmpty()) {
|
|
|
Dbg("Get Dep path failed!");
|
|
|
} else {
|
|
|
- CSimpleStringA fullFilePath = strDepPath + "\\" + newFileName;
|
|
|
+ CSimpleStringA fullFilePath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", (const char*)strDepPath, (const char*)newFileName);
|
|
|
triedFlag = TRUE;
|
|
|
dllName = fullFilePath;
|
|
|
Dbg("Load library again: %s", (LPCTSTR)dllName);
|
|
@@ -493,22 +494,24 @@ int CFingerPrintFSM::GetImageAndFeature(SpReqAnsContext<FingerPrintService_GetIm
|
|
|
{
|
|
|
case 1:
|
|
|
fileName = "finger1.bmp";
|
|
|
- m_strPath1 = strPath + "\\" + fileName;
|
|
|
+ m_strPath1 = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", (const char*)strPath, (const char*)fileName);
|
|
|
break;
|
|
|
case 2:
|
|
|
fileName = "finger2.bmp";
|
|
|
- m_strPath2 = strPath + "\\" + fileName;
|
|
|
+ m_strPath2 = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", (const char*)strPath, (const char*)fileName);
|
|
|
break;
|
|
|
case 3:
|
|
|
fileName = "finger3.bmp";
|
|
|
- m_strPath3 = strPath + "\\" + fileName;
|
|
|
+ m_strPath3 = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", (const char*)strPath, (const char*)fileName);
|
|
|
break;
|
|
|
default:
|
|
|
fileName = "finger.bmp";
|
|
|
break;
|
|
|
}
|
|
|
- strPath = strPath + "\\" + fileName;
|
|
|
+ strPath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", (const char*)strPath, (const char*)fileName);
|
|
|
+
|
|
|
Dbg("get imageName success: %s", strPath);
|
|
|
+
|
|
|
bool bScanSuccess = false;
|
|
|
m_bCancelRegister = false;
|
|
|
bool bGetTemplateSuc = true;
|
|
@@ -681,7 +684,7 @@ ErrorCodeEnum CFingerPrintFSM::DeleteFileIfExisted(LPCTSTR fileName)
|
|
|
}
|
|
|
CSimpleStringA strPath, strObjPath;
|
|
|
ErrorCodeEnum errCode = m_pEntity->GetFunction()->GetPath("Dep", strPath);
|
|
|
- strObjPath = strPath + "\\" + fileName;
|
|
|
+ strObjPath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", (const char*)strPath, (const char*)fileName);
|
|
|
WIN32_FIND_DATA findData;
|
|
|
if (FindFirstFileA((LPCTSTR)strObjPath, &findData) != INVALID_HANDLE_VALUE)
|
|
|
{
|
|
@@ -740,7 +743,7 @@ ErrorCodeEnum CFingerPrintFSM::Match(SpReqAnsContext<FingerPrintService_Match_Re
|
|
|
return Error_Param;
|
|
|
}
|
|
|
CSimpleStringA fileName = "finger.bmp";
|
|
|
- strPath = strPath + "\\" + fileName;
|
|
|
+ strPath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", (const char*)strPath, (const char*)fileName);
|
|
|
Dbg("get imageName success: %s", strPath);
|
|
|
bool bScanSuccess = false;
|
|
|
bool bNotFindImage = false;
|