Programming/Delphi
INI 파일 사용하기
통통만두
2010. 6. 30. 15:36
반응형
IniFile := TIniFile.Create(ChangeFileExt(Application.ExeName, '.ini')); try IniFile.WriteString('CONFIG','OriginalFolder', STRING_1); STRING_2 := IniFile.ReadString('CONFIG', 'DestFolder', DEFAULT); finally IniFile.Free; end;
Use File = IniFiles
Var = IniFile : TIniFile
STRING_1 = INI 파일에서 읽은 값을 저장할 문자열 변수
STRING_2 = INI 파일에서 읽은 값을 저장할 String or Integer 형 변수
DEFAULT = 해당하는 Section에 Ident가 없을 때 이 값으로 지정
Integer형은 WriteInteger, ReadInteger 로 입.출력할 수 있음.
반응형