Author: akhaldi
Date: Sun Jun 8 11:56:30 2014
New Revision: 63549
URL:
http://svn.reactos.org/svn/reactos?rev=63549&view=rev
Log:
[REG]
* Do not rely on RegDeleteTreeW which shouldn't be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174
Modified:
trunk/reactos/base/applications/cmdutils/reg/CMakeLists.txt
trunk/reactos/base/applications/cmdutils/reg/reg.c
Modified: trunk/reactos/base/applications/cmdutils/reg/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/reg/CMakeLists.txt [iso-8859-1] Sun Jun 8
11:56:30 2014
@@ -1,8 +1,5 @@
-
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
add_executable(reg reg.c reg.rc)
set_module_type(reg win32cui UNICODE)
-add_importlibs(reg advapi32 user32 msvcrt kernel32)
+add_importlibs(reg advapi32 user32 shlwapi msvcrt kernel32)
add_cd_file(TARGET reg DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/cmdutils/reg/reg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/reg.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/reg/reg.c [iso-8859-1] Sun Jun 8 11:56:30
2014
@@ -22,6 +22,7 @@
#include <winuser.h>
#include <winreg.h>
#include <wincon.h>
+#include <shlwapi.h>
#include <wine/unicode.h>
#include "reg.h"
@@ -293,7 +294,7 @@
/* Delete subtree only if no /v* option is given */
if (!value_name && !value_empty && !value_all)
{
- if (RegDeleteTreeW(root,p)!=ERROR_SUCCESS)
+ if (SHDeleteKey(root, p) != ERROR_SUCCESS)
{
reg_message(STRING_CANNOT_FIND);
return 1;