IVMVirtualNetwork::HostAdapter property
[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]
Retrieves the name of the adapter to which the virtual network is connected.
This property is read-only.
Syntax
HRESULT get_HostAdapter(
[out, retval] BSTR *hostAdapter
);
Property value
The name of the host adapter to which the virtual network is connected.
Error codes
Name/value | Meaning |
---|---|
|
The operation was successful. |
|
The parameter is NULL. |
|
The host Ethernet adapter to which this virtual network was connected is no longer available. The host Ethernet adapter may have been removed or disabled. |
|
An unexpected error has occurred. |
Remarks
The virtual network adapter allows a virtual network to talk to external networks. There is normally one adapter per Ethernet adapter installed in the host machine. For example, let's say a host machine had an adapter labeled "10/100 ENET". To connect a virtual NIC to the network attached to "10/100 ENET", set the virtual network's Network HostAdapter property to "10/100 ENET" and connect the virtual NIC to this virtual network.
If the HostAdapter property is set to an empty string (""), the virtual NIC adapter is connected to the "Internal Network" or "Shared Networking (NAT)" network. Virtual NICs attached to the "Internal Network" network will have no access to external networks on the system host. However, the virtual NICs attached to this virtual network are still able to communicate with each other.
The complete list of adapters can be accessed through the IVMHostInfo::NetworkAdapters property.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
None supported |
End of client support |
Windows 7 |
Product |
Windows Virtual PC |
Header |
|
IID |
IID_IVMVirtualNetwork is defined as 431cb7a1-2469-4563-b94e-38b987adca63 |