| 18 | } |
| 19 | |
| 20 | bool RegistryUtils::CleanDcomReflection() { |
| 21 | HKEY hKey; |
| 22 | LPCWSTR subKey = L"SOFTWARE\\Microsoft\\.NETFramework"; |
| 23 | LPCWSTR valueName = L"AllowDCOMReflection"; |
| 24 | |
| 25 | // Open the key first |
| 26 | LONG result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, subKey, 0, KEY_WRITE, &hKey); |
| 27 | if (result != ERROR_SUCCESS) return false; |
| 28 | |
| 29 | // Delete the value |
| 30 | result = RegDeleteValue(hKey, valueName); |
| 31 | RegCloseKey(hKey); |
| 32 | |
| 33 | return (result == ERROR_SUCCESS || result == ERROR_FILE_NOT_FOUND); |
| 34 | } |
| 35 | |
| 36 | bool RegistryUtils::SetTreatAs(const CLSID& originalClsid, const CLSID& newClsid) { |
| 37 | WCHAR originalClsidStr[40], newClsidStr[40]; |
nothing calls this directly
no outgoing calls
no test coverage detected