| 18 | FILE* g_LogFile = NULL; |
| 19 | |
| 20 | bool GetOculusBasePath(PWCHAR path, DWORD length) |
| 21 | { |
| 22 | LONG error = ERROR_SUCCESS; |
| 23 | |
| 24 | HKEY oculusKey; |
| 25 | error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Oculus VR, LLC\\Oculus", 0, KEY_READ | KEY_WOW64_32KEY, &oculusKey); |
| 26 | if (error != ERROR_SUCCESS) |
| 27 | { |
| 28 | LOG("Unable to open Oculus key."); |
| 29 | return false; |
| 30 | } |
| 31 | error = RegQueryValueEx(oculusKey, L"Base", NULL, NULL, (PBYTE)path, &length); |
| 32 | if (error != ERROR_SUCCESS) |
| 33 | { |
| 34 | LOG("Unable to read Base path."); |
| 35 | return false; |
| 36 | } |
| 37 | RegCloseKey(oculusKey); |
| 38 | |
| 39 | return true; |
| 40 | } |
| 41 | |
| 42 | bool GetLibraryPath(PWCHAR path, DWORD length, PWCHAR guid) |
| 43 | { |