mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 04:53:31 +08:00
[PROPSYS] Sync with Wine 3.0. CORE-14225
This commit is contained in:
parent
5f28af7188
commit
95c3773f73
@ -108,7 +108,7 @@
|
||||
@ stub PropVariantGetUInt32Elem
|
||||
@ stub PropVariantGetUInt64Elem
|
||||
@ stub PropVariantToBSTR
|
||||
@ stub PropVariantToBoolean
|
||||
@ stdcall PropVariantToBoolean(ptr ptr)
|
||||
@ stub PropVariantToBooleanVector
|
||||
@ stub PropVariantToBooleanVectorAlloc
|
||||
@ stub PropVariantToBooleanWithDefault
|
||||
|
@ -212,6 +212,66 @@ HRESULT WINAPI PropVariantToUInt64(REFPROPVARIANT propvarIn, ULONGLONG *ret)
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI PropVariantToBoolean(REFPROPVARIANT propvarIn, BOOL *ret)
|
||||
{
|
||||
static const WCHAR trueW[] = {'t','r','u','e',0};
|
||||
static const WCHAR falseW[] = {'f','a','l','s','e',0};
|
||||
static const WCHAR true2W[] = {'#','T','R','U','E','#',0};
|
||||
static const WCHAR false2W[] = {'#','F','A','L','S','E','#',0};
|
||||
LONGLONG res;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%p,%p\n", propvarIn, ret);
|
||||
|
||||
*ret = FALSE;
|
||||
|
||||
switch (propvarIn->vt)
|
||||
{
|
||||
case VT_BOOL:
|
||||
*ret = propvarIn->u.boolVal == VARIANT_TRUE;
|
||||
return S_OK;
|
||||
|
||||
case VT_LPWSTR:
|
||||
case VT_BSTR:
|
||||
if (!propvarIn->u.pwszVal)
|
||||
return DISP_E_TYPEMISMATCH;
|
||||
|
||||
if (!lstrcmpiW(propvarIn->u.pwszVal, trueW) || !lstrcmpW(propvarIn->u.pwszVal, true2W))
|
||||
{
|
||||
*ret = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (!lstrcmpiW(propvarIn->u.pwszVal, falseW) || !lstrcmpW(propvarIn->u.pwszVal, false2W))
|
||||
{
|
||||
*ret = FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
break;
|
||||
|
||||
case VT_LPSTR:
|
||||
if (!propvarIn->u.pszVal)
|
||||
return DISP_E_TYPEMISMATCH;
|
||||
|
||||
if (!lstrcmpiA(propvarIn->u.pszVal, "true") || !lstrcmpA(propvarIn->u.pszVal, "#TRUE#"))
|
||||
{
|
||||
*ret = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (!lstrcmpiA(propvarIn->u.pszVal, "false") || !lstrcmpA(propvarIn->u.pszVal, "#FALSE#"))
|
||||
{
|
||||
*ret = FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
hr = PROPVAR_ConvertNumber(propvarIn, 64, TRUE, &res);
|
||||
*ret = !!res;
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret)
|
||||
{
|
||||
WCHAR *res = NULL;
|
||||
|
@ -151,7 +151,7 @@ reactos/dll/win32/pdh # Synced to WineStaging-2.9
|
||||
reactos/dll/win32/pidgen # Synced to WineStaging-2.9
|
||||
reactos/dll/win32/powrprof # Forked at Wine-1.0rc5
|
||||
reactos/dll/win32/printui # Synced to WineStaging-2.9
|
||||
reactos/dll/win32/propsys # Synced to WineStaging-2.16
|
||||
reactos/dll/win32/propsys # Synced to Wine-3.0
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user