wbemprox: Add empty DNSDomain to Win32_NetworkAdapterConfiguration.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51938 Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d8f26a4233
commit
d68ea16266
|
@ -215,6 +215,7 @@ static const struct column col_networkadapterconfig[] =
|
||||||
{ L"DefaultIPGateway", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
|
{ L"DefaultIPGateway", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
|
||||||
{ L"Description", CIM_STRING|COL_FLAG_DYNAMIC },
|
{ L"Description", CIM_STRING|COL_FLAG_DYNAMIC },
|
||||||
{ L"DHCPEnabled", CIM_BOOLEAN },
|
{ L"DHCPEnabled", CIM_BOOLEAN },
|
||||||
|
{ L"DNSDomain", CIM_STRING },
|
||||||
{ L"DNSHostName", CIM_STRING|COL_FLAG_DYNAMIC },
|
{ L"DNSHostName", CIM_STRING|COL_FLAG_DYNAMIC },
|
||||||
{ L"DNSServerSearchOrder", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
|
{ L"DNSServerSearchOrder", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
|
||||||
{ L"Index", CIM_UINT32|COL_FLAG_KEY },
|
{ L"Index", CIM_UINT32|COL_FLAG_KEY },
|
||||||
|
@ -632,6 +633,7 @@ struct record_networkadapterconfig
|
||||||
const struct array *defaultipgateway;
|
const struct array *defaultipgateway;
|
||||||
const WCHAR *description;
|
const WCHAR *description;
|
||||||
int dhcpenabled;
|
int dhcpenabled;
|
||||||
|
const WCHAR *dnsdomain;
|
||||||
const WCHAR *dnshostname;
|
const WCHAR *dnshostname;
|
||||||
const struct array *dnsserversearchorder;
|
const struct array *dnsserversearchorder;
|
||||||
UINT32 index;
|
UINT32 index;
|
||||||
|
@ -2989,6 +2991,7 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
|
||||||
rec->defaultipgateway = get_defaultipgateway( aa->FirstGatewayAddress );
|
rec->defaultipgateway = get_defaultipgateway( aa->FirstGatewayAddress );
|
||||||
rec->description = heap_strdupW( aa->Description );
|
rec->description = heap_strdupW( aa->Description );
|
||||||
rec->dhcpenabled = -1;
|
rec->dhcpenabled = -1;
|
||||||
|
rec->dnsdomain = L"";
|
||||||
rec->dnshostname = get_dnshostname( aa->FirstUnicastAddress );
|
rec->dnshostname = get_dnshostname( aa->FirstUnicastAddress );
|
||||||
rec->dnsserversearchorder = get_dnsserversearchorder( aa->FirstDnsServerAddress );
|
rec->dnsserversearchorder = get_dnsserversearchorder( aa->FirstDnsServerAddress );
|
||||||
rec->index = aa->u.s.IfIndex;
|
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" );
|
BSTR wql = SysAllocString( L"wql" ), query = SysAllocString( L"SELECT * FROM Win32_NetworkAdapterConfiguration" );
|
||||||
IEnumWbemClassObject *result;
|
IEnumWbemClassObject *result;
|
||||||
IWbemClassObject *obj;
|
IWbemClassObject *obj;
|
||||||
|
CIMTYPE type;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
DWORD count;
|
DWORD count;
|
||||||
|
VARIANT val;
|
||||||
|
|
||||||
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
|
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
|
||||||
ok( hr == S_OK, "got %08x\n", hr );
|
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"Description", VT_BSTR, CIM_STRING );
|
||||||
check_property( obj, L"Index", VT_I4, CIM_UINT32 );
|
check_property( obj, L"Index", VT_I4, CIM_UINT32 );
|
||||||
check_property( obj, L"IPEnabled", VT_BOOL, CIM_BOOLEAN );
|
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 );
|
IWbemClassObject_Release( obj );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue