Commit f2b8ccb7 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

propsys: Implement InitVariantFromFileTime.

parent 6ecf25e9
......@@ -49,7 +49,7 @@
@ stub InitVariantFromBooleanArray
@ stdcall InitVariantFromBuffer(ptr long ptr)
@ stub InitVariantFromDoubleArray
@ stub InitVariantFromFileTime
@ stdcall InitVariantFromFileTime(ptr ptr)
@ stub InitVariantFromFileTimeArray
@ stdcall InitVariantFromGUIDAsString(ptr ptr)
@ stub InitVariantFromInt16Array
......
......@@ -672,6 +672,21 @@ HRESULT WINAPI InitVariantFromBuffer(const VOID *pv, UINT cb, VARIANT *pvar)
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)
{
DWORD ret;
......
......@@ -71,6 +71,7 @@ typedef int PROPVAR_COMPARE_FLAGS;
HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc,
PROPVAR_CHANGE_FLAGS flags, VARTYPE vt);
HRESULT WINAPI InitPropVariantFromGUIDAsString(REFGUID guid, PROPVARIANT *ppropvar);
HRESULT WINAPI InitVariantFromFileTime(const FILETIME *ft, VARIANT *var);
HRESULT WINAPI InitVariantFromGUIDAsString(REFGUID guid, VARIANT *pvar);
HRESULT WINAPI InitPropVariantFromBuffer(const VOID *pv, UINT cb, PROPVARIANT *ppropvar);
HRESULT WINAPI InitPropVariantFromCLSID(REFCLSID clsid, PROPVARIANT *ppropvar);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment