Changeset 15574 in vbox for trunk/src/VBox
- Timestamp:
- Dec 16, 2008 11:37:26 AM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r15556 r15574 3670 3670 { 3671 3671 /* not a valid UUID, search for it */ 3672 ComPtr<IHostNetworkInterfaceCollection> coll; 3673 CHECK_ERROR_BREAK(host, COMGETTER(NetworkInterfaces)(coll.asOutParam())); 3674 CHECK_ERROR_BREAK(coll, FindByName(Bstr(argv[0]), hostif.asOutParam())); 3672 Bstr strName(argv[0]); 3673 com::SafeIfaceArray <IHostNetworkInterface> hostNetworkInterfaces; 3674 CHECK_ERROR_BREAK(host, COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces))); 3675 ComPtr <IHostNetworkInterface> hostif; 3676 for (size_t i = 0; i < hostNetworkInterfaces.size(); ++i) 3677 { 3678 Bstr name; 3679 hostNetworkInterfaces[i]->COMGETTER(Name) (name.asOutParam()); 3680 if (name == strName) 3681 { 3682 hostif = hostNetworkInterfaces[i]; 3683 break; 3684 } 3685 } 3686 if (hostif.isNull()) 3687 { 3688 rc = E_INVALIDARG; 3689 break; 3690 } 3675 3691 CHECK_ERROR_BREAK(hostif, COMGETTER(Id)(uuid.asOutParam())); 3676 3692 } -
trunk/src/VBox/Main/ConsoleImpl.cpp
r15570 r15574 4299 4299 virtualBox->COMGETTER(Host)(host.asOutParam()); 4300 4300 com::SafeIfaceArray <IHostNetworkInterface> hostNetworkInterfaces; 4301 CHECK_ERROR(host, 4302 COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces))); 4301 host->COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces)); 4303 4302 bool found = false; 4304 4303 for (size_t i = 0; i < hostNetworkInterfaces.size(); ++i) 4305 4304 { 4306 4305 Bstr name; 4307 hostNetworkInterfaces[i] .COMGETTER(Name) (name.asOutParam());4306 hostNetworkInterfaces[i]->COMGETTER(Name) (name.asOutParam()); 4308 4307 if (name == hostif) 4309 4308 { -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r15570 r15574 1313 1313 # elif defined(RT_OS_WINDOWS) 1314 1314 com::SafeIfaceArray <IHostNetworkInterface> hostNetworkInterfaces; 1315 hrc = host->COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces)) );1315 hrc = host->COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces)); 1316 1316 if(FAILED(hrc)) 1317 1317 { … … 1323 1323 { 1324 1324 Bstr name; 1325 hostNetworkInterfaces[i] .COMGETTER(Name) (name.asOutParam());1326 if (name == hostif)1325 hostNetworkInterfaces[i]->COMGETTER(Name) (name.asOutParam()); 1326 if (name == HifName) 1327 1327 { 1328 1328 hostInterface = hostNetworkInterfaces[i]; … … 1330 1330 } 1331 1331 } 1332 if (hostInterface. IsNull())1332 if (hostInterface.isNull()) 1333 1333 { 1334 1334 AssertBreakpoint(); … … 1521 1521 } 1522 1522 } 1523 if (hostInterface. IsNull())1523 if (hostInterface.isNull()) 1524 1524 { 1525 1525 AssertMsgFailed(("Cannot get GUID for host interface '%ls'\n", hostInterfaceName)); -
trunk/src/VBox/Main/HostImpl.cpp
r15570 r15574 1378 1378 { 1379 1379 com::SafeIfaceArray <IHostNetworkInterface> hostNetworkInterfaces; 1380 rc = host->COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces)));1380 rc = COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces)); 1381 1381 CheckComRCReturnRC (rc); 1382 1382 for (size_t i = 0; i < hostNetworkInterfaces.size(); ++i) 1383 1383 { 1384 1384 Bstr name; 1385 hostNetworkInterfaces[i] .COMGETTER(Name) (name.asOutParam());1385 hostNetworkInterfaces[i]->COMGETTER(Name) (name.asOutParam()); 1386 1386 if (name == aName) 1387 1387 { … … 1446 1446 { 1447 1447 com::SafeIfaceArray <IHostNetworkInterface> hostNetworkInterfaces; 1448 rc = host->COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces)));1448 rc = COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces)); 1449 1449 CheckComRCReturnRC (rc); 1450 1450 ComPtr <IHostNetworkInterface> iface; … … 1452 1452 { 1453 1453 Guid guid; 1454 hostNetworkInterfaces[i] .COMGETTER(Id) (guid.asOutParam());1454 hostNetworkInterfaces[i]->COMGETTER(Id) (guid.asOutParam()); 1455 1455 if (guid == aId) 1456 1456 { … … 1459 1459 } 1460 1460 } 1461 if (iface. IsNull())1461 if (iface.isNull()) 1462 1462 return setError (VBOX_E_OBJECT_NOT_FOUND, 1463 1463 tr ("Host network interface with UUID {%RTuuid} does not exist"),
Note:
See TracChangeset
for help on using the changeset viewer.