Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.11.05;
Скачать: CL | DM;

Вниз

TMemIniFile...   Найти похожие ветки 

 
pathfinder   (2006-10-19 09:18) [0]

Доброе утро!
"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?


 
Elen ©   (2006-10-19 09:21) [1]


> pathfinder

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


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


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

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


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


> pathfinder

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


 
MBo ©   (2006-10-19 09:29) [4]

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


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


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

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

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

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


 
Джо ©   (2006-10-19 09:37) [6]

> [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:43) [7]

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


 
MBo ©   (2006-10-19 09:50) [8]

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


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

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


 
MBo ©   (2006-10-19 10:01) [10]

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


 
Джо ©   (2006-10-19 10:07) [11]

Про 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 написано то, что ты привел.


 
pathfinder   (2006-10-19 10:25) [12]

Все понятно..кривая справка в 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."



Страницы: 1 вся ветка

Текущий архив: 2006.11.05;
Скачать: CL | DM;

Наверх




Память: 0.49 MB
Время: 0.033 c
2-1161553712
nporaMep
2006-10-23 01:48
2006.11.05
Как получить путь к программе?


2-1161067677
morda
2006-10-17 10:47
2006.11.05
MySQL


10-1125549625
ALI_YES
2005-09-01 08:40
2006.11.05
COM в ручную


15-1160968833
Slider007
2006-10-16 07:20
2006.11.05
С днем рождения ! 15 октября


15-1161146287
Layner
2006-10-18 08:38
2006.11.05
WindowsXP: один раз вошел в домен, теперь локально работаю