void CCfg::WriteSysConfigLog(const char* strInfo, int nStatus)//状态码1:操作记录 2:错误记录//记录配置工具操作信息
{
//创建日记 并存储操作信息 路径为当前软件的路径
TCHAR wCurrentPath[MAX_PATH];
GetCurrentDirectory(MAX_PATH, wCurrentPath);
TCHAR wPath[MAX_PATH];
swprintf_s(wPath, L"%s\\Log.txt", wCurrentPath);
//ios_base:: app;//以追加的形式打开文件
// 写入文件
std::ofstream outfile(wPath, ios_base::app);
if (outfile.is_open()) {
outfile << strInfo << std::endl;
outfile.close();
}
else
{
//std::cerr << "Unable to open file for writing." << std::endl;
return;
}
}