| 19 | } |
| 20 | |
| 21 | bool RegExportImport::ExportKeys(HKEY hKey, HANDLE hFile, PCWSTR section) const { |
| 22 | ExportKey(hKey, hFile, section); |
| 23 | Registry::EnumSubKeys(hKey, [&](auto name, const auto&) { |
| 24 | RegistryKey subKey; |
| 25 | subKey.Open(hKey, name, KEY_READ); |
| 26 | if (subKey) |
| 27 | ExportKeys(subKey, hFile, section + CString(L"\\") + name); |
| 28 | return true; |
| 29 | }); |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | bool RegExportImport::ExportKey(HKEY hKey, HANDLE hFile, PCWSTR section) const { |
| 34 | WriteString(hFile, CString(L"[") + section + L"]\n"); |