diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 6bb26a9d17b..d5e935063ad 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -214,6 +214,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 }, @@ -623,6 +624,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; @@ -2942,6 +2944,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; diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index b2e2d815e2a..8d2ccc34efd 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -1203,8 +1203,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 ); @@ -1217,6 +1219,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 ); }