Commit 14905720 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemprox: Implement Win32_LogicalDisk.Caption.

parent cae84e2b
......@@ -177,6 +177,7 @@ static const struct column col_ip4routetable[] =
};
static const struct column col_logicaldisk[] =
{
{ L"Caption", CIM_STRING|COL_FLAG_DYNAMIC },
{ L"DeviceId", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
{ L"DriveType", CIM_UINT32 },
{ L"FileSystem", CIM_STRING|COL_FLAG_DYNAMIC },
......@@ -585,6 +586,7 @@ struct record_ip4routetable
};
struct record_logicaldisk
{
const WCHAR *caption;
const WCHAR *device_id;
UINT32 drivetype;
const WCHAR *filesystem;
......@@ -2501,6 +2503,7 @@ static enum fill_status fill_logicaldisk( struct table *table, const struct expr
rec = (struct record_logicaldisk *)(table->data + offset);
swprintf( device_id, ARRAY_SIZE( device_id ), L"%c:", 'A' + i );
rec->caption = heap_strdupW( device_id );
rec->device_id = heap_strdupW( device_id );
rec->drivetype = type;
rec->filesystem = get_filesystem( root );
......
......@@ -1905,6 +1905,33 @@ static void test_SystemRestore( IWbemServices *services )
SysFreeString( class );
}
static void test_Win32_LogicalDisk( IWbemServices *services )
{
BSTR wql = SysAllocString( L"wql" );
BSTR query = SysAllocString( L"SELECT * FROM Win32_LogicalDisk" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
HRESULT hr;
DWORD count;
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
ok( hr == S_OK, "got %08x\n", hr );
for (;;)
{
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
if (hr != S_OK) break;
check_property( obj, L"Caption", VT_BSTR, CIM_STRING );
check_property( obj, L"Name", VT_BSTR, CIM_STRING );
IWbemClassObject_Release( obj );
}
IEnumWbemClassObject_Release( result );
SysFreeString( query );
SysFreeString( wql );
}
START_TEST(query)
{
BSTR path = SysAllocString( L"ROOT\\CIMV2" );
......@@ -1955,6 +1982,7 @@ START_TEST(query)
test_Win32_DiskDrive( services );
test_Win32_DisplayControllerConfiguration( services );
test_Win32_IP4RouteTable( services );
test_Win32_LogicalDisk( services );
test_Win32_NetworkAdapter( services );
test_Win32_NetworkAdapterConfiguration( services );
test_Win32_OperatingSystem( services );
......
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