-
-
Save IceCubeDev/201012d90212f34c473c to your computer and use it in GitHub Desktop.
itunnel_mux fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// OLD Line: 41 | |
HRESULT error = S_OK; | |
error = rgv(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Apple Inc.\\Apple Application Support", L"InstallDir", RRF_RT_REG_SZ|RRF_ZEROONFAILURE, NULL, (LPBYTE)wbuf, &cbBuf); | |
if (ERROR_SUCCESS != error) { | |
print_error(error); | |
Log(LOG_FATAL, "Could not locate 'Apple Application Support' folder path in registry: ABORTING"); | |
return LIBMD_ERR_REGISTRY_ERROR; | |
} | |
// NEW | |
HRESULT error = S_OK; | |
HKEY deviceSupport = 0; | |
error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Apple Inc.\\Apple Application Support", 0, KEY_READ|KEY_WOW64_64KEY, &deviceSupport); | |
if (ERROR_SUCCESS != error) { | |
print_error(error); | |
Log(LOG_FATAL, "Could not read 'Apple Application Support' folder path in registry: ABORTING"); | |
return LIBMD_ERR_REGISTRY_ERROR; | |
} | |
HRESULT error = S_OK; | |
error = rgv(deviceSupport, NULL, L"InstallDir", RRF_RT_REG_SZ|RRF_ZEROONFAILURE, NULL, (LPBYTE)wbuf, &cbBuf); | |
if (ERROR_SUCCESS != error) { | |
print_error(error); | |
Log(LOG_FATAL, "Could not locate 'Apple Application Support' folder path in registry: ABORTING"); | |
RegCloseKey(deviceSupport); | |
return LIBMD_ERR_REGISTRY_ERROR; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment