[FUSION] Sync with Wine Staging 1.7.47. CORE-9924
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 19 Jul 2015 13:16:45 +0000 (13:16 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 19 Jul 2015 13:16:45 +0000 (13:16 +0000)
svn path=/trunk/; revision=68429

reactos/dll/win32/fusion/asmcache.c
reactos/dll/win32/fusion/asmenum.c
reactos/dll/win32/fusion/asmname.c
reactos/media/doc/README.WINE

index 673d180..c8f389a 100644 (file)
@@ -151,7 +151,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_QueryInterface(IAssemblyCache *iface,
         IsEqualIID(riid, &IID_IAssemblyCache))
     {
         IAssemblyCache_AddRef(iface);
-        *ppobj = This;
+        *ppobj = &This->IAssemblyCache_iface;
         return S_OK;
     }
 
@@ -580,7 +580,7 @@ static HRESULT WINAPI IAssemblyCacheItemImpl_QueryInterface(IAssemblyCacheItem *
         IsEqualIID(riid, &IID_IAssemblyCacheItem))
     {
         IAssemblyCacheItem_AddRef(iface);
-        *ppobj = This;
+        *ppobj = &This->IAssemblyCacheItem_iface;
         return S_OK;
     }
 
index 42c7ca2..4a87768 100644 (file)
@@ -55,7 +55,7 @@ static HRESULT WINAPI IAssemblyEnumImpl_QueryInterface(IAssemblyEnum *iface,
         IsEqualIID(riid, &IID_IAssemblyEnum))
     {
         IAssemblyEnum_AddRef(iface);
-        *ppobj = This;
+        *ppobj = &This->IAssemblyEnum_iface;
         return S_OK;
     }
 
index 0c74538..cc9995b 100644 (file)
@@ -70,7 +70,7 @@ static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface,
         IsEqualIID(riid, &IID_IAssemblyName))
     {
         IAssemblyName_AddRef(iface);
-        *ppobj = This;
+        *ppobj = &This->IAssemblyName_iface;
         return S_OK;
     }
 
@@ -213,12 +213,10 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
                                                        LPDWORD pccDisplayName,
                                                        DWORD dwDisplayFlags)
 {
+    static const WCHAR equals[] = {'=',0};
     IAssemblyNameImpl *name = impl_from_IAssemblyName(iface);
-    WCHAR verstr[30];
+    WCHAR verstr[30], *cultureval = NULL;
     DWORD size;
-    LPWSTR cultureval = 0;
-
-    static const WCHAR equals[] = {'=',0};
 
     TRACE("(%p, %p, %p, %d)\n", iface, szDisplayName,
           pccDisplayName, dwDisplayFlags);
@@ -228,9 +226,15 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
         if (!name->displayname || !*name->displayname)
             return FUSION_E_INVALID_NAME;
 
-        size = min(*pccDisplayName, lstrlenW(name->displayname) + 1);
+        size = strlenW(name->displayname) + 1;
+
+        if (*pccDisplayName < size)
+        {
+            *pccDisplayName = size;
+            return E_NOT_SUFFICIENT_BUFFER;
+        }
 
-        lstrcpynW(szDisplayName, name->displayname, size);
+        if (szDisplayName) strcpyW(szDisplayName, name->displayname);
         *pccDisplayName = size;
 
         return S_OK;
@@ -354,19 +358,24 @@ static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface,
                                                 WCHAR *pwzName)
 {
     IAssemblyNameImpl *name = impl_from_IAssemblyName(iface);
+    DWORD len;
 
     TRACE("(%p, %p, %p)\n", iface, lpcwBuffer, pwzName);
 
-    if (!name->name)
+    if (name->name)
+        len = strlenW(name->name) + 1;
+    else
+        len = 0;
+
+    if (*lpcwBuffer < len)
     {
-        *pwzName = '\0';
-        *lpcwBuffer = 0;
-        return S_OK;
+        *lpcwBuffer = len;
+        return E_NOT_SUFFICIENT_BUFFER;
     }
+    if (!name->name) lpcwBuffer[0] = 0;
+    else strcpyW(pwzName, name->name);
 
-    lstrcpyW(pwzName, name->name);
-    *lpcwBuffer = lstrlenW(pwzName) + 1;
-
+    *lpcwBuffer = len;
     return S_OK;
 }
 
index a811638..d272345 100644 (file)
@@ -69,7 +69,7 @@ reactos/dll/win32/dciman32            # Synced to WineStaging-1.7.37
 reactos/dll/win32/dwmapi              # Synced to WineStaging-1.7.37
 reactos/dll/win32/faultrep            # Synced to WineStaging-1.7.37
 reactos/dll/win32/fltlib              # Synced to WineStaging-1.7.47
-reactos/dll/win32/fusion              # Synced to WineStaging-1.7.37
+reactos/dll/win32/fusion              # Synced to WineStaging-1.7.47
 reactos/dll/win32/gdiplus             # Synced to WineStaging-1.7.37
 reactos/dll/win32/hhctrl.ocx          # Synced to WineStaging-1.7.37
 reactos/dll/win32/hlink               # Synced to WineStaging-1.7.37