wbemprox: Implement Win32_DesktopMonitor.Name.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48646
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9631a526cf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
stable
Hans Leidekker 2020-02-25 11:39:52 +01:00 committed by Michael Stefaniuc
parent 6961e627c1
commit 6fc30a3235
2 changed files with 30 additions and 0 deletions

View File

@ -543,6 +543,7 @@ static const struct column col_datafile[] =
};
static const struct column col_desktopmonitor[] =
{
{ prop_nameW, CIM_STRING },
{ prop_pixelsperxlogicalinchW, CIM_UINT32 }
};
static const struct column col_directory[] =
@ -1022,6 +1023,7 @@ struct record_datafile
};
struct record_desktopmonitor
{
const WCHAR *name;
UINT32 pixelsperxlogicalinch;
};
struct record_directory
@ -2413,6 +2415,7 @@ static enum fill_status fill_desktopmonitor( struct table *table, const struct e
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
rec = (struct record_desktopmonitor *)table->data;
rec->name = L"Generic Non-PnP Monitor";
rec->pixelsperxlogicalinch = get_pixelsperxlogicalinch();
if (match_row( table, row, cond, &status )) row++;

View File

@ -1710,6 +1710,32 @@ static void test_Win32_WinSAT( IWbemServices *services )
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 const WCHAR bitsperpixelW[] =
@ -1835,6 +1861,7 @@ START_TEST(query)
test_Win32_ComputerSystem( services );
test_Win32_ComputerSystemProduct( services );
test_Win32_Bios( services );
test_Win32_DesktopMonitor( services );
test_Win32_DisplayControllerConfiguration( services );
test_Win32_IP4RouteTable( services );
test_Win32_OperatingSystem( services );