[SHELL32] Remove 2 redundant initializations
[reactos.git] / dll / win32 / fusion / fusion.c
index c8d3fad..8020211 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
 #include <stdarg.h>
+#ifdef __REACTOS__
+#include <wchar.h>
+#endif
 
 #define COBJMACROS
 
-#include <windef.h>
-#include <winbase.h>
-//#include "winuser.h"
-#include <ole2.h>
-#include <fusion.h>
-#include <wine/debug.h>
-#include <wine/unicode.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "fusion.h"
+#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(fusion);
 
@@ -43,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(fusion);
 HRESULT WINAPI InitializeFusion(void)
 {
     FIXME("\n");
-    return E_NOTIMPL;
+    return S_OK;
 }
 
 /******************************************************************
@@ -55,6 +53,15 @@ HRESULT WINAPI ClearDownloadCache(void)
     return E_NOTIMPL;
 }
 
+/******************************************************************
+ *  CopyPDBs   (FUSION.@)
+ */
+HRESULT WINAPI CopyPDBs(void *unknown)
+{
+    FIXME("(%p) stub!\n", unknown);
+    return E_NOTIMPL;
+}
+
 /******************************************************************
  *  CreateInstallReferenceEnum   (FUSION.@)
  */
@@ -123,7 +130,7 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
         return E_INVALIDARG;
 
     len = GetWindowsDirectoryW(windir, MAX_PATH);
-    strcpyW(path, windir);
+    lstrcpyW(path, windir);
 
     switch (dwCacheFlags)
     {
@@ -133,15 +140,15 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
             if (FAILED(hr))
                 return hr;
 
-            len = sprintfW(path, zapfmt, windir, assembly + 1, nativeimg, version);
+            len = swprintf(path, zapfmt, windir, assembly + 1, nativeimg, version);
             break;
         }
         case ASM_CACHE_GAC:
         {
-            strcpyW(path + len, assembly);
-            len += sizeof(assembly)/sizeof(WCHAR) - 1;
-            strcpyW(path + len, gac);
-            len += sizeof(gac)/sizeof(WCHAR) - 1;
+            lstrcpyW(path + len, assembly);
+            len += ARRAY_SIZE(assembly) - 1;
+            lstrcpyW(path + len, gac);
+            len += ARRAY_SIZE(gac) - 1;
             break;
         }
         case ASM_CACHE_DOWNLOAD:
@@ -150,14 +157,14 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
             return E_FAIL;
         }
         case ASM_CACHE_ROOT:
-            strcpyW(path + len, assembly);
-            len += sizeof(assembly)/sizeof(WCHAR) - 1;
+            lstrcpyW(path + len, assembly);
+            len += ARRAY_SIZE(assembly) - 1;
             break;
         case ASM_CACHE_ROOT_EX:
-            strcpyW(path + len, dotnet);
-            len += sizeof(dotnet)/sizeof(WCHAR) - 1;
-            strcpyW(path + len, assembly);
-            len += sizeof(assembly)/sizeof(WCHAR) - 1;
+            lstrcpyW(path + len, dotnet);
+            len += ARRAY_SIZE(dotnet) - 1;
+            lstrcpyW(path + len, assembly);
+            len += ARRAY_SIZE(assembly) - 1;
             break;
         default:
             return E_INVALIDARG;
@@ -165,9 +172,9 @@ 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);
+        lstrcpyW(pwzCachePath, path);
 
     *pcchPath = len;
     return hr;