如何用VFP读写配置文件(.INI)?
---------------------------------------------------------------
******读写(读取) INI 文件内容
--------------------------------
******以下是一个读取INI文件的例子1*******
* Reading an arbitrary INI file into a cursor
* 读一个 INI 文件到一个游标
Local lcFileName
lcFileName = getfile("ini")
Create CURSOR csResult (section C(50), keyname C(50),keyvalue C(200))
lcSections = getSections (lcFileName)
= str2cursor (lcSections, "csSections")
Select csSections
Scan ALL
Select csSections
lcKeys = getKeys (lcFileName, csSections.strvalue)
= str2cursor (lcKeys, "csKeys")
Select csKeys
Scan ALL
lcValue = getKeyValue (lcFileName,csSections.strvalue, csKeys.strvalue)
Insert INTO csResult VALUES (csSections.strvalue, csKeys.strvalue, lcValue)
Endscan
Endscan
Select csResult
Go TOP
如何用VFP读写配置文件(.INI)?
最新推荐文章于 2020-01-04 15:35:33 发布
本文介绍了如何使用VFP(Visual FoxPro)进行.INI配置文件的读写操作。通过示例代码展示了读取INI文件到游标,以及利用Win32API DLL函数进行写入和读取配置信息的方法。
摘要由CSDN通过智能技术生成