wbemprox: Implement Win32_NetworkAdapter.ServiceName.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50256
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4c5dee872b
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
feed1f0efb
commit
74d58e6e27
|
@ -206,6 +206,7 @@ static const struct column col_networkadapter[] =
|
||||||
{ L"NetConnectionStatus", CIM_UINT16 },
|
{ L"NetConnectionStatus", CIM_UINT16 },
|
||||||
{ L"PhysicalAdapter", CIM_BOOLEAN },
|
{ L"PhysicalAdapter", CIM_BOOLEAN },
|
||||||
{ L"PNPDeviceID", CIM_STRING },
|
{ L"PNPDeviceID", CIM_STRING },
|
||||||
|
{ L"ServiceName", CIM_STRING|COL_FLAG_DYNAMIC },
|
||||||
{ L"Speed", CIM_UINT64 },
|
{ L"Speed", CIM_UINT64 },
|
||||||
};
|
};
|
||||||
static const struct column col_networkadapterconfig[] =
|
static const struct column col_networkadapterconfig[] =
|
||||||
|
@ -613,6 +614,7 @@ struct record_networkadapter
|
||||||
UINT16 netconnection_status;
|
UINT16 netconnection_status;
|
||||||
int physicaladapter;
|
int physicaladapter;
|
||||||
const WCHAR *pnpdevice_id;
|
const WCHAR *pnpdevice_id;
|
||||||
|
const WCHAR *servicename;
|
||||||
UINT64 speed;
|
UINT64 speed;
|
||||||
};
|
};
|
||||||
struct record_networkadapterconfig
|
struct record_networkadapterconfig
|
||||||
|
@ -2718,6 +2720,7 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
|
||||||
rec->netconnection_status = get_connection_status( aa->OperStatus );
|
rec->netconnection_status = get_connection_status( aa->OperStatus );
|
||||||
rec->physicaladapter = physical;
|
rec->physicaladapter = physical;
|
||||||
rec->pnpdevice_id = L"PCI\\VEN_8086&DEV_100E&SUBSYS_001E8086&REV_02\\3&267A616A&1&18";
|
rec->pnpdevice_id = L"PCI\\VEN_8086&DEV_100E&SUBSYS_001E8086&REV_02\\3&267A616A&1&18";
|
||||||
|
rec->servicename = heap_strdupW( aa->FriendlyName );
|
||||||
rec->speed = 1000000;
|
rec->speed = 1000000;
|
||||||
if (!match_row( table, row, cond, &status ))
|
if (!match_row( table, row, cond, &status ))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1160,12 +1160,26 @@ static void test_Win32_NetworkAdapter( IWbemServices *services )
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
VARIANT val;
|
||||||
|
CIMTYPE type;
|
||||||
|
|
||||||
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
|
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
|
||||||
if (hr != S_OK) break;
|
if (hr != S_OK) break;
|
||||||
|
|
||||||
|
check_property( obj, L"Description", VT_BSTR, CIM_STRING );
|
||||||
check_property( obj, L"DeviceID", VT_BSTR, CIM_STRING );
|
check_property( obj, L"DeviceID", 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"Name", VT_BSTR, CIM_STRING );
|
check_property( obj, L"Name", VT_BSTR, CIM_STRING );
|
||||||
|
|
||||||
|
type = 0xdeadbeef;
|
||||||
|
VariantInit( &val );
|
||||||
|
hr = IWbemClassObject_Get( obj, L"ServiceName", 0, &val, &type, NULL );
|
||||||
|
ok( hr == S_OK, "failed to get service name %08x\n", hr );
|
||||||
|
ok( V_VT( &val ) == VT_BSTR || broken(V_VT( &val ) == VT_NULL) /* win2k8 */,
|
||||||
|
"unexpected variant type 0x%x\n", V_VT( &val ) );
|
||||||
|
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
|
||||||
|
VariantClear( &val );
|
||||||
|
|
||||||
IWbemClassObject_Release( obj );
|
IWbemClassObject_Release( obj );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue