INI read and write

xiaoxiao2021-03-06  44

Function ReadiniFile (filename, section, ident: string): string;? // Read configuration file var? INI: tinifile; begin? ini: = tinifile.create (filename) ;? Result: = ini.readstring (section, Ident) , ''); inc.free; end; procedure write, Ident, Value: string; // Write INIFILEVAR? INI: tinifile; apathname: string; begin? try ??? apathname: = extractfiledir (filename); ??? IF not Directoryexists (apathname) THEN ????? forcedirector (apathname); ??? ini: = tinifile.create (filename); ??? ini.writestring (section, ide, value) ; ??? INI.FREE;? EXCEPT? END; END;

转载请注明原文地址:https://www.9cbs.com/read-86281.html

New Post(0)