propsys: Implement InitVariantFromFileTime.
Signed-off-by: Daniel Lehman <dlehman@esri.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6ecf25e9a8
commit
f2b8ccb7b0
|
@ -49,7 +49,7 @@
|
||||||
@ stub InitVariantFromBooleanArray
|
@ stub InitVariantFromBooleanArray
|
||||||
@ stdcall InitVariantFromBuffer(ptr long ptr)
|
@ stdcall InitVariantFromBuffer(ptr long ptr)
|
||||||
@ stub InitVariantFromDoubleArray
|
@ stub InitVariantFromDoubleArray
|
||||||
@ stub InitVariantFromFileTime
|
@ stdcall InitVariantFromFileTime(ptr ptr)
|
||||||
@ stub InitVariantFromFileTimeArray
|
@ stub InitVariantFromFileTimeArray
|
||||||
@ stdcall InitVariantFromGUIDAsString(ptr ptr)
|
@ stdcall InitVariantFromGUIDAsString(ptr ptr)
|
||||||
@ stub InitVariantFromInt16Array
|
@ stub InitVariantFromInt16Array
|
||||||
|
|
|
@ -672,6 +672,21 @@ HRESULT WINAPI InitVariantFromBuffer(const VOID *pv, UINT cb, VARIANT *pvar)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI InitVariantFromFileTime(const FILETIME *ft, VARIANT *var)
|
||||||
|
{
|
||||||
|
SYSTEMTIME st;
|
||||||
|
|
||||||
|
TRACE("%p, %p\n", ft, var);
|
||||||
|
|
||||||
|
VariantInit(var);
|
||||||
|
if (!FileTimeToSystemTime(ft, &st))
|
||||||
|
return E_INVALIDARG;
|
||||||
|
if (!SystemTimeToVariantTime(&st, &V_DATE(var)))
|
||||||
|
return E_INVALIDARG;
|
||||||
|
V_VT(var) = VT_DATE;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
static inline DWORD PROPVAR_HexToNum(const WCHAR *hex)
|
static inline DWORD PROPVAR_HexToNum(const WCHAR *hex)
|
||||||
{
|
{
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
|
|
@ -71,6 +71,7 @@ typedef int PROPVAR_COMPARE_FLAGS;
|
||||||
HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc,
|
HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc,
|
||||||
PROPVAR_CHANGE_FLAGS flags, VARTYPE vt);
|
PROPVAR_CHANGE_FLAGS flags, VARTYPE vt);
|
||||||
HRESULT WINAPI InitPropVariantFromGUIDAsString(REFGUID guid, PROPVARIANT *ppropvar);
|
HRESULT WINAPI InitPropVariantFromGUIDAsString(REFGUID guid, PROPVARIANT *ppropvar);
|
||||||
|
HRESULT WINAPI InitVariantFromFileTime(const FILETIME *ft, VARIANT *var);
|
||||||
HRESULT WINAPI InitVariantFromGUIDAsString(REFGUID guid, VARIANT *pvar);
|
HRESULT WINAPI InitVariantFromGUIDAsString(REFGUID guid, VARIANT *pvar);
|
||||||
HRESULT WINAPI InitPropVariantFromBuffer(const VOID *pv, UINT cb, PROPVARIANT *ppropvar);
|
HRESULT WINAPI InitPropVariantFromBuffer(const VOID *pv, UINT cb, PROPVARIANT *ppropvar);
|
||||||
HRESULT WINAPI InitPropVariantFromCLSID(REFCLSID clsid, PROPVARIANT *ppropvar);
|
HRESULT WINAPI InitPropVariantFromCLSID(REFCLSID clsid, PROPVARIANT *ppropvar);
|
||||||
|
|
Loading…
Reference in New Issue