mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 04:34:48 +00:00
scrrun: Added DateCreated property for IFile.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42857
This commit is contained in:
parent
51604ad186
commit
8eb7843d20
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue