From bf89f9e6bb1efeb476409226a473ed09b385a7c3 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sun, 8 Jun 2014 12:14:06 +0000 Subject: [PATCH] [QUARTZ] * 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 | 3 --- reactos/dll/directx/wine/quartz/filesource.c | 2 -- reactos/dll/directx/wine/quartz/filtermapper.c | 4 ++-- reactos/dll/directx/wine/quartz/quartz_private.h | 1 + reactos/dll/directx/wine/quartz/regsvr.c | 12 ++++++------ 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/reactos/dll/directx/wine/quartz/CMakeLists.txt b/reactos/dll/directx/wine/quartz/CMakeLists.txt index 490448bd0f7..50040af12c9 100644 --- a/reactos/dll/directx/wine/quartz/CMakeLists.txt +++ b/reactos/dll/directx/wine/quartz/CMakeLists.txt @@ -1,7 +1,4 @@ -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) - add_definitions( -D__WINESRC__ -DENTRY_PREFIX=QUARTZ_ diff --git a/reactos/dll/directx/wine/quartz/filesource.c b/reactos/dll/directx/wine/quartz/filesource.c index 4a26313ba2c..e63a5f42cdc 100644 --- a/reactos/dll/directx/wine/quartz/filesource.c +++ b/reactos/dll/directx/wine/quartz/filesource.c @@ -20,8 +20,6 @@ #include "quartz_private.h" -#include - static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 }; typedef struct AsyncReader diff --git a/reactos/dll/directx/wine/quartz/filtermapper.c b/reactos/dll/directx/wine/quartz/filtermapper.c index 97129e26d4a..704ea5a0aed 100644 --- a/reactos/dll/directx/wine/quartz/filtermapper.c +++ b/reactos/dll/directx/wine/quartz/filtermapper.c @@ -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); } diff --git a/reactos/dll/directx/wine/quartz/quartz_private.h b/reactos/dll/directx/wine/quartz/quartz_private.h index ae3a276fda1..c85a03326db 100644 --- a/reactos/dll/directx/wine/quartz/quartz_private.h +++ b/reactos/dll/directx/wine/quartz/quartz_private.h @@ -41,6 +41,7 @@ #include #include #include +#include #include #include diff --git a/reactos/dll/directx/wine/quartz/regsvr.c b/reactos/dll/directx/wine/quartz/regsvr.c index bbf519c8877..686257daa87 100644 --- a/reactos/dll/directx/wine/quartz/regsvr.c +++ b/reactos/dll/directx/wine/quartz/regsvr.c @@ -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; }