■ INI 파일 항목 값을 읽는 방법을 보여준다.
▶ 예제 코드 (VB)
1 2 3 4 |
[Examination] ExaminationType=5 |
▶ API 선언 (VB)
1 2 3 4 5 |
Declare Function WritePrivateProfileString& Lib "kernel32" Alias "WritePrivateProfileStringA" (strApplicationName As String, strKeyName As String, strKeyDefault As String, strFileName As String) Declare Function GetPrivateProfileString& Lib "kernel32" Alias "GetPrivateProfileStringA" (strApplicationName As String, strKeyName As String, strKeyDefault As String, strReturnValue As String, lSize As Long, strFileName As String) |
▶ 함수 호출 (VB)
1 2 3 |
Call GetPrivateProfileString("Examination", "ExaminationType", "00", strExaminationType, 10, "\examination\setting.ini") |