Author: akhaldi
Date: Thu Aug 18 10:35:19 2016
New Revision: 72302
URL:
http://svn.reactos.org/svn/reactos?rev=72302&view=rev
Log:
[PROPSYS] Sync with Wine Staging 1.9.16. CORE-11866
Modified:
trunk/reactos/dll/win32/propsys/propsys.spec
trunk/reactos/dll/win32/propsys/propvar.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/propsys/propsys.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/propsys/propsys.…
==============================================================================
--- trunk/reactos/dll/win32/propsys/propsys.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/propsys/propsys.spec [iso-8859-1] Thu Aug 18 10:35:19 2016
@@ -135,7 +135,7 @@
@ stub PropVariantToInt64WithDefault
@ stub PropVariantToStrRet
@ stub PropVariantToString
-@ stub PropVariantToStringAlloc
+@ stdcall PropVariantToStringAlloc(ptr ptr)
@ stub PropVariantToStringVector
@ stub PropVariantToStringVectorAlloc
@ stub PropVariantToStringWithDefault
Modified: trunk/reactos/dll/win32/propsys/propvar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/propsys/propvar.…
==============================================================================
--- trunk/reactos/dll/win32/propsys/propvar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/propsys/propvar.c [iso-8859-1] Thu Aug 18 10:35:19 2016
@@ -198,6 +198,43 @@
return hr;
}
+HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret)
+{
+ WCHAR *res = NULL;
+ HRESULT hr = S_OK;
+
+ TRACE("%p,%p semi-stub\n", propvarIn, ret);
+
+ switch(propvarIn->vt)
+ {
+ case VT_NULL:
+ res = CoTaskMemAlloc(1*sizeof(WCHAR));
+ res[0] = '\0';
+ break;
+ case VT_LPSTR:
+ if(propvarIn->u.pszVal)
+ {
+ DWORD len;
+
+ len = MultiByteToWideChar(CP_ACP, 0, propvarIn->u.pszVal, -1, NULL,
0);
+ res = CoTaskMemAlloc(len*sizeof(WCHAR));
+ if(!res)
+ return E_OUTOFMEMORY;
+
+ MultiByteToWideChar(CP_ACP, 0, propvarIn->u.pszVal, -1, res, len);
+ }
+ break;
+ default:
+ FIXME("Unsupported conversion (%d)\n", propvarIn->vt);
+ hr = E_FAIL;
+ break;
+ }
+
+ *ret = res;
+
+ return hr;
+}
+
/******************************************************************
* PropVariantChangeType (PROPSYS.@)
*/
@@ -209,6 +246,9 @@
FIXME("(%p, %p, %d, %d, %d): semi-stub!\n", ppropvarDest, propvarSrc,
propvarSrc->vt, flags, vt);
+ if(vt == propvarSrc->vt)
+ return PropVariantCopy(ppropvarDest, propvarSrc);
+
switch (vt)
{
case VT_I2:
@@ -274,6 +314,17 @@
{
ppropvarDest->vt = VT_UI8;
ppropvarDest->u.uhVal.QuadPart = res;
+ }
+ return hr;
+ }
+ case VT_LPWSTR:
+ {
+ WCHAR *res;
+ hr = PropVariantToStringAlloc(propvarSrc, &res);
+ if (SUCCEEDED(hr))
+ {
+ ppropvarDest->vt = VT_LPWSTR;
+ ppropvarDest->u.pwszVal = res;
}
return hr;
}
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Aug 18 10:35:19 2016
@@ -154,7 +154,7 @@
reactos/dll/win32/pidgen # Synced to WineStaging-1.9.11
reactos/dll/win32/powrprof # Forked at Wine-1.0rc5
reactos/dll/win32/printui # Synced to WineStaging-1.9.11
-reactos/dll/win32/propsys # Synced to WineStaging-1.9.11
+reactos/dll/win32/propsys # Synced to WineStaging-1.9.16
reactos/dll/win32/pstorec # Synced to WineStaging-1.9.11
reactos/dll/win32/qmgr # Synced to WineStaging-1.9.11
reactos/dll/win32/qmgrprxy # Synced to WineStaging-1.9.11