My virtualbox version is: 5.2.18 r124319 (Qt5.6.2), also the latest release version.
There are some network interface device on my computer, and I tried to obtain them by these ways:
1> Use 'ipconfig /all' command
Code: Select all
C:\Users\*****>ipconfig /all
Windows IP 配置
主机名 . . . . . . . . . . . . . : *****
主 DNS 后缀 . . . . . . . . . . . :
节点类型 . . . . . . . . . . . . : 混合
IP 路由已启用 . . . . . . . . . . : 否
WINS 代理已启用 . . . . . . . . . : 否
DNS 后缀搜索列表 . . . . . . . . : lan
以太网适配器 VirtualBox Host-Only Network:
连接特定的 DNS 后缀 . . . . . . . :
描述. . . . . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
物理地址. . . . . . . . . . . . . : *****(MAC Address)
DHCP 已启用 . . . . . . . . . . . : 否
自动配置已启用. . . . . . . . . . : 是
本地链接 IPv6 地址. . . . . . . . : xxxx::xxxx:xxxx:xxxx:xxxx%23(首选)
IPv4 地址 . . . . . . . . . . . . : *****
子网掩码 . . . . . . . . . . . . : *****(Net Mask)
默认网关. . . . . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : *****
DHCPv6 客户端 DUID . . . . . . . : *****
DNS 服务器 . . . . . . . . . . . : *****
TCPIP 上的 NetBIOS . . . . . . . : 已启用
无线局域网适配器 本地连接* 1:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . :
描述. . . . . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
物理地址. . . . . . . . . . . . . : *****(MAC Address)
DHCP 已启用 . . . . . . . . . . . : 是
自动配置已启用. . . . . . . . . . : 是
无线局域网适配器 本地连接* 3:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . :
描述. . . . . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2
物理地址. . . . . . . . . . . . . : *****(MAC Address)
DHCP 已启用 . . . . . . . . . . . : 是
自动配置已启用. . . . . . . . . . : 是
无线局域网适配器 WLAN:
连接特定的 DNS 后缀 . . . . . . . : lan
描述. . . . . . . . . . . . . . . : Marvell AVASTAR Wireless-AC Network Controller
物理地址. . . . . . . . . . . . . : *****(MAC Address)
DHCP 已启用 . . . . . . . . . . . : 是
自动配置已启用. . . . . . . . . . : 是
IPv6 地址 . . . . . . . . . . . . : *****
获得租约的时间 . . . . . . . . . : 2018年9月14日 08:35:53
租约过期的时间 . . . . . . . . . : 2154年10月21日 15:34:47
IPv6 地址 . . . . . . . . . . . . : *****
临时 IPv6 地址. . . . . . . . . . : *****
本地链接 IPv6 地址. . . . . . . . : *****
IPv4 地址 . . . . . . . . . . . . : *****
子网掩码 . . . . . . . . . . . . : *****
获得租约的时间 . . . . . . . . . : 2018年9月14日 08:35:52
租约过期的时间 . . . . . . . . . : 2018年9月14日 20:35:51
默认网关. . . . . . . . . . . . . : *****
DHCP 服务器 . . . . . . . . . . . : *****
DHCPv6 IAID . . . . . . . . . . . : *****
DHCPv6 客户端 DUID . . . . . . . : *****
DNS 服务器 . . . . . . . . . . . : *****
TCPIP 上的 NetBIOS . . . . . . . : 已启用
连接特定的 DNS 后缀搜索列表:
lan
以太网适配器 蓝牙网络连接:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . :
描述. . . . . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
物理地址. . . . . . . . . . . . . : *****(MAC Address)
DHCP 已启用 . . . . . . . . . . . : 是
自动配置已启用. . . . . . . . . . : 是
C:\Users\*****>
2> Use windows api to list them, by programing
the example code from microsoft: ZG9jcy5taWNyb3NvZnQuY29tL3poLWNuL3dpbmRvd3MvZGVza3RvcC9hcGkvaXBobHBhcGkvbmYtaXBobHBhcGktZ2V0YWRhcHRlcnNhZGRyZXNzZXM= (Base64 decode it)
Just copy and compile it, the output after execution :
Code: Select all
C:\Users\*****\Desktop>GetAtapteresTest.exe 4
Calling GetAdaptersAddresses function with family = AF_INET
Length of the IP_ADAPTER_ADDRESS struct: 376
IfIndex (IPv4 interface): 23
Adapter name: {*****}
Number of Unicast Addresses: 1
No Anycast Addresses
Number of Multicast Addresses: 4
No DNS Server Addresses
DNS Suffix:
Description: VirtualBox Host-Only Ethernet Adapter
Friendly name: VirtualBox Host-Only Network
Physical address: *****
Flags: 449
Mtu: 1500
IfType: 6
OperStatus: 1
Ipv6IfIndex (IPv6 interface): 23
ZoneIndices (hex): *****
Transmit link speed: 1000000000
Receive link speed: 1000000000
Number of IP Adapter Prefix entries: 5
Length of the IP_ADAPTER_ADDRESS struct: 376
IfIndex (IPv4 interface): 20
Adapter name: {*****}
Number of Unicast Addresses: 1
No Anycast Addresses
Number of Multicast Addresses: 1
No DNS Server Addresses
DNS Suffix:
Description: Microsoft Wi-Fi Direct Virtual Adapter
Friendly name:
Physical address: *****
Flags: 453
Mtu: 1500
IfType: 71
OperStatus: 2
Ipv6IfIndex (IPv6 interface): 20
ZoneIndices (hex): *****
Transmit link speed: 18446744073709551615
Receive link speed: 18446744073709551615
Number of IP Adapter Prefix entries: 2
Length of the IP_ADAPTER_ADDRESS struct: 376
IfIndex (IPv4 interface): 19
Adapter name: {*****}
Number of Unicast Addresses: 1
No Anycast Addresses
Number of Multicast Addresses: 1
No DNS Server Addresses
DNS Suffix:
Description: Microsoft Wi-Fi Direct Virtual Adapter #2
Friendly name:
Physical address: *****
Flags: 453
Mtu: 1500
IfType: 71
OperStatus: 2
Ipv6IfIndex (IPv6 interface): 19
ZoneIndices (hex): *****
Transmit link speed: 18446744073709551615
Receive link speed: 18446744073709551615
Number of IP Adapter Prefix entries: 2
Length of the IP_ADAPTER_ADDRESS struct: 376
IfIndex (IPv4 interface): 18
Adapter name: {*****}
Number of Unicast Addresses: 1
No Anycast Addresses
Number of Multicast Addresses: 4
Number of DNS Server Addresses: 1
DNS Suffix: lan
Description: Marvell AVASTAR Wireless-AC Network Controller
Friendly name: WLAN
Physical address: *****
Flags: 997
Mtu: 1500
IfType: 71
OperStatus: 1
Ipv6IfIndex (IPv6 interface): 18
ZoneIndices (hex): *****
Transmit link speed: 72000000
Receive link speed: 72000000
Number of IP Adapter Prefix entries: 5
Length of the IP_ADAPTER_ADDRESS struct: 376
IfIndex (IPv4 interface): 3
Adapter name: {*****}
Number of Unicast Addresses: 1
No Anycast Addresses
Number of Multicast Addresses: 1
No DNS Server Addresses
DNS Suffix:
Description: Bluetooth Device (Personal Area Network)
Friendly name:
Physical address: *****
Flags: 453
Mtu: 1500
IfType: 6
OperStatus: 2
Ipv6IfIndex (IPv6 interface): 3
ZoneIndices (hex): *****
Transmit link speed: 3000000
Receive link speed: 3000000
Number of IP Adapter Prefix entries: 2
Length of the IP_ADAPTER_ADDRESS struct: 376
IfIndex (IPv4 interface): 1
Adapter name: {*****}
Number of Unicast Addresses: 1
No Anycast Addresses
Number of Multicast Addresses: 1
No DNS Server Addresses
DNS Suffix:
Description: Software Loopback Interface 1
Friendly name: Loopback Pseudo-Interface 1
Flags: 384
Mtu: 4294967295
IfType: 24
OperStatus: 1
Ipv6IfIndex (IPv6 interface): 1
ZoneIndices (hex): *****
Transmit link speed: 1073741824
Receive link speed: 1073741824
Number of IP Adapter Prefix entries: 5
C:\Users\*****\Desktop>
- VirtualBox Host-Only Ethernet Adapter
Microsoft Wi-Fi Direct Virtual Adapter
Microsoft Wi-Fi Direct Virtual Adapter #2
Marvell AVASTAR Wireless-AC Network Controller
Bluetooth Device (Personal Area Network)
Software Loopback Interface 1
I knew something make wrong, it listed the interfaces which does not exist,
I run 'VBoxManage.exe list bridgedifs' command, the output like this:
Code: Select all
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list bridgedifs
Name: Marvell AVASTAR Wireless-AC Network Controller
GUID: *****
DHCP: Enabled
IPAddress: *****
NetworkMask: *****
IPV6Address: *****
IPV6NetworkMaskPrefixLength: 128
HardwareAddress: *****
MediumType: Ethernet
Wireless: Yes
Status: Up
VBoxNetworkName: HostInterfaceNetworking-Marvell AVASTAR Wireless-AC Network Controller
Name: ASIX AX88772B USB2.0 to Fast Ethernet Adapter
GUID: *****
DHCP: Disabled
IPAddress: *****
NetworkMask: *****
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: *****
MediumType: Ethernet
Wireless: No
Status: Down
VBoxNetworkName: HostInterfaceNetworking-ASIX AX88772B USB2.0 to Fast Ethernet Adapter
Name: ASIX AX88772B USB2.0 to Fast Ethernet Adapter #2
GUID: *****
DHCP: Disabled
IPAddress: *****
NetworkMask: *****
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: *****
MediumType: Ethernet
Wireless: No
Status: Down
VBoxNetworkName: HostInterfaceNetworking-ASIX AX88772B USB2.0 to Fast Ethernet Adapter #2
C:\Program Files\Oracle\VirtualBox>
The log of my "VBoxSvc.log":
Code: Select all
00:00:22.504514 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:00:22.504514 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:00:22.535755 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:00:22.535755 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:00:42.059407 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:00:42.059407 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:00:42.106333 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:00:42.106333 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:01:38.150024 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:01:38.150024 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:01:38.196436 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring
00:01:38.197433 netIfIsWireless: CreateFile on '\\.\{GUID********}' failed with rcWin=2 (0x2) - ignoring