MCPcopy Create free account
hub / github.com/LibreVR/Revive / QueryKey

Function QueryKey

ReviveOverlay/revivemanifestcontroller.cpp:75–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void QueryKey(HKEY hKey, QStringList &id_array, QStringList &path_array)
76{
77 TCHAR achKey[MAX_KEY_LENGTH]; // buffer for subkey name
78 DWORD cbName; // size of name string
79 DWORD cSubKeys = 0; // number of subkeys
80 DWORD i, retCode;
81
82 // Get the class name and the value count.
83 retCode = RegQueryInfoKey(hKey, NULL, NULL, NULL, /* number of subkeys*/ &cSubKeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
84
85 // Enumerate the subkeys, until RegEnumKeyEx fails.
86 if (cSubKeys)
87 {
88 WCHAR path[MAX_PATH] = { 0 };
89 for (i = 0; i < cSubKeys; i++)
90 {
91 cbName = MAX_KEY_LENGTH;
92 retCode = RegEnumKeyEx(hKey, i,
93 achKey,
94 &cbName,
95 NULL,
96 NULL,
97 NULL,
98 NULL);
99 if (retCode == ERROR_SUCCESS && GetLibraryPath(path, MAX_PATH, achKey))
100 {
101 id_array << QString::fromWCharArray(achKey);
102 path_array << QString::fromWCharArray(path);
103 }
104 }
105 }
106}
107
108bool CReviveManifestController::GetLibraries(QStringList &id_array, QStringList &path_array)
109{

Callers 1

GetLibrariesMethod · 0.85

Calls 1

GetLibraryPathFunction · 0.70

Tested by

no test coverage detected