Ответить на сообщение
Вернуться к теме
Вы отвечаете на сообщение:
Автор: DDK (05.03.2007 в 08:42)
fstream inputromfile(filepath.c_str(), ios::in|ios::binary); SetCurrentDirectory(RTC.defworkdir.c_str()); fstream tempromfile("temp.rom", ios::out|ios::in|ios::binary|ios::trunc); SetFileAttributes("temp.rom", FILE_ATTRIBUTE_HIDDEN); int i = 0, length, pbarstep; char * buffer = new char[128]; inputromfile.seekg(0, ios_base::end); length = inputromfile.tellg(); inputromfile.seekg(0, ios_base::beg); pbarstep = length / 128 / 100; MainForm->ProgressBar1->Visible = true; while(!inputromfile.eof()) { if(i%pbarstep == 0) { MainForm->ProgressBar1->Position += 1; } inputromfile.read(buffer, 128); tempromfile.write(buffer, 128); i+=128; } inputromfile.close(); tempromfile.close();
Ваше имя:
Пароль:
Цитировать Используйте тэги для выделения текста: Код: [code][/code] Жирный: [b][/b] Наклонный: [i][/i] URL: [url][/url]
Сообщение:
Прикрепить: