Returns a list of values in this registry key. @param p_rvValues Where to store information about the values.
| 167 | // @param p_rvValues Where to store information about the values. |
| 168 | // |
| 169 | void AtlRegKey::GetValues(ValueInfoV& p_rvValues) const |
| 170 | { |
| 171 | // Scan values, starting with the first one. |
| 172 | std::wstring valueName(16384, L'\0'); // See MSDN |
| 173 | LONG res = ERROR_SUCCESS; |
| 174 | for (DWORD index = 0; res == ERROR_SUCCESS; ++index) { |
| 175 | DWORD valueNameSize = gsl::narrow<DWORD>(valueName.size()); |
| 176 | res = ::RegEnumValueW(m_Key.m_hKey, index, &*valueName.begin(), &valueNameSize, |
| 177 | nullptr, nullptr, nullptr, nullptr); |
| 178 | if (res == ERROR_SUCCESS) { |
| 179 | p_rvValues.emplace_back(m_Key.m_hKey, valueName.c_str()); |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | // |
| 185 | // Returns a list of subkeys of this registry key. |
no test coverage detected