From 7e88971d050a63bac4971e72d9f9a8e13c67a319 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 15 Mar 2018 12:20:55 +0100 Subject: [PATCH] [HLINK] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/hlink/CMakeLists.txt | 4 ++-- dll/win32/hlink/browse_ctx.c | 5 +++- dll/win32/hlink/extserv.c | 5 ++++ dll/win32/hlink/hlink_main.c | 9 ++++++-- dll/win32/hlink/hlink_private.h | 41 ++++++++------------------------- dll/win32/hlink/link.c | 9 ++++++-- dll/win32/hlink/precomp.h | 15 ++++++++++++ media/doc/README.WINE | 2 +- 8 files changed, 50 insertions(+), 40 deletions(-) create mode 100644 dll/win32/hlink/precomp.h diff --git a/dll/win32/hlink/CMakeLists.txt b/dll/win32/hlink/CMakeLists.txt index d77c65ff923..7ce99227517 100644 --- a/dll/win32/hlink/CMakeLists.txt +++ b/dll/win32/hlink/CMakeLists.txt @@ -8,7 +8,7 @@ list(APPEND SOURCE extserv.c hlink_main.c link.c - hlink_private.h) + precomp.h) add_library(hlink SHARED ${SOURCE} @@ -20,5 +20,5 @@ set_module_type(hlink win32dll) target_link_libraries(hlink uuid wine) add_delay_importlibs(hlink urlmon) add_importlibs(hlink shell32 ole32 advapi32 msvcrt kernel32 ntdll) -add_pch(hlink hlink_private.h SOURCE) +add_pch(hlink precomp.h SOURCE) add_cd_file(TARGET hlink DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/hlink/browse_ctx.c b/dll/win32/hlink/browse_ctx.c index 00007f6b527..2038768be4f 100644 --- a/dll/win32/hlink/browse_ctx.c +++ b/dll/win32/hlink/browse_ctx.c @@ -20,7 +20,10 @@ #include "hlink_private.h" -#include +#include "wine/debug.h" +#include "wine/list.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlink); struct link_entry { diff --git a/dll/win32/hlink/extserv.c b/dll/win32/hlink/extserv.c index 6c88a4740b3..3a97fa9cb95 100644 --- a/dll/win32/hlink/extserv.c +++ b/dll/win32/hlink/extserv.c @@ -18,6 +18,11 @@ #include "hlink_private.h" +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlink); + typedef struct { IUnknown IUnknown_inner; IAuthenticate IAuthenticate_iface; diff --git a/dll/win32/hlink/hlink_main.c b/dll/win32/hlink/hlink_main.c index 36b80527e47..b0a20b18bb3 100644 --- a/dll/win32/hlink/hlink_main.c +++ b/dll/win32/hlink/hlink_main.c @@ -20,8 +20,13 @@ #include "hlink_private.h" -#include -#include +#include "winreg.h" +#include "rpcproxy.h" +#include "hlguids.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlink); static HINSTANCE instance; diff --git a/dll/win32/hlink/hlink_private.h b/dll/win32/hlink/hlink_private.h index 1674f662f46..26132091b9d 100644 --- a/dll/win32/hlink/hlink_private.h +++ b/dll/win32/hlink/hlink_private.h @@ -16,46 +16,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef _HLINK_PRIVATE_H -#define _HLINK_PRIVATE_H +#pragma once #include -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #define COBJMACROS -#include -#include -#include -#include -#include +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "hlink.h" -#include - -#include -WINE_DEFAULT_DEBUG_CHANNEL(hlink); +#include "wine/heap.h" +#include "wine/unicode.h" extern HRESULT HLink_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; extern HRESULT HLinkBrowseContext_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size) -{ - return HeapAlloc(GetProcessHeap(), 0, size); -} - -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size) -{ - return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); -} - -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - static inline LPWSTR hlink_strdupW(LPCWSTR str) { LPWSTR ret = NULL; @@ -85,5 +64,3 @@ static inline LPWSTR hlink_co_strdupW(LPCWSTR str) return ret; } - -#endif /* _HLINK_PRIVATE_H */ diff --git a/dll/win32/hlink/link.c b/dll/win32/hlink/link.c index 88b7093c327..25ee45d7c7e 100644 --- a/dll/win32/hlink/link.c +++ b/dll/win32/hlink/link.c @@ -20,7 +20,12 @@ #include "hlink_private.h" -#include +#include "shellapi.h" +#include "hlguids.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlink); #define HLINK_SAVE_MAGIC 0x00000002 #define HLINK_SAVE_MONIKER_PRESENT 0x01 @@ -488,7 +493,7 @@ static HRESULT WINAPI IHlink_fnNavigate(IHlink* iface, DWORD grfHLNF, LPBC pbc, if (phbc) { r = IHlinkBrowseContext_GetObject(phbc, mon, TRUE, &unk); - if (r == S_FALSE) + if (r != S_OK) { CreateBindCtx(0, &bcxt); RegisterBindStatusCallback(bcxt, pbsc, NULL, 0); diff --git a/dll/win32/hlink/precomp.h b/dll/win32/hlink/precomp.h new file mode 100644 index 00000000000..0fc277331bb --- /dev/null +++ b/dll/win32/hlink/precomp.h @@ -0,0 +1,15 @@ + +#ifndef _HLINK_PRECOMP_H +#define _HLINK_PRECOMP_H + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include "hlink_private.h" + +#include + +#include + +#endif /* !_HLINK_PRECOMP_H */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 49de8174aab..36fc36a97a6 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -70,7 +70,7 @@ reactos/dll/win32/fontsub # Synced to WineStaging-2.9 reactos/dll/win32/fusion # Synced to WineStaging-3.3 reactos/dll/win32/gdiplus # Synced to WineStaging-3.3 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3 -reactos/dll/win32/hlink # Synced to Wine-3.0 +reactos/dll/win32/hlink # Synced to WineStaging-3.3 reactos/dll/win32/hnetcfg # Synced to Wine-3.0 reactos/dll/win32/httpapi # Synced to WineStaging-2.9 reactos/dll/win32/iccvid # Synced to Wine-3.0