// extension (input) - The file extensions of the file to be updated\r
// path (input) - The directory of the file (usually System32 or SysWOW64)\r
// abi_major (input) - The ABI major version to be updated\r
-// leave_abi_major (input) - Whether or not the ABI number be left on the output filename\r
+// append_abi_major (input) - Whether or not the ABI number should be appended to the filename\r
// latest_version (output) - The version of the runtime which the file was updated to\r
// Returns: Zero on success, an error code on failure\r
int update_system_file(FILE* log, const char* name, const char* extension, const char* path,\r
- long abi_major, bool leave_abi_major, struct SDKVersion* latest_version);\r
+ long abi_major, bool append_abi_major, struct SDKVersion* latest_version);\r
\r
// Update vulkan.dll and vulkaninfo.exe in all of the windows directories (System32 and SysWOW64)\r
//\r
if(platform == PLATFORM_X64) {\r
flags |= KEY_WOW64_64KEY;\r
}\r
- if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers",\r
- 0, flags, &hKey) != ERROR_SUCCESS) {\r
+ \r
+ // Create (if needed) and open the explicit layer key\r
+ if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers",\r
+ 0, NULL, REG_OPTION_NON_VOLATILE, flags, NULL, &hKey, NULL) != ERROR_SUCCESS) {\r
return 20;\r
}\r
\r
if(platform == PLATFORM_X64) {\r
flags |= KEY_WOW64_64KEY;\r
}\r
- if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers",\r
- 0, flags, &hKey) != ERROR_SUCCESS) {\r
+\r
+ // Create (if needed) and open the explicit layer key\r
+ if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Khronos\\Vulkan\\ExplicitLayers",\r
+ 0, NULL, REG_OPTION_NON_VOLATILE, flags, NULL, &hKey, NULL) != ERROR_SUCCESS) {\r
return 160;\r
}\r
\r
return 0;\r
}\r
\r
+//int update_system_file(FILE* log, const char* name, const char* extension, const char* path,\r
+// long abi_major, bool append_abi_major, struct SDKVersion* latest_version)\r
int update_system_file(FILE* log, const char* name, const char* extension, const char* path,\r
long abi_major, bool leave_abi_major, struct SDKVersion* latest_version)\r
{\r