[QUARTZ]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 8 Jun 2014 12:14:06 +0000 (12:14 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 8 Jun 2014 12:14:06 +0000 (12:14 +0000)
* Do not rely on RegDeleteTree{A,W} which shouldn't be exported.
* Move shlwapi.h inclusion to the PCH.
* We no longer need to define _WIN32_WINNT as 0x600.
CORE-8174

svn path=/trunk/; revision=63552

reactos/dll/directx/wine/quartz/CMakeLists.txt
reactos/dll/directx/wine/quartz/filesource.c
reactos/dll/directx/wine/quartz/filtermapper.c
reactos/dll/directx/wine/quartz/quartz_private.h
reactos/dll/directx/wine/quartz/regsvr.c

index 490448b..50040af 100644 (file)
@@ -1,7 +1,4 @@
 
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
 add_definitions(
     -D__WINESRC__
     -DENTRY_PREFIX=QUARTZ_
index 4a26313..e63a5f4 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "quartz_private.h"
 
-#include <shlwapi.h>
-
 static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 };
 
 typedef struct AsyncReader
index 97129e2..704ea5a 100644 (file)
@@ -1513,7 +1513,7 @@ static HRESULT WINAPI FilterMapper_UnregisterFilter(IFilterMapper * iface, CLSID
         if (lRet != ERROR_SUCCESS)
             hr = HRESULT_FROM_WIN32(lRet);
 
-        lRet = RegDeleteTreeW(hKey, wszPins);
+        lRet = SHDeleteKeyW(hKey, wszPins);
         if (lRet != ERROR_SUCCESS)
             hr = HRESULT_FROM_WIN32(lRet);
 
@@ -1572,7 +1572,7 @@ static HRESULT WINAPI FilterMapper_UnregisterPin(IFilterMapper * iface, CLSID Fi
         strcatW(wszPinNameKey, wszSlash);
         strcatW(wszPinNameKey, Name);
 
-        lRet = RegDeleteTreeW(hKey, wszPinNameKey);
+        lRet = SHDeleteKeyW(hKey, wszPinNameKey);
         hr = HRESULT_FROM_WIN32(lRet);
         CoTaskMemFree(wszPinNameKey);
     }
index ae3a276..c85a033 100644 (file)
@@ -41,6 +41,7 @@
 #include <dvdmedia.h>
 #include <vfw.h>
 #include <aviriff.h>
+#include <shlwapi.h>
 
 #include <wine/strmbase.h>
 #include <wine/unicode.h>
index bbf519c..686257d 100644 (file)
@@ -240,7 +240,7 @@ static HRESULT unregister_interfaces(struct regsvr_interface const *list)
        WCHAR buf[39];
 
        StringFromGUID2(list->iid, buf, 39);
-       res = RegDeleteTreeW(interface_key, buf);
+       res = SHDeleteKeyW(interface_key, buf);
        if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
     }
 
@@ -346,18 +346,18 @@ static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
        WCHAR buf[39];
 
        StringFromGUID2(list->clsid, buf, 39);
-       res = RegDeleteTreeW(coclass_key, buf);
+       res = SHDeleteKeyW(coclass_key, buf);
        if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
        if (res != ERROR_SUCCESS) goto error_close_coclass_key;
 
        if (list->progid) {
-           res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid);
+           res = SHDeleteKeyA(HKEY_CLASSES_ROOT, list->progid);
            if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
            if (res != ERROR_SUCCESS) goto error_close_coclass_key;
        }
 
        if (list->viprogid) {
-           res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid);
+           res = SHDeleteKeyA(HKEY_CLASSES_ROOT, list->viprogid);
            if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
            if (res != ERROR_SUCCESS) goto error_close_coclass_key;
        }
@@ -500,7 +500,7 @@ static HRESULT unregister_mediatypes_parsing(struct regsvr_mediatype_parsing con
        if (res != ERROR_SUCCESS) break;
 
        StringFromGUID2(list->subtype, buf, 39);
-       res = RegDeleteTreeW(majortype_key, buf);
+       res = SHDeleteKeyW(majortype_key, buf);
        if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
 
        /* Removed majortype key if there is no more subtype key */
@@ -535,7 +535,7 @@ static HRESULT unregister_mediatypes_extension(struct regsvr_mediatype_extension
        res = ERROR_SUCCESS;
     else if (res == ERROR_SUCCESS)
        for (; res == ERROR_SUCCESS && list->majortype; ++list) {
-           res = RegDeleteTreeA(extensions_root_key, list->extension);
+           res = SHDeleteKeyA(extensions_root_key, list->extension);
            if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
        }