Changeset 26603 in vbox for trunk/src/VBox/Main/HostImpl.cpp
- Timestamp:
- Feb 17, 2010 12:24:34 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57796
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r26587 r26603 451 451 if(hr == S_OK) 452 452 { 453 Bstr name(lpszName); 453 size_t cUnicodeName = wcslen(lpszName) + 1; 454 size_t uniLen = (cUnicodeName * 2 + sizeof (OLECHAR) - 1) / sizeof (OLECHAR); 455 Bstr name (uniLen + 1 /* extra zero */); 456 wcscpy((wchar_t *) name.mutableRaw(), lpszName); 454 457 455 458 hr = pncc->GetInstanceGuid(&IfGuid); … … 461 464 iface.createObject(); 462 465 /* remove the curly bracket at the end */ 463 if (SUCCEEDED(iface->init (name, Guid (IfGuid), HostNetworkInterfaceType_Bridged)))466 if (SUCCEEDED(iface->init (name, Guid (IfGuid), HostNetworkInterfaceType_Bridged))) 464 467 { 465 468 // iface->setVirtualBox(m->pParent); … … 1287 1290 STDMETHODIMP Host::FindHostDVDDrive(IN_BSTR aName, IMedium **aDrive) 1288 1291 { 1289 CheckComArg StrNotEmptyOrNull(aName);1292 CheckComArgNotNull(aName); 1290 1293 CheckComArgOutPointerValid(aDrive); 1291 1294 … … 1314 1317 STDMETHODIMP Host::FindHostFloppyDrive(IN_BSTR aName, IMedium **aDrive) 1315 1318 { 1316 CheckComArg StrNotEmptyOrNull(aName);1319 CheckComArgNotNull(aName); 1317 1320 CheckComArgOutPointerValid(aDrive); 1318 1321 … … 1448 1451 { 1449 1452 #ifdef VBOX_WITH_USB 1450 CheckComArg StrNotEmptyOrNull(aAddress);1453 CheckComArgNotNull(aAddress); 1451 1454 CheckComArgOutPointerValid(aDevice); 1452 1455
Note:
See TracChangeset
for help on using the changeset viewer.