Windows XP compatibility fix: RegDeleteTree() does not exist until Vista, so we use SHDeleteKey() instead. It exists since Win2k and provides the same functionality.

This commit is contained in:
LoRd_MuldeR 2014-11-17 00:37:03 +01:00
parent 4ee3297f69
commit a0c5fe67a8

View File

@ -30,6 +30,7 @@
#include <Objbase.h> #include <Objbase.h>
#include <Psapi.h> #include <Psapi.h>
#include <Shlobj.h> #include <Shlobj.h>
#include <Shlwapi.h>
//StdLib //StdLib
#include <cstdio> #include <cstdio>
@ -569,7 +570,7 @@ bool mixp_reg_value_read(int rootKey, const QString &keyName, const QString &val
*/ */
bool mixp_reg_key_delete(int rootKey, const QString &keyName) bool mixp_reg_key_delete(int rootKey, const QString &keyName)
{ {
return (RegDeleteTree(mixp_reg_root(rootKey), QWCHAR(keyName)) == ERROR_SUCCESS); return (SHDeleteKey( mixp_reg_root(rootKey), QWCHAR(keyName)) == ERROR_SUCCESS);
} }
/* /*