INI(Initialization) 파일 포맷은 설정 파일에 대한 de facto 표준이다. INI 파일은 단순 구조의 텍스트 파일로 이루어져 있다. 보통 마이크로소프트 윈도와 연결되어 있지만 다른 운영 체제에서도 사용할 수 있다. "INI 파일"이라는 이름은 ".INI"라는 파일 확장자가 따라오지만, ".CFG", ".conf", ".TXT"등의 다른 확장자를 사용하기도 한다.
📄 GetPrivateProfileInt Syntax
UINT GetPrivateProfileInt(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
INT nDefault,
LPCTSTR lpFileName
);
📄 GetPrivateProfileString function Syntax
DWORD GetPrivateProfileString(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
LPCTSTR lpDefault,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
);
📄 WritePrivateProfileStringA Syntax
BOOL WritePrivateProfileStringA(
LPCSTR lpAppName,
LPCSTR lpKeyName,
LPCSTR lpString,
LPCSTR lpFileName
);
📄 [C/C++] INI File Example Source Code
; 홍길동이 2001년 4월 1일에 마지막으로 수정하였음
[owner]
name=홍길동
organization=최고의 제품
[database]
server=192.0.2.62 ; 네트워크 이름 변환이 동작하지 않는 경우 IP 주소를 사용한다
port=143
file="payroll.dat"
////////////////////////////////////////////////////////////////////////////////////////////////////////
WritePrivateProfileString('section_name', 'key_name', `variable`, `file_path`);
GetPrivateProfileString("section_name", "key_name", 'default_value', 'variable', 'length', 'file_path');
////////////////////////////////////////////////////////////////////////////////////////////////////////
🚀 REFERENCE
INI 파일 - 위키백과, 우리 모두의 백과사전
위키백과, 우리 모두의 백과사전. INI(Initialization) 파일 포맷은 설정 파일에 대한 de facto 표준이다. INI 파일은 단순 구조의 텍스트 파일로 이루어져 있다. 보통 마이크로소프트 윈도와 연결되어 있지만 다른 운영 체제에서도 사용할 수 있다. "INI 파일"이라는 이름은 ".INI"라는 파일 확장자가 따라오지만, ".CFG", ".conf"[1][2], ".TXT"[3] 등의 다른 확장자를 사용하기도 한다. 매개 변수 INI 파일에
ko.wikipedia.org
GetPrivateProfileString function (winbase.h)
Retrieves a string from the specified section in an initialization file.
docs.microsoft.com
'#컴퓨터 과학 [Computer Science] > C/C++' 카테고리의 다른 글
[ObjectiveC] Objective-C 요약 (0) | 2022.03.31 |
---|---|
[C/C++] C++ 백터와 배열의 차이점 (C++ Vector and Array Difference) (0) | 2020.02.23 |
[C/C++] 시리얼 통신 (Serial Communication) (0) | 2019.09.04 |
[C/C++] 전송 제어 프로토콜 (TCP, Transmission Control Protocol) (0) | 2019.06.19 |
C/C++ Computer Language (0) | 2019.05.06 |
댓글