Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -N -ra13bee8e2ecd1e8f61be0aa9b51d99acdc43a5d0 -r8dc649003961dad64b92da67426814fb5dd862e0 --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision a13bee8e2ecd1e8f61be0aa9b51d99acdc43a5d0) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 8dc649003961dad64b92da67426814fb5dd862e0) @@ -27,7 +27,6 @@ #include "FilterDlg.h" #include "StringHelpers.h" #include "ch.h" -#include "../libicpf/file.h" #include "../libchcore/TTaskConfigBufferSizes.h" #ifdef _DEBUG @@ -481,25 +480,25 @@ chcore::TBufferSizes bsSizes = chcore::GetTaskPropBufferSizes(m_tTaskDefinition.GetConfiguration()); fmt.SetFormat(GetResManager().LoadString(IDS_BSEDEFAULT_STRING)); - fmt.SetParam(_t("%size"), GetSizeString(bsSizes.GetDefaultSize(), true)); + fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetDefaultSize(), true)); m_ctlBufferSizes.AddString(fmt); if (!bsSizes.IsOnlyDefault()) { fmt.SetFormat(GetResManager().LoadString(IDS_BSEONEDISK_STRING)); - fmt.SetParam(_t("%size"), GetSizeString(bsSizes.GetOneDiskSize(), true)); + fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetOneDiskSize(), true)); m_ctlBufferSizes.AddString(fmt); fmt.SetFormat(GetResManager().LoadString(IDS_BSETWODISKS_STRING)); - fmt.SetParam(_t("%size"), GetSizeString(bsSizes.GetTwoDisksSize(), true)); + fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetTwoDisksSize(), true)); m_ctlBufferSizes.AddString(fmt); fmt.SetFormat(GetResManager().LoadString(IDS_BSECD_STRING)); - fmt.SetParam(_t("%size"), GetSizeString(bsSizes.GetCDSize(), true)); + fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetCDSize(), true)); m_ctlBufferSizes.AddString(fmt); fmt.SetFormat(GetResManager().LoadString(IDS_BSELAN_STRING)); - fmt.SetParam(_t("%size"), GetSizeString(bsSizes.GetLANSize(), true)); + fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetLANSize(), true)); m_ctlBufferSizes.AddString(fmt); } } @@ -903,23 +902,22 @@ UINT uiCount=0; try { - icpf::file file; - file.open(dlg.GetPathName(), FA_READ); + CFile file(dlg.GetPathName(), CFile::modeRead); // load files max 1MB in size; - ll_t llSize = file.get_size(); - if(llSize > 1*1024*1024 || llSize < 2) + unsigned long long ullSize = file.GetLength(); + if(ullSize > 1*1024*1024 || ullSize < 2) { AfxMessageBox(GetResManager().LoadString(IDS_IMPORTERROR_STRING)); return; } - ulSize = boost::numeric_cast(llSize); + ulSize = boost::numeric_cast(ullSize); spBuffer.reset(new BYTE[ulSize + 3]); // guarantee that we have null at the end of the string (3 bytes to compensate for possible odd number of bytes and for unicode) memset(spBuffer.get(), 0, ulSize + 3); - ulSize = file.read(spBuffer.get(), ulSize); - file.close(); + ulSize = file.Read(spBuffer.get(), ulSize); + file.Close(); } catch(...) { @@ -977,7 +975,7 @@ // report ictranslate::CFormat fmt(GetResManager().LoadString(IDS_IMPORTREPORT_STRING)); - fmt.SetParam(_t("%count"), uiCount); + fmt.SetParam(_T("%count"), uiCount); AfxMessageBox(fmt); } } @@ -1025,7 +1023,7 @@ { ictranslate::CFormat fmt; fmt.SetFormat(GetResManager().LoadString(IDS_EXPORTING_TASK_FAILED)); - fmt.SetParam(_t("%reason"), strError); + fmt.SetParam(_T("%reason"), strError); AfxMessageBox(fmt, MB_OK | MB_ICONERROR); }