propsys: Make VT_FILETIME handling by PropVariantChangeType more implicit.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
aa8dc616e0
commit
3a7fb75751
|
@ -36,12 +36,11 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(propsys);
|
WINE_DEFAULT_DEBUG_CHANNEL(propsys);
|
||||||
|
|
||||||
static HRESULT PROPVAR_ConvertFILETIME(PROPVARIANT *ppropvarDest,
|
static HRESULT PROPVAR_ConvertFILETIME(const FILETIME *ft, PROPVARIANT *ppropvarDest, VARTYPE vt)
|
||||||
REFPROPVARIANT propvarSrc, VARTYPE vt)
|
|
||||||
{
|
{
|
||||||
SYSTEMTIME time;
|
SYSTEMTIME time;
|
||||||
|
|
||||||
FileTimeToSystemTime(&propvarSrc->u.filetime, &time);
|
FileTimeToSystemTime(ft, &time);
|
||||||
|
|
||||||
switch (vt)
|
switch (vt)
|
||||||
{
|
{
|
||||||
|
@ -275,6 +274,9 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p
|
||||||
if (vt == propvarSrc->vt)
|
if (vt == propvarSrc->vt)
|
||||||
return PropVariantCopy(ppropvarDest, propvarSrc);
|
return PropVariantCopy(ppropvarDest, propvarSrc);
|
||||||
|
|
||||||
|
if (propvarSrc->vt == VT_FILETIME)
|
||||||
|
return PROPVAR_ConvertFILETIME(&propvarSrc->u.filetime, ppropvarDest, vt);
|
||||||
|
|
||||||
switch (vt)
|
switch (vt)
|
||||||
{
|
{
|
||||||
case VT_I1:
|
case VT_I1:
|
||||||
|
@ -382,18 +384,12 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p
|
||||||
}
|
}
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
switch (propvarSrc->vt)
|
|
||||||
{
|
|
||||||
case VT_FILETIME:
|
|
||||||
return PROPVAR_ConvertFILETIME(ppropvarDest, propvarSrc, vt);
|
|
||||||
default:
|
default:
|
||||||
FIXME("Unhandled source type: %d\n", propvarSrc->vt);
|
FIXME("Unhandled dest type: %d\n", vt);
|
||||||
}
|
|
||||||
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void PROPVAR_GUIDToWSTR(REFGUID guid, WCHAR *str)
|
static void PROPVAR_GUIDToWSTR(REFGUID guid, WCHAR *str)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue