* Do not rely on RegDeleteTreeW which shouldn't be exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174

svn path=/trunk/; revision=63549
This commit is contained in:
Amine Khaldi 2014-06-08 11:56:30 +00:00
parent 39465487a9
commit d742698726
2 changed files with 3 additions and 5 deletions

View file

@ -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)

View file

@ -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 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
/* 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;