scrrun: Implement FileSystem property.
This commit is contained in:
parent
5af5e40103
commit
6a2e1b3f31
|
@ -971,8 +971,19 @@ static HRESULT WINAPI drive_put_VolumeName(IDrive *iface, BSTR name)
|
||||||
static HRESULT WINAPI drive_get_FileSystem(IDrive *iface, BSTR *fs)
|
static HRESULT WINAPI drive_get_FileSystem(IDrive *iface, BSTR *fs)
|
||||||
{
|
{
|
||||||
struct drive *This = impl_from_IDrive(iface);
|
struct drive *This = impl_from_IDrive(iface);
|
||||||
FIXME("(%p)->(%p): stub\n", This, fs);
|
WCHAR nameW[MAX_PATH+1];
|
||||||
return E_NOTIMPL;
|
BOOL ret;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, fs);
|
||||||
|
|
||||||
|
if (!fs)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
*fs = NULL;
|
||||||
|
ret = GetVolumeInformationW(This->root, NULL, 0, NULL, NULL, NULL, nameW, sizeof(nameW)/sizeof(WCHAR));
|
||||||
|
if (ret)
|
||||||
|
*fs = SysAllocString(nameW);
|
||||||
|
return ret ? S_OK : E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI drive_get_SerialNumber(IDrive *iface, LONG *serial)
|
static HRESULT WINAPI drive_get_SerialNumber(IDrive *iface, LONG *serial)
|
||||||
|
|
|
@ -1798,6 +1798,7 @@ static void test_SerialNumber(void)
|
||||||
VARIANT var;
|
VARIANT var;
|
||||||
LONG serial;
|
LONG serial;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
BSTR name;
|
||||||
|
|
||||||
hr = IFileSystem3_get_Drives(fs3, &drives);
|
hr = IFileSystem3_get_Drives(fs3, &drives);
|
||||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
@ -1820,6 +1821,15 @@ static void test_SerialNumber(void)
|
||||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
ok(serial != 0xdeadbeef, "got %x\n", serial);
|
ok(serial != 0xdeadbeef, "got %x\n", serial);
|
||||||
|
|
||||||
|
hr = IDrive_get_FileSystem(drive, NULL);
|
||||||
|
ok(hr == E_POINTER, "got 0x%08x\n", hr);
|
||||||
|
|
||||||
|
name = NULL;
|
||||||
|
hr = IDrive_get_FileSystem(drive, &name);
|
||||||
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
ok(name != NULL, "got %p\n", name);
|
||||||
|
SysFreeString(name);
|
||||||
|
|
||||||
IDrive_Release(drive);
|
IDrive_Release(drive);
|
||||||
IEnumVARIANT_Release(iter);
|
IEnumVARIANT_Release(iter);
|
||||||
IDriveCollection_Release(drives);
|
IDriveCollection_Release(drives);
|
||||||
|
|
Loading…
Reference in New Issue