mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[HLINK]
* Sync to Wine 1.5.4. svn path=/trunk/; revision=56615
This commit is contained in:
parent
7838d7f3cd
commit
5d7e625d94
4 changed files with 39 additions and 33 deletions
|
@ -2,7 +2,6 @@
|
|||
add_definitions(-D__WINESRC__)
|
||||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
||||
|
||||
set_rc_compiler()
|
||||
spec2def(hlink.dll hlink.spec ADD_IMPORTLIB)
|
||||
|
||||
list(APPEND SOURCE
|
||||
|
@ -18,15 +17,6 @@ add_library(hlink SHARED ${SOURCE})
|
|||
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_importlibs(hlink shell32 ole32 advapi32 msvcrt kernel32 ntdll)
|
||||
add_pch(hlink hlink_private.h)
|
||||
|
||||
add_cd_file(TARGET hlink DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(hlink);
|
||||
|
||||
typedef struct {
|
||||
IUnknown IUnknown_iface;
|
||||
IUnknown IUnknown_inner;
|
||||
IAuthenticate IAuthenticate_iface;
|
||||
IHttpNegotiate IHttpNegotiate_iface;
|
||||
IExtensionServices IExtensionServices_iface;
|
||||
|
||||
IUnknown *outer_unk;
|
||||
LONG ref;
|
||||
IUnknown *outer;
|
||||
|
||||
HWND hwnd;
|
||||
LPWSTR username;
|
||||
|
@ -40,7 +40,7 @@ typedef struct {
|
|||
|
||||
static inline ExtensionService *impl_from_IUnknown(IUnknown *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ExtensionService, IUnknown_iface);
|
||||
return CONTAINING_RECORD(iface, ExtensionService, IUnknown_inner);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ExtServUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
|
||||
|
@ -51,7 +51,7 @@ static HRESULT WINAPI ExtServUnk_QueryInterface(IUnknown *iface, REFIID riid, vo
|
|||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IUnknown_iface;
|
||||
*ppv = &This->IUnknown_inner;
|
||||
}else if(IsEqualGUID(&IID_IAuthenticate, riid)) {
|
||||
TRACE("(%p)->(IID_IAuthenticate %p)\n", This, ppv);
|
||||
*ppv = &This->IAuthenticate_iface;
|
||||
|
@ -113,19 +113,19 @@ static inline ExtensionService *impl_from_IAuthenticate(IAuthenticate *iface)
|
|||
static HRESULT WINAPI Authenticate_QueryInterface(IAuthenticate *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
ExtensionService *This = impl_from_IAuthenticate(iface);
|
||||
return IUnknown_QueryInterface(This->outer, riid, ppv);
|
||||
return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI Authenticate_AddRef(IAuthenticate *iface)
|
||||
{
|
||||
ExtensionService *This = impl_from_IAuthenticate(iface);
|
||||
return IUnknown_AddRef(This->outer);
|
||||
return IUnknown_AddRef(This->outer_unk);
|
||||
}
|
||||
|
||||
static ULONG WINAPI Authenticate_Release(IAuthenticate *iface)
|
||||
{
|
||||
ExtensionService *This = impl_from_IAuthenticate(iface);
|
||||
return IUnknown_Release(This->outer);
|
||||
return IUnknown_Release(This->outer_unk);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI Authenticate_Authenticate(IAuthenticate *iface,
|
||||
|
@ -160,19 +160,19 @@ static inline ExtensionService *impl_from_IHttpNegotiate(IHttpNegotiate *iface)
|
|||
static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
ExtensionService *This = impl_from_IHttpNegotiate(iface);
|
||||
return IUnknown_QueryInterface(This->outer, riid, ppv);
|
||||
return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate *iface)
|
||||
{
|
||||
ExtensionService *This = impl_from_IHttpNegotiate(iface);
|
||||
return IUnknown_AddRef(This->outer);
|
||||
return IUnknown_AddRef(This->outer_unk);
|
||||
}
|
||||
|
||||
static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate *iface)
|
||||
{
|
||||
ExtensionService *This = impl_from_IHttpNegotiate(iface);
|
||||
return IUnknown_Release(This->outer);
|
||||
return IUnknown_Release(This->outer_unk);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate *iface,
|
||||
|
@ -218,19 +218,19 @@ static inline ExtensionService *impl_from_IExtensionServices(IExtensionServices
|
|||
static HRESULT WINAPI ExtServ_QueryInterface(IExtensionServices *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
ExtensionService *This = impl_from_IExtensionServices(iface);
|
||||
return IUnknown_QueryInterface(This->outer, riid, ppv);
|
||||
return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ExtServ_AddRef(IExtensionServices *iface)
|
||||
{
|
||||
ExtensionService *This = impl_from_IExtensionServices(iface);
|
||||
return IUnknown_AddRef(This->outer);
|
||||
return IUnknown_AddRef(This->outer_unk);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ExtServ_Release(IExtensionServices *iface)
|
||||
{
|
||||
ExtensionService *This = impl_from_IExtensionServices(iface);
|
||||
return IUnknown_Release(This->outer);
|
||||
return IUnknown_Release(This->outer_unk);
|
||||
}
|
||||
|
||||
static HRESULT ExtServ_ImplSetAdditionalHeaders(ExtensionService* This, LPCWSTR pwzAdditionalHeaders)
|
||||
|
@ -311,7 +311,7 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders,
|
|||
|
||||
ret = heap_alloc(sizeof(*ret));
|
||||
|
||||
ret->IUnknown_iface.lpVtbl = &ExtServUnkVtbl;
|
||||
ret->IUnknown_inner.lpVtbl = &ExtServUnkVtbl;
|
||||
ret->IAuthenticate_iface.lpVtbl = &AuthenticateVtbl;
|
||||
ret->IHttpNegotiate_iface.lpVtbl = &HttpNegotiateVtbl;
|
||||
ret->IExtensionServices_iface.lpVtbl = &ExtServVtbl;
|
||||
|
@ -325,14 +325,14 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders,
|
|||
ExtServ_ImplSetAdditionalHeaders(ret, pwzAdditionalHeaders);
|
||||
|
||||
if(!punkOuter) {
|
||||
ret->outer = &ret->IUnknown_iface;
|
||||
hres = IUnknown_QueryInterface(&ret->IUnknown_iface, riid, ppv);
|
||||
IUnknown_Release(&ret->IUnknown_iface);
|
||||
ret->outer_unk = &ret->IUnknown_inner;
|
||||
hres = IUnknown_QueryInterface(&ret->IUnknown_inner, riid, ppv);
|
||||
IUnknown_Release(&ret->IUnknown_inner);
|
||||
}else if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
ret->outer = punkOuter;
|
||||
*ppv = &ret->IUnknown_iface;
|
||||
ret->outer_unk = punkOuter;
|
||||
*ppv = &ret->IUnknown_inner;
|
||||
}else {
|
||||
IUnknown_Release(&ret->IUnknown_iface);
|
||||
IUnknown_Release(&ret->IUnknown_inner);
|
||||
hres = E_INVALIDARG;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,19 @@ static HRESULT __GetMoniker(HlinkImpl* This, IMoniker** moniker,
|
|||
if (ref_type == HLINKGETREF_DEFAULT)
|
||||
ref_type = HLINKGETREF_RELATIVE;
|
||||
|
||||
if (This->Moniker)
|
||||
{
|
||||
DWORD mktype = MKSYS_NONE;
|
||||
|
||||
hres = IMoniker_IsSystemMoniker(This->Moniker, &mktype);
|
||||
if (hres == S_OK && mktype != MKSYS_NONE)
|
||||
{
|
||||
*moniker = This->Moniker;
|
||||
IMoniker_AddRef(*moniker);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if (ref_type == HLINKGETREF_ABSOLUTE && This->Site)
|
||||
{
|
||||
IMoniker *hls_moniker;
|
||||
|
@ -217,9 +230,12 @@ static HRESULT WINAPI IHlink_fnSetMonikerReference( IHlink* iface,
|
|||
This->Moniker = pmkTarget;
|
||||
if (This->Moniker)
|
||||
{
|
||||
IBindCtx *pbc;
|
||||
LPOLESTR display_name;
|
||||
IMoniker_AddRef(This->Moniker);
|
||||
IMoniker_GetDisplayName(This->Moniker, NULL, NULL, &display_name);
|
||||
CreateBindCtx( 0, &pbc);
|
||||
IMoniker_GetDisplayName(This->Moniker, pbc, NULL, &display_name);
|
||||
IBindCtx_Release(pbc);
|
||||
This->absolute = display_name && strchrW(display_name, ':');
|
||||
CoTaskMemFree(display_name);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ reactos/dll/win32/dwmapi # Synced to Wine-1.3.37
|
|||
reactos/dll/win32/fusion # Synced to Wine-1.5.4
|
||||
reactos/dll/win32/gdiplus # Synced to Wine-1.5.4
|
||||
reactos/dll/win32/hhctrl.ocx # Autosync
|
||||
reactos/dll/win32/hlink # Synced to Wine-1.3.37
|
||||
reactos/dll/win32/hlink # Synced to Wine-1.5.4
|
||||
reactos/dll/win32/hnetcfg # Synced to Wine-1.3.37
|
||||
reactos/dll/win32/httpapi # Synced to Wine-1.3.37
|
||||
reactos/dll/win32/iccvid # Autosync
|
||||
|
|
Loading…
Reference in a new issue