MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / GetValues

Method GetValues

PathCopyCopy/src/AtlRegKey.cpp:169–182  ·  view source on GitHub ↗

Returns a list of values in this registry key. @param p_rvValues Where to store information about the values.

Source from the content-addressed store, hash-verified

167// @param p_rvValues Where to store information about the values.
168//
169void 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.

Callers 1

GetCOMPluginsMethod · 0.45

Calls 2

sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected