int CAT_OLC_DUTDlg::CreateTeatLog(CString result)//jamie
{
//OutputDebugStringW(result);
//return 0;
FILE* fp = NULL;
SYSTEMTIME T;
CTime curTime = CTime::GetCurrentTime();
_tfopen_s(&fp, _T("TestLog.txt"), _T("a+"));
if (fp == NULL) {
//fclose(fp);
return 1;
}
else {
//_ftprintf(fp, _T("[AT_KB]\n"));
GetLocalTime(&T);
_ftprintf(fp, _T("TestDate=%04d-%02d-%02d %02d:%02d:%02d:%02d:"), T.wYear, T.wMonth, T.wDay, T.wHour, T.wMinute, T.wSecond, T.wMilliseconds);
_ftprintf(fp, _T(" %s\n"), result);
_ftprintf(fp, _T("\n"));
}
fclose(fp);
return 0;
}