Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f6016609
Commit
f6016609
authored
Apr 21, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Added DateLastModified property for IFile.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d4b1938c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
filesystem.c
dlls/scrrun/filesystem.c
+24
-3
filesystem.c
dlls/scrrun/tests/filesystem.c
+9
-0
No files found.
dlls/scrrun/filesystem.c
View file @
f6016609
...
...
@@ -2712,6 +2712,21 @@ static HRESULT WINAPI file_put_Attributes(IFile *iface, FileAttribute pfa)
return
SetFileAttributesW
(
This
->
path
,
pfa
)
?
S_OK
:
create_error
(
GetLastError
());
}
static
HRESULT
get_date_from_filetime
(
const
FILETIME
*
ft
,
DATE
*
date
)
{
FILETIME
ftlocal
;
SYSTEMTIME
st
;
if
(
!
date
)
return
E_POINTER
;
FileTimeToLocalFileTime
(
ft
,
&
ftlocal
);
FileTimeToSystemTime
(
&
ftlocal
,
&
st
);
SystemTimeToVariantTime
(
&
st
,
date
);
return
S_OK
;
}
static
HRESULT
WINAPI
file_get_DateCreated
(
IFile
*
iface
,
DATE
*
pdate
)
{
struct
file
*
This
=
impl_from_IFile
(
iface
);
...
...
@@ -2719,11 +2734,17 @@ static HRESULT WINAPI file_get_DateCreated(IFile *iface, DATE *pdate)
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
file_get_DateLastModified
(
IFile
*
iface
,
DATE
*
p
date
)
static
HRESULT
WINAPI
file_get_DateLastModified
(
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
.
ftLastWriteTime
,
date
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
file_get_DateLastAccessed
(
IFile
*
iface
,
DATE
*
pdate
)
...
...
dlls/scrrun/tests/filesystem.c
View file @
f6016609
...
...
@@ -624,6 +624,7 @@ static void test_GetFile(void)
HRESULT
hr
;
HANDLE
hf
;
BOOL
ret
;
DATE
date
;
get_temp_path
(
NULL
,
pathW
);
...
...
@@ -649,6 +650,14 @@ static void test_GetFile(void)
hr
=
IFileSystem3_GetFile
(
fs3
,
path
,
&
file
);
ok
(
hr
==
S_OK
,
"GetFile returned %x, expected S_OK
\n
"
,
hr
);
hr
=
IFile_get_DateLastModified
(
file
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
date
=
0
.
0
;
hr
=
IFile_get_DateLastModified
(
file
,
&
date
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
date
>
0
.
0
,
"got %f
\n
"
,
date
);
hr
=
IFile_get_Path
(
file
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment