Commit d68ea162 authored by Louis Lenders's avatar Louis Lenders Committed by Alexandre Julliard

wbemprox: Add empty DNSDomain to Win32_NetworkAdapterConfiguration.

parent d8f26a42
......@@ -215,6 +215,7 @@ static const struct column col_networkadapterconfig[] =
{ L"DefaultIPGateway", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
{ L"Description", CIM_STRING|COL_FLAG_DYNAMIC },
{ L"DHCPEnabled", CIM_BOOLEAN },
{ L"DNSDomain", CIM_STRING },
{ L"DNSHostName", CIM_STRING|COL_FLAG_DYNAMIC },
{ L"DNSServerSearchOrder", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
{ L"Index", CIM_UINT32|COL_FLAG_KEY },
......@@ -632,6 +633,7 @@ struct record_networkadapterconfig
const struct array *defaultipgateway;
const WCHAR *description;
int dhcpenabled;
const WCHAR *dnsdomain;
const WCHAR *dnshostname;
const struct array *dnsserversearchorder;
UINT32 index;
......@@ -2989,6 +2991,7 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
rec->defaultipgateway = get_defaultipgateway( aa->FirstGatewayAddress );
rec->description = heap_strdupW( aa->Description );
rec->dhcpenabled = -1;
rec->dnsdomain = L"";
rec->dnshostname = get_dnshostname( aa->FirstUnicastAddress );
rec->dnsserversearchorder = get_dnsserversearchorder( aa->FirstDnsServerAddress );
rec->index = aa->u.s.IfIndex;
......
......@@ -1331,8 +1331,10 @@ static void test_Win32_NetworkAdapterConfiguration( IWbemServices *services )
BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_NetworkAdapterConfiguration" );
IEnumWbemClassObject *result;
IWbemClassObject *obj;
CIMTYPE type;
HRESULT hr;
DWORD count;
VARIANT val;
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
ok( hr == S_OK, "got %08x\n", hr );
......@@ -1345,6 +1347,16 @@ static void test_Win32_NetworkAdapterConfiguration( IWbemServices *services )
check_property( obj, L"Description", VT_BSTR, CIM_STRING );
check_property( obj, L"Index", VT_I4, CIM_UINT32 );
check_property( obj, L"IPEnabled", VT_BOOL, CIM_BOOLEAN );
type = 0xdeadbeef;
VariantInit( &val );
hr = IWbemClassObject_Get( obj, L"DNSDomain", 0, &val, &type, NULL );
ok( hr == S_OK, "got %08x\n", hr );
ok( V_VT( &val ) == VT_BSTR || V_VT( &val ) == VT_NULL, "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
trace( "DNSDomain %s\n", wine_dbgstr_w(V_BSTR( &val )) );
VariantClear( &val );
IWbemClassObject_Release( obj );
}
......
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