https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3e3d28dfef501b75850ed…
commit 3e3d28dfef501b75850ed5091c497742e3e0d0dc
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Wed Mar 21 13:09:31 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Wed Mar 21 13:09:31 2018 +0100
[PROPSYS] Sync with Wine Staging 3.3. CORE-14434
---
dll/win32/propsys/CMakeLists.txt | 4 ++--
dll/win32/propsys/precomp.h | 26 +++++++++++++++++++++++
dll/win32/propsys/propstore.c | 20 +++++++++++++++---
dll/win32/propsys/propsys.spec | 2 +-
dll/win32/propsys/propsys_main.c | 15 +++++++++++++-
dll/win32/propsys/propsys_private.h | 26 +----------------------
dll/win32/propsys/propvar.c | 41 +++++++++++++++++++++++++++++++++----
media/doc/README.WINE | 2 +-
8 files changed, 99 insertions(+), 37 deletions(-)
diff --git a/dll/win32/propsys/CMakeLists.txt b/dll/win32/propsys/CMakeLists.txt
index 1c60f7b926..7b61789aa2 100644
--- a/dll/win32/propsys/CMakeLists.txt
+++ b/dll/win32/propsys/CMakeLists.txt
@@ -7,7 +7,7 @@ list(APPEND SOURCE
propstore.c
propsys_main.c
propvar.c
- propsys_private.h
+ precomp.h
${CMAKE_CURRENT_BINARY_DIR}/propsys_stubs.c)
add_library(propsys SHARED
@@ -18,5 +18,5 @@ add_library(propsys SHARED
set_module_type(propsys win32dll)
target_link_libraries(propsys uuid wine)
add_importlibs(propsys ole32 oleaut32 msvcrt kernel32 ntdll)
-add_pch(propsys propsys_private.h SOURCE)
+add_pch(propsys precomp.h SOURCE)
add_cd_file(TARGET propsys DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/propsys/precomp.h b/dll/win32/propsys/precomp.h
new file mode 100644
index 0000000000..74eabdd3cf
--- /dev/null
+++ b/dll/win32/propsys/precomp.h
@@ -0,0 +1,26 @@
+
+#ifndef _PROPSYS_PRECOMP_H_
+#define _PROPSYS_PRECOMP_H_
+
+#include <wine/config.h>
+
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include <windef.h>
+#include <winbase.h>
+#include <objbase.h>
+#include <propsys.h>
+
+#include <wine/debug.h>
+#include <wine/unicode.h>
+
+#include "propsys_private.h"
+
+#endif /* !_PROPSYS_PRECOMP_H_ */
diff --git a/dll/win32/propsys/propstore.c b/dll/win32/propsys/propstore.c
index 9669fef0b4..9c848fcaba 100644
--- a/dll/win32/propsys/propstore.c
+++ b/dll/win32/propsys/propstore.c
@@ -18,13 +18,27 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "propsys_private.h"
+#define COBJMACROS
+#include "config.h"
+
+#include <stdarg.h>
-#include <wine/list.h>
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+#include "rpcproxy.h"
+#include "propsys.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/list.h"
+
+#include "initguid.h"
+#include "propsys_private.h"
-#include <initguid.h>
DEFINE_GUID(FMTID_NamedProperties, 0xd5cdd505, 0x2e9c, 0x101b, 0x93, 0x97, 0x08, 0x00,
0x2b, 0x2c, 0xf9, 0xae);
+WINE_DEFAULT_DEBUG_CHANNEL(propsys);
+
typedef struct {
struct list entry;
DWORD pid;
diff --git a/dll/win32/propsys/propsys.spec b/dll/win32/propsys/propsys.spec
index 2ee71ba370..791618e5f5 100644
--- a/dll/win32/propsys/propsys.spec
+++ b/dll/win32/propsys/propsys.spec
@@ -138,7 +138,7 @@
@ stdcall PropVariantToStringAlloc(ptr ptr)
@ stub PropVariantToStringVector
@ stub PropVariantToStringVectorAlloc
-@ stub PropVariantToStringWithDefault
+@ stdcall PropVariantToStringWithDefault(ptr wstr)
@ stdcall PropVariantToUInt16(ptr ptr)
@ stub PropVariantToUInt16Vector
@ stub PropVariantToUInt16VectorAlloc
diff --git a/dll/win32/propsys/propsys_main.c b/dll/win32/propsys/propsys_main.c
index de4e24fd41..7631023b83 100644
--- a/dll/win32/propsys/propsys_main.c
+++ b/dll/win32/propsys/propsys_main.c
@@ -19,9 +19,22 @@
* 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 "objbase.h"
+#include "rpcproxy.h"
+#include "propsys.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
#include "propsys_private.h"
-#include <rpcproxy.h>
+WINE_DEFAULT_DEBUG_CHANNEL(propsys);
static HINSTANCE propsys_hInstance;
diff --git a/dll/win32/propsys/propsys_private.h b/dll/win32/propsys/propsys_private.h
index 8cb748b8a8..d43de7534d 100644
--- a/dll/win32/propsys/propsys_private.h
+++ b/dll/win32/propsys/propsys_private.h
@@ -18,30 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#ifndef _PROPSYS_PRIVATE_H_
-#define _PROPSYS_PRIVATE_H_
-
-#include <config.h>
-
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define NONAMELESSUNION
-
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
-#include <propsys.h>
-
-#include <wine/debug.h>
-#include <wine/unicode.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(propsys);
+#pragma once
HRESULT PropertyStore_CreateInstance(IUnknown *outer, REFIID riid, void **ppv)
DECLSPEC_HIDDEN;
-
-#endif /* _PROPSYS_PRIVATE_H_ */
diff --git a/dll/win32/propsys/propvar.c b/dll/win32/propsys/propvar.c
index 4b9292eecb..f0877329af 100644
--- a/dll/win32/propsys/propvar.c
+++ b/dll/win32/propsys/propvar.c
@@ -18,12 +18,27 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "propsys_private.h"
+#include "config.h"
+#include "wine/port.h"
+#include <stdarg.h>
#include <stdio.h>
-#include <winreg.h>
-#include <oleauto.h>
-#include <propvarutil.h>
+#include <stdlib.h>
+
+#define NONAMELESSUNION
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "winreg.h"
+#include "winuser.h"
+#include "shlobj.h"
+#include "propvarutil.h"
+
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(propsys);
static HRESULT PROPVAR_ConvertFILETIME(const FILETIME *ft, PROPVARIANT *ppropvarDest,
VARTYPE vt)
{
@@ -322,6 +337,24 @@ HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn,
WCHAR **ret)
return hr;
}
+PCWSTR WINAPI PropVariantToStringWithDefault(REFPROPVARIANT propvarIn, LPCWSTR
pszDefault)
+{
+ static const WCHAR str_empty[] = {0};
+ if (propvarIn->vt == VT_BSTR)
+ {
+ if (propvarIn->u.bstrVal == NULL)
+ return str_empty;
+
+ return propvarIn->u.bstrVal;
+ }
+
+ if (propvarIn->vt == VT_LPWSTR && propvarIn->u.pwszVal != NULL)
+ return propvarIn->u.pwszVal;
+
+ return pszDefault;
+}
+
+
/******************************************************************
* PropVariantChangeType (PROPSYS.@)
*/
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index a6afb21f40..94973e6bf2 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -151,7 +151,7 @@ reactos/dll/win32/pdh # Synced to WineStaging-3.3
reactos/dll/win32/pidgen # Synced to WineStaging-3.3
reactos/dll/win32/powrprof # Forked at Wine-1.0rc5
reactos/dll/win32/printui # Synced to WineStaging-3.3
-reactos/dll/win32/propsys # Synced to Wine-3.0
+reactos/dll/win32/propsys # Synced to WineStaging-3.3
reactos/dll/win32/pstorec # Synced to WineStaging-2.2
reactos/dll/win32/qmgr # Synced to WineStaging-2.9
reactos/dll/win32/qmgrprxy # Synced to WineStaging-2.9