| 73 | } |
| 74 | |
| 75 | void 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 | |
| 108 | bool CReviveManifestController::GetLibraries(QStringList &id_array, QStringList &path_array) |
| 109 | { |
no test coverage detected