Author: akhaldi
Date: Sat Jun 3 22:38:57 2017
New Revision: 74845
URL:
http://svn.reactos.org/svn/reactos?rev=74845&view=rev
Log:
[SCRRUN] Sync with Wine Staging 2.9. CORE-13362
f601660 scrrun: Added DateLastModified property for IFile.
Modified:
trunk/reactos/dll/win32/scrrun/filesystem.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/scrrun/filesystem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/scrrun/filesyste…
==============================================================================
--- trunk/reactos/dll/win32/scrrun/filesystem.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/scrrun/filesystem.c [iso-8859-1] Sat Jun 3 22:38:57 2017
@@ -2699,6 +2699,21 @@
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);
@@ -2706,11 +2721,17 @@
return E_NOTIMPL;
}
-static HRESULT WINAPI file_get_DateLastModified(IFile *iface, DATE *pdate)
+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)
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jun 3 22:38:57 2017
@@ -165,7 +165,7 @@
reactos/dll/win32/rsaenh # Synced to WineStaging-2.9
reactos/dll/win32/sccbase # Synced to WineStaging-1.9.11
reactos/dll/win32/schannel # Synced to WineStaging-1.9.11
-reactos/dll/win32/scrrun # Synced to WineStaging-2.2
+reactos/dll/win32/scrrun # Synced to WineStaging-2.9
reactos/dll/win32/secur32 # Forked
reactos/dll/win32/security # Forked (different .spec)
reactos/dll/win32/sensapi # Synced to WineStaging-1.9.11