MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / values

Method values

MonaBase/sources/WinRegistryKey.cpp:321–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319
320
321void WinRegistryKey::values(WinRegistryKey::Values& vals) {
322 Exception ex; // ignore here
323 if (!open(ex))
324 return;
325
326 DWORD valueCount = 0;
327
328 if (RegQueryInfoKey(_hKey, NULL, NULL, NULL, NULL, NULL, NULL, &valueCount, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
329 return;
330 char buf[256];
331 DWORD bufSize = sizeof(buf);
332 for (DWORD i = 0; i< valueCount; ++i)
333 {
334 if (RegEnumValueA(_hKey, i, buf, &bufSize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
335 vals.emplace_back(buf);
336 bufSize = sizeof(buf);
337 }
338}
339
340
341} // namespace Mona

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected