Changeset 32718 in vbox for trunk/src/VBox/Main/ConsoleImpl2.cpp
- Timestamp:
- Sep 23, 2010 12:57:52 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r32672 r32718 231 231 Bstr aFilePath, empty; 232 232 233 rc = vbox->CheckFirmwarePresent(aFirmwareType, empty ,233 rc = vbox->CheckFirmwarePresent(aFirmwareType, empty.raw(), 234 234 empty.asOutParam(), aFilePath.asOutParam(), &fPresent); 235 235 if (RT_FAILURE(rc)) … … 251 251 * The extra data takes precedence (if non-zero). 252 252 */ 253 HRESULT hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/SmcDeviceKey"), aKey); 253 HRESULT hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/SmcDeviceKey").raw(), 254 aKey); 254 255 if (FAILED(hrc)) 255 256 return Global::vboxStatusCodeFromCOM(hrc); … … 555 556 556 557 ComPtr<IGuestOSType> guestOSType; 557 hrc = virtualBox->GetGuestOSType(osTypeId , guestOSType.asOutParam());H();558 hrc = virtualBox->GetGuestOSType(osTypeId.raw(), guestOSType.asOutParam()); H(); 558 559 559 560 Bstr guestTypeFamilyId; … … 659 660 - With more than one virtual CPU, raw-mode isn't a fallback option. */ 660 661 fHwVirtExtForced = fHWVirtExEnabled 661 && ( cbRam > (_4G - cbRamHole)662 && ( cbRam + cbRamHole > _4G 662 663 || cCpus > 1); 663 664 # endif … … 1046 1047 Bstr logoImagePath; 1047 1048 hrc = biosSettings->COMGETTER(LogoImagePath)(logoImagePath.asOutParam()); H(); 1048 InsertConfigString(pCfg, "LogoFile", Utf8Str( logoImagePath? logoImagePath : "") );1049 InsertConfigString(pCfg, "LogoFile", Utf8Str(!logoImagePath.isEmpty() ? logoImagePath : "") ); 1049 1050 1050 1051 /* … … 1068 1069 char szExtraDataKey[sizeof("CustomVideoModeXX")]; 1069 1070 RTStrPrintf(szExtraDataKey, sizeof(szExtraDataKey), "CustomVideoMode%u", iMode); 1070 hrc = pMachine->GetExtraData(Bstr(szExtraDataKey) , bstr.asOutParam());H();1071 hrc = pMachine->GetExtraData(Bstr(szExtraDataKey).raw(), bstr.asOutParam()); H(); 1071 1072 if (bstr.isEmpty()) 1072 1073 break; … … 1189 1190 /* Get boot args */ 1190 1191 Bstr bootArgs; 1191 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiBootArgs") , bootArgs.asOutParam()); H();1192 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiBootArgs").raw(), bootArgs.asOutParam()); H(); 1192 1193 1193 1194 /* Get device props */ 1194 1195 Bstr deviceProps; 1195 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiDeviceProps") , deviceProps.asOutParam()); H();1196 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiDeviceProps").raw(), deviceProps.asOutParam()); H(); 1196 1197 /* Get GOP mode settings */ 1197 1198 uint32_t u32GopMode = UINT32_MAX; 1198 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiGopMode") , bstr.asOutParam()); H();1199 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiGopMode").raw(), bstr.asOutParam()); H(); 1199 1200 if (!bstr.isEmpty()) 1200 1201 u32GopMode = Utf8Str(bstr).toUInt32(); … … 1202 1203 /* UGA mode settings */ 1203 1204 uint32_t u32UgaHorisontal = 0; 1204 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiUgaHorizontalResolution") , bstr.asOutParam()); H();1205 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiUgaHorizontalResolution").raw(), bstr.asOutParam()); H(); 1205 1206 if (!bstr.isEmpty()) 1206 1207 u32UgaHorisontal = Utf8Str(bstr).toUInt32(); 1207 1208 1208 1209 uint32_t u32UgaVertical = 0; 1209 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiUgaVerticalResolution") , bstr.asOutParam()); H();1210 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiUgaVerticalResolution").raw(), bstr.asOutParam()); H(); 1210 1211 if (!bstr.isEmpty()) 1211 1212 u32UgaVertical = Utf8Str(bstr).toUInt32(); … … 1446 1447 /* Attach the media to the storage controllers. */ 1447 1448 com::SafeIfaceArray<IMediumAttachment> atts; 1448 hrc = pMachine->GetMediumAttachmentsOfController(controllerName ,1449 hrc = pMachine->GetMediumAttachmentsOfController(controllerName.raw(), 1449 1450 ComSafeArrayAsOutParam(atts)); H(); 1450 1451 … … 1452 1453 { 1453 1454 rc = pConsole->configMediumAttachment(pCtlInst, 1454 pszCtrlDev,1455 ulInstance,1456 enmBus,1457 fUseHostIOCache,1458 false /* fSetupMerge */,1459 0 /* uMergeSource */,1460 0 /* uMergeTarget */,1461 atts[j],1462 pConsole->mMachineState,1463 NULL /* phrc */,1464 false /* fAttachDetach */,1465 false /* fForceUnmount */,1466 pVM,1467 paLedDevType);1455 pszCtrlDev, 1456 ulInstance, 1457 enmBus, 1458 fUseHostIOCache, 1459 false /* fSetupMerge */, 1460 0 /* uMergeSource */, 1461 0 /* uMergeTarget */, 1462 atts[j], 1463 pConsole->mMachineState, 1464 NULL /* phrc */, 1465 false /* fAttachDetach */, 1466 false /* fForceUnmount */, 1467 pVM, 1468 paLedDevType); 1468 1469 if (RT_FAILURE(rc)) 1469 1470 return rc; … … 1609 1610 Bstr macAddr; 1610 1611 hrc = networkAdapter->COMGETTER(MACAddress)(macAddr.asOutParam()); H(); 1611 Assert( macAddr);1612 Assert(!macAddr.isEmpty()); 1612 1613 Utf8Str macAddrUtf8 = macAddr; 1613 1614 char *macStr = (char*)macAddrUtf8.c_str(); … … 1793 1794 hrc = pMachine->COMGETTER(HardwareVersion)(hwVersion.asOutParam()); H(); 1794 1795 InsertConfigInteger(pCfg, "RamSize", cbRam); 1795 if (hwVersion.compare(Bstr("1") ) == 0) /* <= 2.0.x */1796 if (hwVersion.compare(Bstr("1").raw()) == 0) /* <= 2.0.x */ 1796 1797 InsertConfigInteger(pCfg, "HeapEnabled", 0); 1797 1798 Bstr snapshotFolder; … … 2386 2387 if (i2 < cGlobalValues) 2387 2388 // this is still one of the global values: 2388 hrc = virtualBox->GetExtraData(Bstr(strKey), bstrExtraDataValue.asOutParam()); 2389 hrc = virtualBox->GetExtraData(Bstr(strKey).raw(), 2390 bstrExtraDataValue.asOutParam()); 2389 2391 else 2390 hrc = pMachine->GetExtraData(Bstr(strKey), bstrExtraDataValue.asOutParam()); 2392 hrc = pMachine->GetExtraData(Bstr(strKey).raw(), 2393 bstrExtraDataValue.asOutParam()); 2391 2394 if (FAILED(hrc)) 2392 2395 LogRel(("Warning: Cannot get extra data key %s, rc = %Rrc\n", strKey.c_str(), hrc)); … … 3864 3867 const char *pszHifName = HifNameUtf8.c_str(); 3865 3868 ComPtr<IHostNetworkInterface> hostInterface; 3866 rc = host->FindHostNetworkInterfaceByName(HifName, hostInterface.asOutParam()); 3869 rc = host->FindHostNetworkInterfaceByName(HifName.raw(), 3870 hostInterface.asOutParam()); 3867 3871 if (!SUCCEEDED(rc)) 3868 3872 { … … 4005 4009 Bstr tmpAddr, tmpMask; 4006 4010 4007 hrc = virtualBox->GetExtraData(BstrFmt("HostOnly/%s/IPAddress", pszHifName), tmpAddr.asOutParam()); 4011 hrc = virtualBox->GetExtraData(BstrFmt("HostOnly/%s/IPAddress", 4012 pszHifName).raw(), 4013 tmpAddr.asOutParam()); 4008 4014 if (SUCCEEDED(hrc) && !tmpAddr.isEmpty()) 4009 4015 { 4010 hrc = virtualBox->GetExtraData(BstrFmt("HostOnly/%s/IPNetMask", pszHifName), tmpMask.asOutParam()); 4016 hrc = virtualBox->GetExtraData(BstrFmt("HostOnly/%s/IPNetMask", 4017 pszHifName).raw(), 4018 tmpMask.asOutParam()); 4011 4019 if (SUCCEEDED(hrc) && !tmpMask.isEmpty()) 4012 hrc = hostInterface->EnableStaticIpConfig(tmpAddr, tmpMask); 4020 hrc = hostInterface->EnableStaticIpConfig(tmpAddr.raw(), 4021 tmpMask.raw()); 4013 4022 else 4014 hrc = hostInterface->EnableStaticIpConfig(tmpAddr ,4015 Bstr(VBOXNET_IPV4MASK_DEFAULT));4023 hrc = hostInterface->EnableStaticIpConfig(tmpAddr.raw(), 4024 Bstr(VBOXNET_IPV4MASK_DEFAULT).raw()); 4016 4025 } 4017 4026 else 4018 4027 { 4019 4028 /* Grab the IP number from the 'vboxnetX' instance number (see netif.h) */ 4020 hrc = hostInterface->EnableStaticIpConfig(getDefaultIPv4Address(Bstr(pszHifName)) ,4021 Bstr(VBOXNET_IPV4MASK_DEFAULT));4029 hrc = hostInterface->EnableStaticIpConfig(getDefaultIPv4Address(Bstr(pszHifName)).raw(), 4030 Bstr(VBOXNET_IPV4MASK_DEFAULT).raw()); 4022 4031 } 4023 4032 4024 4033 ComAssertComRC(hrc); /** @todo r=bird: Why this isn't fatal? (H()) */ 4025 4034 4026 hrc = virtualBox->GetExtraData(BstrFmt("HostOnly/%s/IPV6Address", pszHifName), tmpAddr.asOutParam()); 4035 hrc = virtualBox->GetExtraData(BstrFmt("HostOnly/%s/IPV6Address", 4036 pszHifName).raw(), 4037 tmpAddr.asOutParam()); 4027 4038 if (SUCCEEDED(hrc)) 4028 hrc = virtualBox->GetExtraData(BstrFmt("HostOnly/%s/IPV6NetMask", pszHifName), tmpMask.asOutParam()); 4039 hrc = virtualBox->GetExtraData(BstrFmt("HostOnly/%s/IPV6NetMask", pszHifName).raw(), 4040 tmpMask.asOutParam()); 4029 4041 if (SUCCEEDED(hrc) && !tmpAddr.isEmpty() && !tmpMask.isEmpty()) 4030 4042 { 4031 hrc = hostInterface->EnableStaticIpConfigV6(tmpAddr, Utf8Str(tmpMask).toUInt32()); 4043 hrc = hostInterface->EnableStaticIpConfigV6(tmpAddr.raw(), 4044 Utf8Str(tmpMask).toUInt32()); 4032 4045 ComAssertComRC(hrc); /** @todo r=bird: Why this isn't fatal? (H()) */ 4033 4046 } … … 4097 4110 */ 4098 4111 ComPtr<IDHCPServer> dhcpServer; 4099 hrc = virtualBox->FindDHCPServerByNetworkName(networkName, dhcpServer.asOutParam()); 4112 hrc = virtualBox->FindDHCPServerByNetworkName(networkName.raw(), 4113 dhcpServer.asOutParam()); 4100 4114 if (SUCCEEDED(hrc)) 4101 4115 { … … 4110 4124 4111 4125 if (fEnabled) 4112 hrc = dhcpServer->Start(networkName, trunkName, trunkType); 4126 hrc = dhcpServer->Start(networkName.raw(), 4127 trunkName.raw(), 4128 trunkType.raw()); 4113 4129 } 4114 4130 else
Note:
See TracChangeset
for help on using the changeset viewer.