[SCRRUN] Sync with Wine Staging 1.9.4. CORE-10912

svn path=/trunk/; revision=70926
This commit is contained in:
Amine Khaldi 2016-03-05 10:06:02 +00:00
parent c20ac899c6
commit c3885d3546
2 changed files with 54 additions and 5 deletions

View file

@ -3208,9 +3208,27 @@ static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *pbstrResult
static HRESULT WINAPI filesys_DriveExists(IFileSystem3 *iface, BSTR DriveSpec, static HRESULT WINAPI filesys_DriveExists(IFileSystem3 *iface, BSTR DriveSpec,
VARIANT_BOOL *pfExists) VARIANT_BOOL *pfExists)
{ {
FIXME("%p %s %p\n", iface, debugstr_w(DriveSpec), pfExists); UINT len;
WCHAR driveletter;
TRACE("%p %s %p\n", iface, debugstr_w(DriveSpec), pfExists);
return E_NOTIMPL; 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) static HRESULT WINAPI filesys_FileExists(IFileSystem3 *iface, BSTR path, VARIANT_BOOL *ret)
@ -3241,9 +3259,40 @@ static HRESULT WINAPI filesys_FolderExists(IFileSystem3 *iface, BSTR path, VARIA
static HRESULT WINAPI filesys_GetDrive(IFileSystem3 *iface, BSTR DriveSpec, static HRESULT WINAPI filesys_GetDrive(IFileSystem3 *iface, BSTR DriveSpec,
IDrive **ppdrive) IDrive **ppdrive)
{ {
FIXME("%p %s %p\n", iface, debugstr_w(DriveSpec), ppdrive); 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; return E_NOTIMPL;
}
} }
static HRESULT WINAPI filesys_GetFile(IFileSystem3 *iface, BSTR FilePath, static HRESULT WINAPI filesys_GetFile(IFileSystem3 *iface, BSTR FilePath,

View file

@ -168,7 +168,7 @@ reactos/dll/win32/rsabase # Synced to WineStaging-1.7.55
reactos/dll/win32/rsaenh # Synced to WineStaging-1.7.55 reactos/dll/win32/rsaenh # Synced to WineStaging-1.7.55
reactos/dll/win32/sccbase # 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/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/secur32 # Forked
reactos/dll/win32/security # Forked (different .spec) reactos/dll/win32/security # Forked (different .spec)
reactos/dll/win32/sensapi # Synced to WineStaging-1.7.55 reactos/dll/win32/sensapi # Synced to WineStaging-1.7.55