| 16 | } |
| 17 | |
| 18 | bool IniFile::ReadBool(PCWSTR section, PCWSTR name, bool defaultValue) { |
| 19 | auto value = ReadInt(section, name, -1); |
| 20 | if (value == -1) |
| 21 | return defaultValue; |
| 22 | return value ? true : false; |
| 23 | } |
| 24 | |
| 25 | int IniFile::ReadInt(PCWSTR section, PCWSTR name, int defaultValue) { |
| 26 | return ::GetPrivateProfileInt(section, name, defaultValue, _path); |