From 9e40fb7db8fa46c4fbbf20d87ec2f1a44b81f200 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 21 Mar 2015 12:21:40 +0000 Subject: [PATCH] [FUSION] Sync with Wine Staging 1.7.37. CORE-9246 svn path=/trunk/; revision=66848 --- reactos/dll/win32/fusion/asmcache.c | 47 ++++++++++++++++++++--------- reactos/dll/win32/fusion/asmname.c | 2 +- reactos/dll/win32/fusion/fusion.c | 2 +- reactos/media/doc/README.WINE | 2 +- 4 files changed, 35 insertions(+), 18 deletions(-) diff --git a/reactos/dll/win32/fusion/asmcache.c b/reactos/dll/win32/fusion/asmcache.c index 1a95dacb53b..673d180a907 100644 --- a/reactos/dll/win32/fusion/asmcache.c +++ b/reactos/dll/win32/fusion/asmcache.c @@ -20,6 +20,19 @@ #include "fusionpriv.h" +typedef struct { + IAssemblyCache IAssemblyCache_iface; + + LONG ref; + HANDLE lock; +} IAssemblyCacheImpl; + +typedef struct { + IAssemblyCacheItem IAssemblyCacheItem_iface; + + LONG ref; +} IAssemblyCacheItemImpl; + static const WCHAR cache_mutex_nameW[] = {'_','_','W','I','N','E','_','F','U','S','I','O','N','_','C','A','C','H','E','_','M','U','T','E','X','_','_',0}; @@ -120,13 +133,6 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, /* IAssemblyCache */ -typedef struct { - IAssemblyCache IAssemblyCache_iface; - - LONG ref; - HANDLE lock; -} IAssemblyCacheImpl; - static inline IAssemblyCacheImpl *impl_from_IAssemblyCache(IAssemblyCache *iface) { return CONTAINING_RECORD(iface, IAssemblyCacheImpl, IAssemblyCache_iface); @@ -330,16 +336,33 @@ done: return hr; } +static const IAssemblyCacheItemVtbl AssemblyCacheItemVtbl; + static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyCacheItem(IAssemblyCache *iface, DWORD dwFlags, PVOID pvReserved, IAssemblyCacheItem **ppAsmItem, LPCWSTR pszAssemblyName) { - FIXME("(%p, %d, %p, %p, %s) stub!\n", iface, dwFlags, pvReserved, + IAssemblyCacheItemImpl *item; + + FIXME("(%p, %d, %p, %p, %s) semi-stub!\n", iface, dwFlags, pvReserved, ppAsmItem, debugstr_w(pszAssemblyName)); - return E_NOTIMPL; + if (!ppAsmItem) + return E_INVALIDARG; + + *ppAsmItem = NULL; + + item = HeapAlloc(GetProcessHeap(), 0, sizeof(IAssemblyCacheItemImpl)); + if (!item) + return E_OUTOFMEMORY; + + item->IAssemblyCacheItem_iface.lpVtbl = &AssemblyCacheItemVtbl; + item->ref = 1; + + *ppAsmItem = &item->IAssemblyCacheItem_iface; + return S_OK; } static HRESULT WINAPI IAssemblyCacheImpl_CreateAssemblyScavenger(IAssemblyCache *iface, @@ -539,12 +562,6 @@ HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved /* IAssemblyCacheItem */ -typedef struct { - IAssemblyCacheItem IAssemblyCacheItem_iface; - - LONG ref; -} IAssemblyCacheItemImpl; - static inline IAssemblyCacheItemImpl *impl_from_IAssemblyCacheItem(IAssemblyCacheItem *iface) { return CONTAINING_RECORD(iface, IAssemblyCacheItemImpl, IAssemblyCacheItem_iface); diff --git a/reactos/dll/win32/fusion/asmname.c b/reactos/dll/win32/fusion/asmname.c index 387155ebe65..0c74538e82c 100644 --- a/reactos/dll/win32/fusion/asmname.c +++ b/reactos/dll/win32/fusion/asmname.c @@ -482,7 +482,7 @@ HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len) if (*len <= buffer_size) lstrcpyW(buf, name->path); else - return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + return E_NOT_SUFFICIENT_BUFFER; return S_OK; } diff --git a/reactos/dll/win32/fusion/fusion.c b/reactos/dll/win32/fusion/fusion.c index acd5e6443d2..5fd1f41b932 100644 --- a/reactos/dll/win32/fusion/fusion.c +++ b/reactos/dll/win32/fusion/fusion.c @@ -148,7 +148,7 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, len++; if (*pcchPath <= len || !pwzCachePath) - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + hr = E_NOT_SUFFICIENT_BUFFER; else if (pwzCachePath) strcpyW(pwzCachePath, path); diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index f07a4d8312c..bffff1211d4 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -75,7 +75,7 @@ reactos/dll/win32/dciman32 # Synced to Wine-1.7.27 reactos/dll/win32/dwmapi # Synced to WineStaging-1.7.37 reactos/dll/win32/faultrep # Synced to Wine-1.7.27 reactos/dll/win32/fltlib # Synced to Wine-1.7.27 -reactos/dll/win32/fusion # Synced to Wine-1.7.27 +reactos/dll/win32/fusion # Synced to WineStaging-1.7.37 reactos/dll/win32/gdiplus # Synced to Wine-1.7.27 reactos/dll/win32/hhctrl.ocx # Synced to Wine-1.7.27 reactos/dll/win32/hlink # Synced to Wine-1.7.27