[ATL][ATL80][ATL100]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 8 Jun 2014 18:27:21 +0000 (18:27 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 8 Jun 2014 18:27:21 +0000 (18:27 +0000)
* Do not rely on RegDeleteTreeW which is no longer exported.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174

svn path=/trunk/; revision=63568

reactos/dll/win32/atl/CMakeLists.txt
reactos/dll/win32/atl/registrar.c
reactos/dll/win32/atl100/CMakeLists.txt
reactos/dll/win32/atl80/CMakeLists.txt

index 580e31c..fbc3632 100644 (file)
@@ -3,9 +3,6 @@ add_definitions(
     -D__WINESRC__
     -D_ATL_VER=_ATL_VER_30)
 
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
 spec2def(atl.dll atl.spec ADD_IMPORTLIB)
@@ -22,6 +19,6 @@ list(APPEND SOURCE
 add_library(atl SHARED ${SOURCE} rsrc.rc)
 set_module_type(atl win32dll)
 target_link_libraries(atl uuid wine)
-add_importlibs(atl oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(atl oleaut32 ole32 user32 gdi32 advapi32 shlwapi msvcrt kernel32 ntdll)
 add_pch(atl precomp.h SOURCE)
 add_cd_file(TARGET atl DESTINATION reactos/system32 FOR all)
index 1c2207d..830328c 100644 (file)
 
 #include <precomp.h>
 
+#define NO_SHLWAPI_PATH
+#define NO_SHLWAPI_STRFCNS
+#define NO_SHLWAPI_GDI
+#define NO_SHLWAPI_STREAM
+#include <shlwapi.h>
+
 /**************************************************************
  * ATLRegistrar implementation
  */
@@ -226,10 +232,10 @@ static HRESULT do_process_key(LPCOLESTR *pstr, HKEY parent_key, strbuf *buf, BOO
                 strbuf_write(buf->str, &name, -1);
             }else if(key_type == DO_DELETE) {
                 TRACE("Deleting %s\n", debugstr_w(buf->str));
-                RegDeleteTreeW(parent_key, buf->str);
+                SHDeleteKeyW(parent_key, buf->str);
             }else {
                 if(key_type == FORCE_REMOVE)
-                    RegDeleteTreeW(parent_key, buf->str);
+                    SHDeleteKeyW(parent_key, buf->str);
                 lres = RegCreateKeyW(parent_key, buf->str, &hkey);
                 if(lres != ERROR_SUCCESS) {
                     WARN("Could not create(open) key: %08x\n", lres);
index 710e117..67dfb1d 100644 (file)
@@ -3,9 +3,6 @@ add_definitions(
     -D__WINESRC__
     -D_ATL_VER=_ATL_VER_100)
 
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
 spec2def(atl100.dll atl100.spec ADD_IMPORTLIB)
@@ -23,6 +20,6 @@ add_library(atl100 SHARED
 
 set_module_type(atl100 win32dll)
 target_link_libraries(atl100 uuid wine)
-add_importlibs(atl100 ole32 oleaut32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(atl100 ole32 oleaut32 user32 gdi32 advapi32 shlwapi msvcrt kernel32 ntdll)
 add_pch(atl100 precomp.h SOURCE)
 add_cd_file(TARGET atl100 DESTINATION reactos/system32 FOR all)
index c27604e..fe1f3a9 100644 (file)
@@ -3,9 +3,6 @@ add_definitions(
     -D__WINESRC__
     -D_ATL_VER=_ATL_VER_80)
 
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
 spec2def(atl80.dll atl80.spec ADD_IMPORTLIB)
 
 list(APPEND SOURCE
@@ -20,6 +17,6 @@ list(APPEND SOURCE
 add_library(atl80 SHARED ${SOURCE})
 set_module_type(atl80 win32dll)
 target_link_libraries(atl80 uuid wine)
-add_importlibs(atl80 oleaut32 user32 ole32 gdi32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(atl80 oleaut32 user32 ole32 gdi32 advapi32 shlwapi msvcrt kernel32 ntdll)
 add_pch(atl80 precomp.h SOURCE)
 add_cd_file(TARGET atl80 DESTINATION reactos/system32 FOR all)