Commit c824cfa0 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

scrrun: Implement DriveLetter property for a drive.

parent 61a3bd33
......@@ -687,8 +687,17 @@ static HRESULT WINAPI drive_get_Path(IDrive *iface, BSTR *path)
static HRESULT WINAPI drive_get_DriveLetter(IDrive *iface, BSTR *letter)
{
struct drive *This = impl_from_IDrive(iface);
FIXME("(%p)->(%p): stub\n", This, letter);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, letter);
if (!letter)
return E_POINTER;
*letter = SysAllocStringLen(This->root, 1);
if (!*letter)
return E_OUTOFMEMORY;
return S_OK;
}
static HRESULT WINAPI drive_get_ShareName(IDrive *iface, BSTR *share_name)
......
......@@ -1240,10 +1240,19 @@ static void test_DriveCollection(void)
while (IEnumVARIANT_Next(enumvar, 1, &var, &fetched) == S_OK) {
IDrive *drive = (IDrive*)V_DISPATCH(&var);
DriveTypeConst type;
BSTR str;
hr = IDrive_get_DriveType(drive, &type);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = IDrive_get_DriveLetter(drive, NULL);
ok(hr == E_POINTER, "got 0x%08x\n", hr);
hr = IDrive_get_DriveLetter(drive, &str);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(SysStringLen(str) == 1, "got string %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = IDrive_get_IsReady(drive, NULL);
ok(hr == E_POINTER, "got 0x%08x\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment