[SHDOCVW] Sync with Wine Staging 3.3. CORE-14434
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 23 Mar 2018 11:24:25 +0000 (12:24 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 23 Mar 2018 11:24:25 +0000 (12:24 +0100)
dll/win32/shdocvw/CMakeLists.txt
dll/win32/shdocvw/precomp.h [new file with mode: 0644]
dll/win32/shdocvw/shdocvw.h
dll/win32/shdocvw/shdocvw.rc
dll/win32/shdocvw/shdocvw.spec
dll/win32/shdocvw/shdocvw_main.c
dll/win32/shdocvw/shlinstobj.c
media/doc/README.WINE

index f79613e..5efd1fd 100644 (file)
@@ -9,7 +9,7 @@ spec2def(shdocvw.dll shdocvw.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     shdocvw_main.c
     shlinstobj.c
-    shdocvw.h
+    precomp.h
     ${CMAKE_CURRENT_BINARY_DIR}/shdocvw_stubs.c)
 
 add_typelib(shdocvw_v1.idl)
@@ -25,5 +25,5 @@ target_link_libraries(shdocvw uuid wine)
 add_delay_importlibs(shdocvw ole32 oleaut32 ieframe)
 add_importlibs(shdocvw shlwapi advapi32 msvcrt kernel32 ntdll)
 add_dependencies(shdocvw stdole2)
-add_pch(shdocvw shdocvw.h SOURCE)
+add_pch(shdocvw precomp.h SOURCE)
 add_cd_file(TARGET shdocvw DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/shdocvw/precomp.h b/dll/win32/shdocvw/precomp.h
new file mode 100644 (file)
index 0000000..48f0f29
--- /dev/null
@@ -0,0 +1,17 @@
+
+#ifndef _SHDOCVW_PRECOMP_H
+#define _SHDOCVW_PRECOMP_H
+
+#include <wine/config.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include "shdocvw.h"
+
+#include <winreg.h>
+
+#include <wine/debug.h>
+
+#endif /* !_SHDOCVW_PRECOMP_H */
index 626a9f8..8cac507 100644 (file)
 #ifndef __WINE_SHDOCVW_H
 #define __WINE_SHDOCVW_H
 
-#include <wine/config.h>
+#define COBJMACROS
 
 #include <stdarg.h>
 
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
 
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
-#include <winreg.h>
-#include <shlobj.h>
+#include "ole2.h"
+#include "shlobj.h"
+#include "exdisp.h"
 
-#include <wine/debug.h>
-WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
+#include "wine/unicode.h"
+#include "wine/heap.h"
+#include "wine/list.h"
 
 /**********************************************************************
  * Shell Instance Objects
@@ -54,17 +51,4 @@ extern LONG SHDOCVW_refCount DECLSPEC_HIDDEN;
 static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_refCount ); }
 static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount ); }
 
-
-/* memory allocation functions */
-
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
-{
-    return HeapAlloc(GetProcessHeap(), 0, len);
-}
-
-static inline BOOL heap_free(void *mem)
-{
-    return HeapFree(GetProcessHeap(), 0, mem);
-}
-
 #endif /* __WINE_SHDOCVW_H */
index ba5c8ae..b262a8d 100644 (file)
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <windef.h>
+#include "windef.h"
 
 1 WINE_REGISTRY "shdocvw_v1.rgs"
 
@@ -32,4 +32,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 #define WINE_PRODUCTVERSION_STR "6.0.2900.2180"
 #define WINE_EXTRAVALUES VALUE "OLESelfRegister",""
 
-#include <wine/wine_common_ver.rc>
+#include "wine/wine_common_ver.rc"
index 55c81d1..f90cd11 100644 (file)
@@ -29,8 +29,8 @@
 129 stub DoFileDownloadEx
 130 stdcall -noname RunInstallUninstallStubs2(long)
 131 stub -noname SHCreateSplashScreen
-132 stub DoOrganizeFavDlg
-133 stub DoOrganizeFavDlgW
+132 stdcall DoOrganizeFavDlg(long str)
+133 stdcall DoOrganizeFavDlgW(long wstr)
 134 stub DoPrivacyDlg
 135 stub -noname IsFileUrl
 136 stub -noname IsFileUrlW
index 8a4c8c0..ef9e3a7 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include "config.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "wine/unicode.h"
+#include "wine/debug.h"
+
 #include "shdocvw.h"
 
-#include <shlwapi.h>
-#include <wininet.h>
+#include "winreg.h"
+#include "shlwapi.h"
+#include "wininet.h"
+#include "isguids.h"
+
+#include "initguid.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
 
 LONG SHDOCVW_refCount = 0;
 
@@ -365,8 +379,7 @@ DWORD WINAPI ParseURLFromOutsideSourceW(LPCWSTR url, LPWSTR out, LPDWORD plen, L
     HRESULT hr;
     DWORD needed;
     DWORD len;
-    DWORD res = 0;
-
+    DWORD res;
 
     TRACE("(%s, %p, %p, %p) len: %d, unknown: 0x%x\n", debugstr_w(url), out, plen, unknown,
             plen ? *plen : 0, unknown ? *unknown : 0);
@@ -392,10 +405,12 @@ DWORD WINAPI ParseURLFromOutsideSourceW(LPCWSTR url, LPWSTR out, LPDWORD plen, L
     needed = lstrlenW(buffer_out)+1;
     TRACE("got 0x%x with %s (need %d)\n", hr, debugstr_w(buffer_out), needed);
 
+    res = 0;
     if (*plen >= needed) {
         if (out != NULL) {
             lstrcpyW(out, buffer_out);
-            res++;
+            /* On success, 1 is returned for unicode version */
+            res = 1;
         }
         needed--;
     }
@@ -438,6 +453,7 @@ DWORD WINAPI ParseURLFromOutsideSourceA(LPCSTR url, LPSTR out, LPDWORD plen, LPD
     if (*plen >= needed) {
         if (out != NULL) {
             WideCharToMultiByte(CP_ACP, 0, buffer, -1, out, *plen, NULL, NULL);
+            /* On success, string size including terminating 0 is returned for ansi version */
             res = needed;
         }
         needed--;
@@ -546,3 +562,32 @@ BOOL WINAPI DoFileDownload(LPWSTR filename)
     FIXME("(%s) stub\n", debugstr_w(filename));
     return FALSE;
 }
+
+/******************************************************************
+ * DoOrganizeFavDlgW (SHDOCVW.@)
+ */
+BOOL WINAPI DoOrganizeFavDlgW(HWND hwnd, LPCWSTR initDir)
+{
+    FIXME("(%p %s) stub\n", hwnd, debugstr_w(initDir));
+    return FALSE;
+}
+
+/******************************************************************
+ * DoOrganizeFavDlg (SHDOCVW.@)
+ */
+BOOL WINAPI DoOrganizeFavDlg(HWND hwnd, LPCSTR initDir)
+{
+    LPWSTR initDirW = NULL;
+    BOOL res;
+
+    TRACE("(%p %s)\n", hwnd, debugstr_a(initDir));
+
+    if (initDir) {
+        DWORD len = MultiByteToWideChar(CP_ACP, 0, initDir, -1, NULL, 0);
+        initDirW = heap_alloc(len * sizeof(WCHAR));
+        MultiByteToWideChar(CP_ACP, 0, initDir, -1, initDirW, len);
+    }
+    res = DoOrganizeFavDlgW(hwnd, initDirW);
+    heap_free(initDirW);
+    return res;
+}
index 1a4e2d2..9c3232c 100644 (file)
  * some registry entries. This feature was introduced with win2k. Please
  * search for 'Shell Instance Objects' on MSDN to get more information. */
 
+#include <stdarg.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winreg.h"
+#include "objbase.h"
+#include "oleauto.h"
+
 #include "shdocvw.h"
 
+#include "wine/unicode.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
+
 #define CHARS_IN_GUID 39
 
 /******************************************************************************
index a360d28..23c4ed6 100644 (file)
@@ -171,7 +171,7 @@ reactos/dll/win32/security            # Forked (different .spec)
 reactos/dll/win32/sensapi             # Synced to WineStaging-3.3
 reactos/dll/win32/setupapi            # Forked at Wine-20050524
 reactos/dll/win32/shdoclc             # Synced to WineStaging-3.3
-reactos/dll/win32/shdocvw             # Synced to Wine-3.0
+reactos/dll/win32/shdocvw             # Synced to WineStaging-3.3
 reactos/dll/win32/shell32             # Forked at Wine-20071011
 reactos/dll/win32/shfolder            # Synced to WineStaging-2.9
 reactos/dll/win32/shlwapi             # Synced to WineStaging-3.3