Commit 9631a526 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemprox: Implement Win32_DesktopMonitor.Name.

parent b1c748c8
...@@ -557,6 +557,7 @@ static const struct column col_datafile[] = ...@@ -557,6 +557,7 @@ static const struct column col_datafile[] =
}; };
static const struct column col_desktopmonitor[] = static const struct column col_desktopmonitor[] =
{ {
{ prop_nameW, CIM_STRING },
{ prop_pixelsperxlogicalinchW, CIM_UINT32 } { prop_pixelsperxlogicalinchW, CIM_UINT32 }
}; };
static const struct column col_directory[] = static const struct column col_directory[] =
...@@ -1041,6 +1042,7 @@ struct record_datafile ...@@ -1041,6 +1042,7 @@ struct record_datafile
}; };
struct record_desktopmonitor struct record_desktopmonitor
{ {
const WCHAR *name;
UINT32 pixelsperxlogicalinch; UINT32 pixelsperxlogicalinch;
}; };
struct record_directory struct record_directory
...@@ -2490,6 +2492,7 @@ static enum fill_status fill_desktopmonitor( struct table *table, const struct e ...@@ -2490,6 +2492,7 @@ static enum fill_status fill_desktopmonitor( struct table *table, const struct e
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
rec = (struct record_desktopmonitor *)table->data; rec = (struct record_desktopmonitor *)table->data;
rec->name = L"Generic Non-PnP Monitor";
rec->pixelsperxlogicalinch = get_pixelsperxlogicalinch(); rec->pixelsperxlogicalinch = get_pixelsperxlogicalinch();
if (match_row( table, row, cond, &status )) row++; if (match_row( table, row, cond, &status )) row++;
......
...@@ -1712,6 +1712,32 @@ static void test_Win32_WinSAT( IWbemServices *services ) ...@@ -1712,6 +1712,32 @@ static void test_Win32_WinSAT( IWbemServices *services )
SysFreeString( wql ); SysFreeString( wql );
} }
static void test_Win32_DesktopMonitor( IWbemServices *services )
{
BSTR wql = SysAllocString( wqlW ), query = SysAllocString( L"SELECT * FROM Win32_DesktopMonitor" );
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"Name", VT_BSTR, CIM_STRING );
check_property( obj, L"PixelsPerXlogicalInch", VT_I4, CIM_UINT32 );
IWbemClassObject_Release( obj );
}
IEnumWbemClassObject_Release( result );
SysFreeString( query );
SysFreeString( wql );
}
static void test_Win32_DisplayControllerConfiguration( IWbemServices *services ) static void test_Win32_DisplayControllerConfiguration( IWbemServices *services )
{ {
static const WCHAR bitsperpixelW[] = static const WCHAR bitsperpixelW[] =
...@@ -1837,6 +1863,7 @@ START_TEST(query) ...@@ -1837,6 +1863,7 @@ START_TEST(query)
test_Win32_ComputerSystem( services ); test_Win32_ComputerSystem( services );
test_Win32_ComputerSystemProduct( services ); test_Win32_ComputerSystemProduct( services );
test_Win32_Bios( services ); test_Win32_Bios( services );
test_Win32_DesktopMonitor( services );
test_Win32_DisplayControllerConfiguration( services ); test_Win32_DisplayControllerConfiguration( services );
test_Win32_IP4RouteTable( services ); test_Win32_IP4RouteTable( services );
test_Win32_OperatingSystem( 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