Changeset 16289 in vbox
- Timestamp:
- Jan 28, 2009 12:09:47 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Main/HostImpl.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r16261 r16289 2342 2342 tr ("The USB Proxy Service could not be started, because the USB file system (usbfs) is not available") 2343 2343 # endif 2344 );2345 #else 2344 ); 2345 #else /* !RT_OS_LINUX */ 2346 2346 return setWarning (E_FAIL, 2347 2347 tr ("The USB Proxy Service has not yet been ported to this host")); 2348 #endif 2348 #endif /* !RT_OS_LINUX */ 2349 2349 return setWarning (E_FAIL, 2350 2350 tr ("Could not load the Host USB Proxy service (%Rrc)"), … … 3319 3319 #endif /* VBOX_WITH_RESOURCE_USAGE_API */ 3320 3320 3321 STDMETHODIMP Host::FindHostNetworkInterfaceByName(IN_BSTR name, IHostNetworkInterface **networkInterface) 3322 { 3321 STDMETHODIMP Host::FindHostNetworkInterfaceByName(IN_BSTR name, IHostNetworkInterface **networkInterface) 3322 { 3323 3323 #ifndef VBOX_WITH_HOSTNETIF_API 3324 3324 return E_NOTIMPL; 3325 3325 #else 3326 if (!name) 3327 return E_INVALIDARG; 3328 if (!networkInterface) 3329 return E_POINTER; 3330 3331 *networkInterface = NULL; 3326 if (!name) 3327 return E_INVALIDARG; 3328 if (!networkInterface) 3329 return E_POINTER; 3330 3331 *networkInterface = NULL; 3332 3332 ComObjPtr <HostNetworkInterface> found; 3333 3333 std::list <ComObjPtr <HostNetworkInterface> > list; … … 3347 3347 } 3348 3348 3349 if (!found) 3350 return setError (E_INVALIDARG, HostNetworkInterface::tr ( 3351 "The host network interface with the given name could not be found")); 3352 3353 return found.queryInterfaceTo (networkInterface); 3349 if (!found) 3350 return setError (E_INVALIDARG, HostNetworkInterface::tr ( 3351 "The host network interface with the given name could not be found")); 3352 3353 return found.queryInterfaceTo (networkInterface); 3354 3354 #endif 3355 } 3356 3357 STDMETHODIMP Host::FindHostNetworkInterfaceById(IN_GUID id, IHostNetworkInterface **networkInterface) 3358 { 3355 } 3356 3357 STDMETHODIMP Host::FindHostNetworkInterfaceById(IN_GUID id, IHostNetworkInterface **networkInterface) 3358 { 3359 3359 #ifndef VBOX_WITH_HOSTNETIF_API 3360 3360 return E_NOTIMPL; 3361 3361 #else 3362 if (Guid(id).isEmpty()) 3363 return E_INVALIDARG; 3364 if (!networkInterface) 3365 return E_POINTER; 3366 3367 *networkInterface = NULL; 3362 if (Guid(id).isEmpty()) 3363 return E_INVALIDARG; 3364 if (!networkInterface) 3365 return E_POINTER; 3366 3367 *networkInterface = NULL; 3368 3368 ComObjPtr <HostNetworkInterface> found; 3369 3369 std::list <ComObjPtr <HostNetworkInterface> > list; … … 3376 3376 std::list <ComObjPtr <HostNetworkInterface> >::iterator it; 3377 3377 for (it = list.begin(); it != list.end(); ++it) 3378 { 3379 Guid g; 3380 (*it)->COMGETTER(Id) (g.asOutParam()); 3381 if (g == Guid(id)) 3382 found = *it; 3383 } 3384 3385 if (!found) 3386 return setError (E_INVALIDARG, HostNetworkInterface::tr ( 3387 "The host network interface with the given GUID could not be found")); 3388 3389 return found.queryInterfaceTo (networkInterface); 3378 { 3379 Guid g; 3380 (*it)->COMGETTER(Id) (g.asOutParam()); 3381 if (g == Guid(id)) 3382 found = *it; 3383 } 3384 3385 if (!found) 3386 return setError (E_INVALIDARG, HostNetworkInterface::tr ( 3387 "The host network interface with the given GUID could not be found")); 3388 3389 return found.queryInterfaceTo (networkInterface); 3390 3390 #endif 3391 } 3392 3391 } 3392 3393 3393 /* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note:
See TracChangeset
for help on using the changeset viewer.

