Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

TMemIniFile... [D5, 2000]


pathfinder ©   (2006-10-19 09:18:00) 

Доброе утро!
"Call UpdateFile to copy INI file data stored in memory to the copy of the INI file on disk. UpdateFile is useful under Windows95, but has no effect under Windows NT as NT does not buffer INI file reads and writes."
Что значит не имеет эффекта под NT?


pathfinder   (2006-10-19 10:25:00) [1]

Все понятно..кривая справка в Delphi5

"TMemIniFile.UpdateFile
Flushes buffered INI file data to disk.
function UpdateFile; override;
Description
Call UpdateFile to copy INI file data stored in memory to the copy of the INI file on disk. UpdateFile is useful under Windows95, but has no effect under Windows NT as NT does not buffer INI file reads and writes.

UpdateFile overwrites all data in the disk copy of the INI file with the INI file data stored in memory.

If the Rename method is used to change the INI file the TMemIniFile uses, UpdateFile copies the INI file data in memory to a file of the new name. If the file does not already exist, it is created. I the new file already exists, it is overwritten."


Джо   (2006-10-19 10:07:00) [2]

Про TMemIniFile.UpdateFile написано:
Call UpdateFile to copy INI file data stored in memory to the copy of the INI file on disk UpdateFile overwrites all data in the disk copy of the INI file with the INI file data stored in memory.

If the Rename method is used to change the INI file the TMemIniFile uses, UpdateFile copies the INI file data in memory to a file of the new name. If the file does not already exist, it is created. If the new file already exists, it is overwritten.

А вот уже про TIniFile.UpdateFile написано то, что ты привел.


MBo   (2006-10-19 10:01:00) [3]

да уж, абзац...


pathfinder   (2006-10-19 10:00:00) [4]

Так что же за буфферизация имеется в виду? И под NT подразумевается только NT 4.0 или все последующие тоже?
Я попробовал использовать TMemIniFile под 2k..все работает


MBo   (2006-10-19 09:50:00) [5]

в хелпе от семерки такое, как в [0], написано про TIniFile, а не про TMemIniFile


pathfinder   (2006-10-19 09:43:00) [6]

так ведь TMemIniFile не использует WritePrivateProfileString, а пишет в TStrings, а при вызове UpdateFile сохраняет стринглист в файл..


Джо   (2006-10-19 09:37:00) [7]

> [5] pathfinder   (19.10.06 09:35)
>
> > MBo ©   (19.10.06 09:29) [4]
> >
> > >т.е. TMemIniFile под NT не работает?
> > Метод UpdateFile бесполезен в NT
>
> а что значит бесполезен? он же копирует данные из памяти
> в файл..

WritePrivateProfileString, на котором базирутся TIniFile, в NT не использует дисковое кеширование. Пишется сразу же в файл.


pathfinder   (2006-10-19 09:35:00) [8]


> MBo ©   (19.10.06 09:29) [4]
>
> >т.е. TMemIniFile под NT не работает?
> Метод UpdateFile бесполезен в NT

а что значит бесполезен? он же копирует данные из памяти в файл..

Я не совсем понимаю отличия его работы под NT. Объясните пожалуйста..

При создании экземпляра TMemIniFile данные загружаются в память..так? При вызове метода UpdateFile они пишутся в файл..так? Так в чем же разница?


MBo   (2006-10-19 09:29:00) [9]

>т.е. TMemIniFile под NT не работает?
Метод UpdateFile бесполезен в NT


Elen   (2006-10-19 09:28:00) [10]


> pathfinder

Работает. А для чего это надо?


pathfinder   (2006-10-19 09:26:00) [11]


> Elen ©   (19.10.06 09:21) [1]

т.е. TMemIniFile под NT не работает?


Elen   (2006-10-19 09:21:00) [12]


> pathfinder

но не имеет никакого эффекта под Windows NT, так как NT не буферизует файл INI при чтениях и записях


Наверх

Титульная страница Поиск, карта сайта Написать письмо