|
@@ -62,7 +62,6 @@ BOOL ReplaceFileContent(LPCTSTR lpFile, std::vector<std::string> &vtOldContent,
|
|
|
return FALSE;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
CFile myFile;
|
|
|
CFileException fileExp;
|
|
|
if ( !myFile.Open(lpFile, CFile::modeReadWrite, &fileExp) )
|
|
@@ -71,6 +70,7 @@ BOOL ReplaceFileContent(LPCTSTR lpFile, std::vector<std::string> &vtOldContent,
|
|
|
return FALSE;
|
|
|
}
|
|
|
|
|
|
+ printf(_T("替换开始[%s]!\n"),lpFile);
|
|
|
DWORD dwFileLength = myFile.GetLength();
|
|
|
BYTE *pData = new BYTE[dwFileLength];
|
|
|
memset(pData, 0, dwFileLength);
|
|
@@ -90,7 +90,7 @@ BOOL ReplaceFileContent(LPCTSTR lpFile, std::vector<std::string> &vtOldContent,
|
|
|
if ( nPos != std::string::npos )
|
|
|
{
|
|
|
strContent.replace(nPos, it_old->size(), it_new->c_str());
|
|
|
- printf(_T("替换【%s】-【%s】成功\n"), it_old->c_str(), it_new->c_str());
|
|
|
+ printf(_T("替换 %s - %s 成功\n"), it_old->c_str(), it_new->c_str());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -103,7 +103,6 @@ BOOL ReplaceFileContent(LPCTSTR lpFile, std::vector<std::string> &vtOldContent,
|
|
|
myFile.Write(strContent.c_str(), strContent.size());
|
|
|
myFile.Close();
|
|
|
|
|
|
-
|
|
|
return TRUE;
|
|
|
}
|
|
|
|