[SCRRUN] Sync with Wine Staging 3.3. CORE-14434
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 23 Mar 2018 11:22:03 +0000 (12:22 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 23 Mar 2018 11:22:03 +0000 (12:22 +0100)
dll/win32/scrrun/CMakeLists.txt
dll/win32/scrrun/dictionary.c
dll/win32/scrrun/filesystem.c
dll/win32/scrrun/precomp.h [new file with mode: 0644]
dll/win32/scrrun/scrrun.c
dll/win32/scrrun/scrrun_private.h
media/doc/README.WINE

index 1bafb17..d77282f 100644 (file)
@@ -9,7 +9,7 @@ list(APPEND SOURCE
     dictionary.c
     filesystem.c
     scrrun.c
-    scrrun_private.h
+    precomp.h
     ${CMAKE_CURRENT_BINARY_DIR}/scrrun_stubs.c)
 
 list(APPEND scrrun_rc_deps
@@ -29,5 +29,5 @@ add_dependencies(scrrun scrrun_idlheader stdole2)
 set_module_type(scrrun win32dll)
 target_link_libraries(scrrun uuid wine)
 add_importlibs(scrrun oleaut32 version advapi32 msvcrt kernel32 ntdll)
-add_pch(scrrun scrrun_private.h SOURCE)
+add_pch(scrrun precomp.h SOURCE)
 add_cd_file(TARGET scrrun DESTINATION reactos/system32 FOR all)
index 17810ce..681274e 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+#define COBJMACROS
 
+#include "config.h"
+#include "wine/port.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "ole2.h"
+#include "olectl.h"
+#include "dispex.h"
+#include "scrrun.h"
 #include "scrrun_private.h"
 
-#include <olectl.h>
-#include <wine/list.h>
-#include <wine/port.h>
-#include <wine/unicode.h>
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/heap.h"
+#include "wine/list.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
 
 #define BUCKET_COUNT  509
 #define DICT_HASH_MOD 1201
index 45370e1..7a162a2 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#define COBJMACROS
+
+#include "config.h"
+#include <stdarg.h>
+#include <limits.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "ole2.h"
+#include "olectl.h"
+#include "dispex.h"
+#include "ntsecapi.h"
+#include "scrrun.h"
 #include "scrrun_private.h"
 
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/heap.h"
+
+#ifdef __REACTOS__
 #include <winver.h>
-#include <olectl.h>
-#include <ntsecapi.h>
-#include <wine/unicode.h>
+#endif
+
+WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
 
 static const WCHAR bsW[] = {'\\',0};
 static const WCHAR utf16bom = 0xfeff;
@@ -987,7 +1005,7 @@ static HRESULT WINAPI drive_get_VolumeName(IDrive *iface, BSTR *name)
         return E_POINTER;
 
     *name = NULL;
-    ret = GetVolumeInformationW(This->root, nameW, sizeof(nameW)/sizeof(WCHAR), NULL, NULL, NULL, NULL, 0);
+    ret = GetVolumeInformationW(This->root, nameW, ARRAY_SIZE(nameW), NULL, NULL, NULL, NULL, 0);
     if (ret)
         *name = SysAllocString(nameW);
     return ret ? S_OK : E_FAIL;
@@ -1012,7 +1030,7 @@ static HRESULT WINAPI drive_get_FileSystem(IDrive *iface, BSTR *fs)
         return E_POINTER;
 
     *fs = NULL;
-    ret = GetVolumeInformationW(This->root, NULL, 0, NULL, NULL, NULL, nameW, sizeof(nameW)/sizeof(WCHAR));
+    ret = GetVolumeInformationW(This->root, NULL, 0, NULL, NULL, NULL, nameW, ARRAY_SIZE(nameW));
     if (ret)
         *fs = SysAllocString(nameW);
     return ret ? S_OK : E_FAIL;
@@ -3427,13 +3445,13 @@ static HRESULT WINAPI filesys_GetSpecialFolder(IFileSystem3 *iface,
     switch (SpecialFolder)
     {
     case WindowsFolder:
-        ret = GetWindowsDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR));
+        ret = GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW));
         break;
     case SystemFolder:
-        ret = GetSystemDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR));
+        ret = GetSystemDirectoryW(pathW, ARRAY_SIZE(pathW));
         break;
     case TemporaryFolder:
-        ret = GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW);
+        ret = GetTempPathW(ARRAY_SIZE(pathW), pathW);
         /* we don't want trailing backslash */
         if (ret && pathW[ret-1] == '\\')
             pathW[ret-1] = 0;
diff --git a/dll/win32/scrrun/precomp.h b/dll/win32/scrrun/precomp.h
new file mode 100644 (file)
index 0000000..6832cbf
--- /dev/null
@@ -0,0 +1,27 @@
+
+#ifndef _SCRRUN_PRECOMP_H_
+#define _SCRRUN_PRECOMP_H_
+
+#include <wine/config.h>
+
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+
+#include <windef.h>
+#include <winbase.h>
+#include <winnls.h>
+#include <objbase.h>
+#include <oleauto.h>
+#include <dispex.h>
+#include <scrrun.h>
+
+#include <wine/debug.h>
+
+#include "scrrun_private.h"
+
+#endif /* !_SCRRUN_PRECOMP_H_ */
index 946f8b7..8c60c80 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+#define COBJMACROS
 
+#include "config.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "ole2.h"
+#include "olectl.h"
+#include "rpcproxy.h"
+
+#include <initguid.h>
+#include "scrrun.h"
 #include "scrrun_private.h"
 
-#include <rpcproxy.h>
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
 
 static HINSTANCE scrrun_instance;
 
@@ -166,7 +180,7 @@ static void release_typelib(void)
     if(!typelib)
         return;
 
-    for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++)
+    for (i = 0; i < ARRAY_SIZE(typeinfos); i++)
         if(typeinfos[i])
             ITypeInfo_Release(typeinfos[i]);
 
index 69ff610..d9ff241 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-
 #ifndef _SCRRUN_PRIVATE_H_
 #define _SCRRUN_PRIVATE_H_
 
-#include <wine/config.h>
-
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
-#include <objbase.h>
-#include <oleauto.h>
-#include <dispex.h>
-#include <scrrun.h>
-
-#include <wine/debug.h>
-WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
+#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
 
 extern HRESULT WINAPI FileSystem_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
 extern HRESULT WINAPI Dictionary_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
@@ -68,14 +48,4 @@ struct provideclassinfo {
 
 extern void init_classinfo(const GUID *guid, IUnknown *outer, struct provideclassinfo *classinfo) DECLSPEC_HIDDEN;
 
-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 /* _SCRRUN_PRIVATE_H_ */
+#endif
index 5283c09..1a61dfa 100644 (file)
@@ -165,7 +165,7 @@ reactos/dll/win32/rsabase             # Synced to WineStaging-3.3
 reactos/dll/win32/rsaenh              # Synced to WineStaging-2.9
 reactos/dll/win32/sccbase             # Synced to WineStaging-3.3
 reactos/dll/win32/schannel            # Synced to WineStaging-3.3
-reactos/dll/win32/scrrun              # Synced to WineStaging-2.9
+reactos/dll/win32/scrrun              # Synced to WineStaging-3.3
 reactos/dll/win32/secur32             # Forked
 reactos/dll/win32/security            # Forked (different .spec)
 reactos/dll/win32/sensapi             # Synced to WineStaging-2.9