Author: akhaldi
Date: Sat Mar 5 10:06:02 2016
New Revision: 70926
URL:
http://svn.reactos.org/svn/reactos?rev=70926&view=rev
Log:
[SCRRUN] Sync with Wine Staging 1.9.4. CORE-10912
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 Mar 5 10:06:02 2016
@@ -3208,9 +3208,27 @@
static HRESULT WINAPI filesys_DriveExists(IFileSystem3 *iface, BSTR DriveSpec,
VARIANT_BOOL *pfExists)
{
- FIXME("%p %s %p\n", iface, debugstr_w(DriveSpec), pfExists);
-
- return E_NOTIMPL;
+ UINT len;
+ WCHAR driveletter;
+ TRACE("%p %s %p\n", iface, debugstr_w(DriveSpec), pfExists);
+
+ if (!pfExists) return E_POINTER;
+
+ *pfExists = VARIANT_FALSE;
+ len = SysStringLen(DriveSpec);
+
+ if (len >= 1) {
+ driveletter = toupperW(DriveSpec[0]);
+ if (driveletter >= 'A' && driveletter <= 'Z'
+ && (len < 2 || DriveSpec[1] == ':')
+ && (len < 3 || DriveSpec[2] == '\\')) {
+ const WCHAR root[] = {driveletter, ':', '\\', 0};
+ UINT drivetype = GetDriveTypeW(root);
+ *pfExists = drivetype != DRIVE_NO_ROOT_DIR && drivetype !=
DRIVE_UNKNOWN ? VARIANT_TRUE : VARIANT_FALSE;
+ }
+ }
+
+ return S_OK;
}
static HRESULT WINAPI filesys_FileExists(IFileSystem3 *iface, BSTR path, VARIANT_BOOL
*ret)
@@ -3241,9 +3259,40 @@
static HRESULT WINAPI filesys_GetDrive(IFileSystem3 *iface, BSTR DriveSpec,
IDrive **ppdrive)
{
- FIXME("%p %s %p\n", iface, debugstr_w(DriveSpec), ppdrive);
-
- return E_NOTIMPL;
+ UINT len;
+ HRESULT hr;
+ WCHAR driveletter;
+ VARIANT_BOOL drive_exists;
+
+ TRACE("%p %s %p\n", iface, debugstr_w(DriveSpec), ppdrive);
+
+ if (!ppdrive)
+ return E_POINTER;
+
+ *ppdrive = NULL;
+
+ /* DriveSpec may be one of: 'x', 'x:', 'x:\',
'\\computer\share' */
+ len = SysStringLen(DriveSpec);
+ if (!len)
+ return E_INVALIDARG;
+ else if (len <= 3) {
+ driveletter = toupperW(DriveSpec[0]);
+ if (driveletter < 'A' || driveletter > 'Z'
+ || (len >= 2 && DriveSpec[1] != ':')
+ || (len == 3 && DriveSpec[2] != '\\'))
+ return E_INVALIDARG;
+ hr = IFileSystem3_DriveExists(iface, DriveSpec, &drive_exists);
+ if (FAILED(hr))
+ return hr;
+ if (drive_exists == VARIANT_FALSE)
+ return CTL_E_DEVICEUNAVAILABLE;
+ return create_drive(driveletter, ppdrive);
+ } else {
+ if (DriveSpec[0] != '\\' || DriveSpec[1] != '\\')
+ return E_INVALIDARG;
+ FIXME("%s not implemented yet\n", debugstr_w(DriveSpec));
+ return E_NOTIMPL;
+ }
}
static HRESULT WINAPI filesys_GetFile(IFileSystem3 *iface, BSTR FilePath,
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 Mar 5 10:06:02 2016
@@ -168,7 +168,7 @@
reactos/dll/win32/rsaenh # Synced to WineStaging-1.7.55
reactos/dll/win32/sccbase # Synced to WineStaging-1.7.55
reactos/dll/win32/schannel # Synced to WineStaging-1.7.55
-reactos/dll/win32/scrrun # Synced to WineStaging-1.7.55
+reactos/dll/win32/scrrun # Synced to WineStaging-1.9.4
reactos/dll/win32/secur32 # Forked
reactos/dll/win32/security # Forked (different .spec)
reactos/dll/win32/sensapi # Synced to WineStaging-1.7.55