>>>
>>>Although it will work, but if i try to write a value for this key, always failed.The GetPrivateProfileString API always return this key's name!
>>>
>>>How can i do?
>>
>>In addition to Ed's reply, you can use my IniFiles class from the download section.
>
>
>I've been playing around with the IniFiles class this afternoon and found that the methods used to write keys don't work under Win2k (Win98 ok). The read methods work fine.
>
>Any ideas? I haven't played with REGISTRY.VCX yet but that's next on the list.
I just ran a test under Win2K Pro SP3 without a problem. The file, BTW, didn't originally exist.
SET PROCEDURE TO inifiles ADDITIVE
oIni = CREATEOBJECT('Ini_Files')
lcini = ADDBS(SYS(5) + SYS(2003)) + 'foo.ini'
oIni.PutIniEntry('geo', 'entry', 'value', lcini)
oIni.PutIniEntry('geo', 'entry2', 'value2', lcini)
Are you, by any chance trying to write to WIN.INI?
George
Ubi caritas et amor, deus ibi est