| 106 | } |
| 107 | |
| 108 | bool ConfigurationHolder::readNumericFromConfigFile(Configuration & configObject, int nBase) |
| 109 | { |
| 110 | WCHAR buf[21]; // UINT64_MAX in dec has 20 digits |
| 111 | DWORD read = GetPrivateProfileString(CONFIG_FILE_SECTION_NAME, configObject.getName(), L"", buf, _countof(buf), configPath); |
| 112 | |
| 113 | if (read > 0 && wcslen(buf) > 0) |
| 114 | { |
| 115 | #ifdef _WIN64 |
| 116 | configObject.setNumeric(_wcstoui64(buf, NULL, nBase)); |
| 117 | #else |
| 118 | configObject.setNumeric(wcstoul(buf, NULL, nBase)); |
| 119 | #endif |
| 120 | return true; |
| 121 | } |
| 122 | |
| 123 | return false; |
| 124 | } |
| 125 | |
| 126 | bool ConfigurationHolder::saveStringToConfigFile(const Configuration & configObject) const |
| 127 | { |
nothing calls this directly
no test coverage detected