Changeset 15570 in vbox for trunk/src/VBox/Main/ConsoleImpl.cpp
- Timestamp:
- Dec 16, 2008 10:39:34 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r15448 r15570 4298 4298 ComPtr<IHost> host; 4299 4299 virtualBox->COMGETTER(Host)(host.asOutParam()); 4300 ComPtr<IHostNetworkInterfaceCollection> coll; 4301 host->COMGETTER(NetworkInterfaces)(coll.asOutParam()); 4302 ComPtr<IHostNetworkInterface> hostInterface; 4303 if (!SUCCEEDED(coll->FindByName(hostif, hostInterface.asOutParam()))) 4300 com::SafeIfaceArray <IHostNetworkInterface> hostNetworkInterfaces; 4301 CHECK_ERROR(host, 4302 COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces))); 4303 bool found = false; 4304 for (size_t i = 0; i < hostNetworkInterfaces.size(); ++i) 4305 { 4306 Bstr name; 4307 hostNetworkInterfaces[i].COMGETTER(Name) (name.asOutParam()); 4308 if (name == hostif) 4309 { 4310 found = true; 4311 break; 4312 } 4313 } 4314 if (!found) 4304 4315 { 4305 4316 return setError (VBOX_E_HOST_ERROR,
Note:
See TracChangeset
for help on using the changeset viewer.