Commit 8eb7843d authored by Robert Wilhelm's avatar Robert Wilhelm Committed by Alexandre Julliard

scrrun: Added DateCreated property for IFile.

parent 51604ad1
......@@ -2947,11 +2947,17 @@ static HRESULT get_date_from_filetime(const FILETIME *ft, DATE *date)
return S_OK;
}
static HRESULT WINAPI file_get_DateCreated(IFile *iface, DATE *pdate)
static HRESULT WINAPI file_get_DateCreated(IFile *iface, DATE *date)
{
struct file *This = impl_from_IFile(iface);
FIXME("(%p)->(%p)\n", This, pdate);
return E_NOTIMPL;
WIN32_FILE_ATTRIBUTE_DATA attrs;
TRACE("(%p)->(%p)\n", This, date);
if (GetFileAttributesExW(This->path, GetFileExInfoStandard, &attrs))
return get_date_from_filetime(&attrs.ftCreationTime, date);
return E_FAIL;
}
static HRESULT WINAPI file_get_DateLastModified(IFile *iface, DATE *date)
......
......@@ -635,6 +635,14 @@ static void test_GetFile(void)
hr = IFileSystem3_GetFile(fs3, path, &file);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFile_get_DateCreated(file, NULL);
ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
date = 0.0;
hr = IFile_get_DateCreated(file, &date);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(date > 0.0, "got %f\n", date);
hr = IFile_get_DateLastModified(file, NULL);
ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
......
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