Changeset 26553 in vbox for trunk/src/VBox/Main
- Timestamp:
- Feb 15, 2010 5:34:29 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57732
- Location:
- trunk/src/VBox/Main
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r26550 r26553 370 370 int i = 1; 371 371 /* @todo: Maybe too cost-intensive; try to find a lighter way */ 372 while (mVirtualBox->FindMachine(Bstr(tmpName) .raw(), &machine) != VBOX_E_OBJECT_NOT_FOUND)372 while (mVirtualBox->FindMachine(Bstr(tmpName), &machine) != VBOX_E_OBJECT_NOT_FOUND) 373 373 { 374 374 RTStrFree(tmpName); … … 391 391 /* @todo: Maybe too cost-intensive; try to find a lighter way */ 392 392 while (RTPathExists(tmpName) || 393 mVirtualBox->FindHardDisk(Bstr(tmpName) .raw(), &harddisk) != VBOX_E_OBJECT_NOT_FOUND)393 mVirtualBox->FindHardDisk(Bstr(tmpName), &harddisk) != VBOX_E_OBJECT_NOT_FOUND) 394 394 { 395 395 RTStrFree(tmpName); … … 501 501 } 502 502 503 HRESULT Appliance::setUpProgressFS(ComObjPtr<Progress> &pProgress, const Utf8Str &strDescription)503 HRESULT Appliance::setUpProgressFS(ComObjPtr<Progress> &pProgress, const Bstr &bstrDescription) 504 504 { 505 505 HRESULT rc; … … 532 532 533 533 rc = pProgress->init(mVirtualBox, static_cast<IAppliance*>(this), 534 strDescription,534 bstrDescription, 535 535 TRUE /* aCancelable */, 536 536 cOperations, // ULONG cOperations, 537 537 ulTotalOperationsWeight, // ULONG ulTotalOperationsWeight, 538 strDescription, // CBSTR bstrFirstOperationDescription,538 bstrDescription, // CBSTR bstrFirstOperationDescription, 539 539 m->ulWeightPerOperation); // ULONG ulFirstOperationWeight, 540 540 return rc; 541 541 } 542 542 543 HRESULT Appliance::setUpProgressImportS3(ComObjPtr<Progress> &pProgress, const Utf8Str &strDescription)543 HRESULT Appliance::setUpProgressImportS3(ComObjPtr<Progress> &pProgress, const Bstr &bstrDescription) 544 544 { 545 545 HRESULT rc; … … 572 572 573 573 rc = pProgress->init(mVirtualBox, static_cast<IAppliance*>(this), 574 strDescription,574 bstrDescription, 575 575 TRUE /* aCancelable */, 576 576 cOperations, // ULONG cOperations, 577 577 ulTotalOperationsWeight, // ULONG ulTotalOperationsWeight, 578 tr("Init"), // CBSTR bstrFirstOperationDescription,578 Bstr(tr("Init")), // CBSTR bstrFirstOperationDescription, 579 579 ulInitWeight); // ULONG ulFirstOperationWeight, 580 580 return rc; 581 581 } 582 582 583 HRESULT Appliance::setUpProgressWriteS3(ComObjPtr<Progress> &pProgress, const Utf8Str &strDescription)583 HRESULT Appliance::setUpProgressWriteS3(ComObjPtr<Progress> &pProgress, const Bstr &bstrDescription) 584 584 { 585 585 HRESULT rc; … … 614 614 615 615 rc = pProgress->init(mVirtualBox, static_cast<IAppliance*>(this), 616 strDescription,616 bstrDescription, 617 617 TRUE /* aCancelable */, 618 618 cOperations, // ULONG cOperations, 619 619 ulTotalOperationsWeight, // ULONG ulTotalOperationsWeight, 620 strDescription, // CBSTR bstrFirstOperationDescription,620 bstrDescription, // CBSTR bstrFirstOperationDescription, 621 621 ulOVFCreationWeight); // ULONG ulFirstOperationWeight, 622 622 return rc; … … 837 837 task->locInfo = aLocInfo; 838 838 839 Utf8Str progressDesc = Utf8StrFmt(tr("Import appliance '%s'"),840 839 Bstr progressDesc = BstrFmt(tr("Import appliance '%s'"), 840 aLocInfo.strPath.c_str()); 841 841 842 842 HRESULT rc = S_OK; … … 1569 1569 mhda.lDevice, 1570 1570 DeviceType_Floppy, 1571 NULL);1571 Bstr("")); 1572 1572 if (FAILED(rc)) throw rc; 1573 1573 … … 1618 1618 mhda.lDevice, 1619 1619 DeviceType_DVD, 1620 NULL);1620 Bstr("")); 1621 1621 if (FAILED(rc)) throw rc; 1622 1622 … … 1744 1744 rc = mVirtualBox->OpenHardDisk(Bstr(strSrcFilePath), 1745 1745 AccessMode_ReadOnly, 1746 false, NULL, false, NULL,1746 false, Bstr(""), false, Bstr(""), 1747 1747 srcHdVBox.asOutParam()); 1748 1748 if (FAILED(rc)) throw rc; … … 4281 4281 IN_BSTR aExtraConfigValue) 4282 4282 { 4283 CheckComArgNotNull(aVboxValue); 4284 CheckComArgNotNull(aExtraConfigValue); 4285 4283 4286 AutoCaller autoCaller(this); 4284 4287 if (FAILED(autoCaller.rc())) return autoCaller.rc(); -
trunk/src/VBox/Main/ConsoleImpl.cpp
r26550 r26553 584 584 if (RT_SUCCESS(rc)) 585 585 { 586 mMachine->SetGuestProperty(Bstr(pszPropertyName), NULL, Bstr("RDONLYGUEST"));586 mMachine->SetGuestProperty(Bstr(pszPropertyName), Bstr(""), Bstr("RDONLYGUEST")); 587 587 RTStrFree(pszPropertyName); 588 588 } … … 591 591 if (RT_SUCCESS(rc)) 592 592 { 593 mMachine->SetGuestProperty(Bstr(pszPropertyName), NULL, Bstr("RDONLYGUEST"));593 mMachine->SetGuestProperty(Bstr(pszPropertyName), Bstr(""), Bstr("RDONLYGUEST")); 594 594 RTStrFree(pszPropertyName); 595 595 } … … 598 598 if (RT_SUCCESS(rc)) 599 599 { 600 mMachine->SetGuestProperty(Bstr(pszPropertyName), NULL, Bstr("RDONLYGUEST"));600 mMachine->SetGuestProperty(Bstr(pszPropertyName), Bstr(""), Bstr("RDONLYGUEST")); 601 601 RTStrFree(pszPropertyName); 602 602 } … … 1190 1190 1191 1191 // static 1192 DECLCALLBACK(int) Console::doGuestPropNotification(void *pvExtension,1193 1194 1192 DECLCALLBACK(int) 1193 Console::doGuestPropNotification(void *pvExtension, uint32_t u32Function, 1194 void *pvParms, uint32_t cbParms) 1195 1195 { 1196 1196 using namespace guestProp; … … 1212 1212 Bstr value(pCBData->pcszValue); 1213 1213 Bstr flags(pCBData->pcszFlags); 1214 ComObjPtr<Console> ptrConsole = reinterpret_cast<Console *>(pvExtension); 1215 HRESULT hrc = ptrConsole->mControl->PushGuestProperty(name, 1216 value, 1217 pCBData->u64Timestamp, 1218 flags); 1219 if (SUCCEEDED(hrc)) 1220 rc = VINF_SUCCESS; 1214 if ( !name.isNull() 1215 && (!value.isNull() || pCBData->pcszValue == NULL) 1216 && (!flags.isNull() || pCBData->pcszFlags == NULL) 1217 ) 1218 { 1219 ComObjPtr<Console> ptrConsole = reinterpret_cast<Console *>(pvExtension); 1220 HRESULT hrc = ptrConsole->mControl->PushGuestProperty(name, 1221 value, 1222 pCBData->u64Timestamp, 1223 flags); 1224 if (SUCCEEDED(hrc)) 1225 rc = VINF_SUCCESS; 1226 else 1227 { 1228 LogFunc(("Console::doGuestPropNotification: hrc=%Rhrc pCBData={.pcszName=%s, .pcszValue=%s, .pcszFlags=%s}\n", 1229 pCBData->pcszName, pCBData->pcszValue, pCBData->pcszFlags)); 1230 rc = Global::vboxStatusCodeFromCOM(hrc); 1231 } 1232 } 1221 1233 else 1222 { 1223 LogFunc(("Console::doGuestPropNotification: hrc=%Rhrc pCBData={.pcszName=%s, .pcszValue=%s, .pcszFlags=%s}\n", 1224 pCBData->pcszName, pCBData->pcszValue, pCBData->pcszFlags)); 1225 rc = Global::vboxStatusCodeFromCOM(hrc); 1226 } 1234 rc = VERR_NO_MEMORY; 1227 1235 return rc; 1228 1236 } … … 2586 2594 { 2587 2595 #ifdef VBOX_WITH_USB 2588 CheckComArg StrNotEmptyOrNull(aAddress);2596 CheckComArgNotNull(aAddress); 2589 2597 CheckComArgOutPointerValid(aDevice); 2590 2598 … … 2653 2661 } 2654 2662 2655 STDMETHODIMP Console::CreateSharedFolder(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable) 2656 { 2657 CheckComArgStrNotEmptyOrNull(aName); 2658 CheckComArgStrNotEmptyOrNull(aHostPath); 2663 STDMETHODIMP 2664 Console::CreateSharedFolder(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable) 2665 { 2666 CheckComArgNotNull(aName); 2667 CheckComArgNotNull(aHostPath); 2659 2668 2660 2669 AutoCaller autoCaller(this); … … 2723 2732 STDMETHODIMP Console::RemoveSharedFolder(IN_BSTR aName) 2724 2733 { 2725 CheckComArg StrNotEmptyOrNull(aName);2734 CheckComArgNotNull(aName); 2726 2735 2727 2736 AutoCaller autoCaller(this); … … 2789 2798 LogFlowThisFunc(("aName='%ls' mMachineState=%08X\n", aName, mMachineState)); 2790 2799 2791 CheckComArg StrNotEmptyOrNull(aName);2800 CheckComArgNotNull(aName); 2792 2801 CheckComArgOutPointerValid(aProgress); 2793 2802 … … 7716 7725 * (i.e. creating a snapshot online) 7717 7726 */ 7718 ComAssertThrow( (!pTask->bstrSavedStateFile.is Empty() && pTask->fTakingSnapshotOnline)7719 || (pTask->bstrSavedStateFile.is Empty() && !pTask->fTakingSnapshotOnline),7727 ComAssertThrow( (!pTask->bstrSavedStateFile.isNull() && pTask->fTakingSnapshotOnline) 7728 || (pTask->bstrSavedStateFile.isNull() && !pTask->fTakingSnapshotOnline), 7720 7729 rc = E_FAIL); 7721 7730 -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r26550 r26553 3155 3155 } 3156 3156 3157 if (!networkName.is Empty())3157 if (!networkName.isNull()) 3158 3158 { 3159 3159 /* … … 3162 3162 */ 3163 3163 ComPtr<IDHCPServer> dhcpServer; 3164 hrc = virtualBox->FindDHCPServerByNetworkName(networkName. raw(), dhcpServer.asOutParam());3164 hrc = virtualBox->FindDHCPServerByNetworkName(networkName.mutableRaw(), dhcpServer.asOutParam()); 3165 3165 if (SUCCEEDED(hrc)) 3166 3166 { -
trunk/src/VBox/Main/ConsoleImplTeleporter.cpp
r26550 r26553 894 894 * @param aProgress Where to return the progress object. 895 895 */ 896 STDMETHODIMP Console::Teleport(IN_BSTR aHostname, 897 ULONG aPort, 898 IN_BSTR aPassword, 899 ULONG aMaxDowntime, 900 IProgress **aProgress) 896 STDMETHODIMP 897 Console::Teleport(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, ULONG aMaxDowntime, IProgress **aProgress) 901 898 { 902 899 /* … … 906 903 CheckComArgOutPointerValid(aProgress); 907 904 CheckComArgStrNotEmptyOrNull(aHostname); 905 CheckComArgNotNull(aHostname); 908 906 CheckComArgExprMsg(aPort, aPort > 0 && aPort <= 65535, ("is %u", aPort)); 909 907 CheckComArgExprMsg(aMaxDowntime, aMaxDowntime > 0, ("is %u", aMaxDowntime)); -
trunk/src/VBox/Main/GuestImpl.cpp
r26550 r26553 127 127 128 128 // redirect the call to IMachine if no additions are installed 129 if (mData.mAdditionsVersion.is Empty())130 return mParent->machine()->COMGETTER(OSTypeId) (aOSTypeId);129 if (mData.mAdditionsVersion.isNull()) 130 return mParent->machine()->COMGETTER(OSTypeId) (aOSTypeId); 131 131 132 132 mData.mOSTypeId.cloneTo(aOSTypeId); … … 135 135 } 136 136 137 STDMETHODIMP Guest::COMGETTER(AdditionsActive) (BOOL *aAdditionsActive)137 STDMETHODIMP Guest::COMGETTER(AdditionsActive) (BOOL *aAdditionsActive) 138 138 { 139 139 CheckComArgOutPointerValid(aAdditionsActive); … … 262 262 IN_BSTR aDomain, BOOL aAllowInteractiveLogon) 263 263 { 264 CheckComArgNotNull(aUserName); 265 CheckComArgNotNull(aPassword); 266 CheckComArgNotNull(aDomain); 267 264 268 AutoCaller autoCaller(this); 265 269 if (FAILED(autoCaller.rc())) return autoCaller.rc(); … … 274 278 275 279 vmmDev->getVMMDevPort()->pfnSetCredentials(vmmDev->getVMMDevPort(), 276 Utf8Str(aUserName).raw(), 277 Utf8Str(aPassword).raw(), 278 Utf8Str(aDomain).raw(), 279 u32Flags); 280 Utf8Str(aUserName).raw(), Utf8Str(aPassword).raw(), 281 Utf8Str(aDomain).raw(), u32Flags); 280 282 return S_OK; 281 283 } … … 315 317 void Guest::setAdditionsVersion (Bstr aVersion, VBOXOSTYPE aOsType) 316 318 { 317 Assert(aVersion.is Empty() || !aVersion.isEmpty());319 Assert(aVersion.isNull() || !aVersion.isEmpty()); 318 320 319 321 AutoCaller autoCaller(this); … … 323 325 324 326 mData.mAdditionsVersion = aVersion; 325 mData.mAdditionsActive = !aVersion.is Empty();326 327 mData.mOSTypeId = Global::OSTypeId (aOsType);327 mData.mAdditionsActive = !aVersion.isNull(); 328 329 mData.mOSTypeId = Global::OSTypeId (aOsType); 328 330 } 329 331 -
trunk/src/VBox/Main/HostImpl.cpp
r26550 r26553 1290 1290 STDMETHODIMP Host::FindHostDVDDrive(IN_BSTR aName, IMedium **aDrive) 1291 1291 { 1292 CheckComArg StrNotEmptyOrNull(aName);1292 CheckComArgNotNull(aName); 1293 1293 CheckComArgOutPointerValid(aDrive); 1294 1294 … … 1317 1317 STDMETHODIMP Host::FindHostFloppyDrive(IN_BSTR aName, IMedium **aDrive) 1318 1318 { 1319 CheckComArg StrNotEmptyOrNull(aName);1319 CheckComArgNotNull(aName); 1320 1320 CheckComArgOutPointerValid(aDrive); 1321 1321 … … 1451 1451 { 1452 1452 #ifdef VBOX_WITH_USB 1453 CheckComArg StrNotEmptyOrNull(aAddress);1453 CheckComArgNotNull(aAddress); 1454 1454 CheckComArgOutPointerValid(aDevice); 1455 1455 -
trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp
r26550 r26553 56 56 * @param aGuid GUID of the host network interface 57 57 */ 58 HRESULT HostNetworkInterface::init (Bstr aInterfaceName, Guid aGuid, HostNetworkInterfaceType_T ifType)58 HRESULT HostNetworkInterface::init (Bstr aInterfaceName, Guid aGuid, HostNetworkInterfaceType_T ifType) 59 59 { 60 60 LogFlowThisFunc(("aInterfaceName={%ls}, aGuid={%s}\n", 61 aInterfaceName.raw(), aGuid.toString().raw()));61 aInterfaceName.raw(), aGuid.toString().raw())); 62 62 63 63 ComAssertRet(aInterfaceName, E_INVALIDARG); … … 423 423 { 424 424 m.realIPAddress = 0; 425 if (FAILED(mVBox->SetExtraData(Bstr(Utf8StrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw())), NULL)))425 if (FAILED(mVBox->SetExtraData(Bstr(Utf8StrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw())), Bstr("")))) 426 426 return E_FAIL; 427 if (FAILED(mVBox->SetExtraData(Bstr(Utf8StrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw())), NULL)))427 if (FAILED(mVBox->SetExtraData(Bstr(Utf8StrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw())), Bstr("")))) 428 428 return E_FAIL; 429 429 return S_OK; -
trunk/src/VBox/Main/MachineImpl.cpp
r26550 r26553 697 697 STDMETHODIMP Machine::COMSETTER(Name)(IN_BSTR aName) 698 698 { 699 if (!aName || !*aName) 699 CheckComArgNotNull(aName); 700 701 if (!*aName) 700 702 return setError(E_INVALIDARG, 701 703 tr("Machine name cannot be empty")); … … 777 779 STDMETHODIMP Machine::COMSETTER(OSTypeId)(IN_BSTR aOSTypeId) 778 780 { 779 CheckComArg StrNotEmptyOrNull(aOSTypeId);781 CheckComArgNotNull(aOSTypeId); 780 782 781 783 AutoCaller autoCaller(this); … … 1928 1930 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1929 1931 1930 mData->mSession.mType.cloneTo(aSessionType); 1932 if (mData->mSession.mType.isNull()) 1933 Bstr("").cloneTo(aSessionType); 1934 else 1935 mData->mSession.mType.cloneTo(aSessionType); 1931 1936 1932 1937 return S_OK; … … 1985 1990 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1986 1991 1987 mSSData->mStateFilePath.cloneTo(aStateFilePath); 1992 if (mSSData->mStateFilePath.isEmpty()) 1993 Bstr("").cloneTo(aStateFilePath); 1994 else 1995 mSSData->mStateFilePath.cloneTo(aStateFilePath); 1988 1996 1989 1997 return S_OK; … … 2126 2134 } 2127 2135 2128 STDMETHODIMP Machine::COMSETTER(GuestPropertyNotificationPatterns)(IN_BSTR aPatterns) 2129 { 2136 STDMETHODIMP 2137 Machine::COMSETTER(GuestPropertyNotificationPatterns)(IN_BSTR aPatterns) 2138 { 2139 CheckComArgNotNull(aPatterns); 2130 2140 AutoCaller autoCaller(this); 2131 2141 if (FAILED(autoCaller.rc())) return autoCaller.rc(); … … 2390 2400 IN_BSTR aId) 2391 2401 { 2392 CheckComArgStrNotEmptyOrNull(aControllerName);2393 2394 2402 LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aType=%d aId=\"%ls\"\n", 2395 2403 aControllerName, aControllerPort, aDevice, aType, aId)); 2404 2405 CheckComArgNotNull(aControllerName); 2406 CheckComArgNotNull(aId); 2396 2407 2397 2408 AutoCaller autoCaller(this); … … 2815 2826 LONG aDevice) 2816 2827 { 2817 CheckComArg StrNotEmptyOrNull(aControllerName);2828 CheckComArgNotNull(aControllerName); 2818 2829 2819 2830 LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%ld aDevice=%ld\n", … … 2900 2911 LONG aDevice, BOOL aPassthrough) 2901 2912 { 2902 CheckComArg StrNotEmptyOrNull(aControllerName);2913 CheckComArgNotNull(aControllerName); 2903 2914 2904 2915 LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%ld aDevice=%ld aPassthrough=%d\n", … … 2954 2965 aControllerName, aControllerPort, aDevice, aForce)); 2955 2966 2956 CheckComArgStrNotEmptyOrNull(aControllerName); 2967 CheckComArgNotNull(aControllerName); 2968 CheckComArgNotNull(aId); 2957 2969 2958 2970 AutoCaller autoCaller(this); … … 3094 3106 aControllerName, aControllerPort, aDevice)); 3095 3107 3096 CheckComArg StrNotEmptyOrNull(aControllerName);3108 CheckComArgNotNull(aControllerName); 3097 3109 CheckComArgOutPointerValid(aMedium); 3098 3110 … … 3193 3205 BSTR *aValue) 3194 3206 { 3195 CheckComArg StrNotEmptyOrNull(aKey);3207 CheckComArgNotNull(aKey); 3196 3208 CheckComArgOutPointerValid(aValue); 3197 3209 … … 3200 3212 3201 3213 /* start with nothing found */ 3202 Bstr bstrResult ;3214 Bstr bstrResult(""); 3203 3215 3204 3216 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 3220 3232 STDMETHODIMP Machine::SetExtraData(IN_BSTR aKey, IN_BSTR aValue) 3221 3233 { 3222 CheckComArg StrNotEmptyOrNull(aKey);3234 CheckComArgNotNull(aKey); 3223 3235 3224 3236 AutoCaller autoCaller(this); … … 3251 3263 // lock to copy the list of callbacks to invoke 3252 3264 Bstr error; 3253 Bstr bstrValue(aValue); 3265 Bstr bstrValue; 3266 if (aValue) 3267 bstrValue = aValue; 3268 else 3269 bstrValue = (const char *)""; 3254 3270 3255 3271 if (!mParent->onExtraDataCanChange(mData->mUuid, aKey, bstrValue, error)) 3256 3272 { 3257 3273 const char *sep = error.isEmpty() ? "" : ": "; 3258 CBSTR err = error. raw();3274 CBSTR err = error.isNull() ? (CBSTR) L"" : error.raw(); 3259 3275 LogWarningFunc(("Someone vetoed! Change refused%s%ls\n", 3260 3276 sep, err)); … … 3440 3456 STDMETHODIMP Machine::FindSnapshot(IN_BSTR aName, ISnapshot **aSnapshot) 3441 3457 { 3442 CheckComArg StrNotEmptyOrNull(aName);3458 CheckComArgNotNull(aName); 3443 3459 CheckComArgOutPointerValid(aSnapshot); 3444 3460 … … 3466 3482 STDMETHODIMP Machine::CreateSharedFolder(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable) 3467 3483 { 3468 CheckComArg StrNotEmptyOrNull(aName);3469 CheckComArg StrNotEmptyOrNull(aHostPath);3484 CheckComArgNotNull(aName); 3485 CheckComArgNotNull(aHostPath); 3470 3486 3471 3487 AutoCaller autoCaller(this); … … 3501 3517 STDMETHODIMP Machine::RemoveSharedFolder(IN_BSTR aName) 3502 3518 { 3503 CheckComArg StrNotEmptyOrNull(aName);3519 CheckComArgNotNull(aName); 3504 3520 3505 3521 AutoCaller autoCaller(this); … … 3591 3607 ReturnComNotImplemented(); 3592 3608 #else // VBOX_WITH_GUEST_PROPS 3593 CheckComArg StrNotEmptyOrNull(aName);3609 CheckComArgNotNull(aName); 3594 3610 CheckComArgOutPointerValid(aValue); 3595 3611 CheckComArgOutPointerValid(aTimestamp); … … 3670 3686 using namespace guestProp; 3671 3687 3672 CheckComArgStrNotEmptyOrNull(aName); 3688 CheckComArgNotNull(aName); 3689 CheckComArgNotNull(aValue); 3673 3690 if ((aFlags != NULL) && !VALID_PTR(aFlags)) 3674 3691 return E_INVALIDARG; … … 3679 3696 { 3680 3697 Utf8Str utf8Name(aName); 3681 Utf8Str utf8Value(aValue);3682 3698 Utf8Str utf8Flags(aFlags); 3683 3699 … … 3735 3751 if (found && SUCCEEDED(rc)) 3736 3752 { 3737 if ( utf8Value.length())3753 if (*aValue) 3738 3754 { 3739 3755 RTTIMESPEC time; 3740 property.strValue = utf8Value;3756 property.strValue = aValue; 3741 3757 property.mTimestamp = RTTimeSpecGetNano(RTTimeNow(&time)); 3742 3758 if (aFlags != NULL) … … 3745 3761 } 3746 3762 } 3747 else if (SUCCEEDED(rc) && utf8Value.length())3763 else if (SUCCEEDED(rc) && *aValue) 3748 3764 { 3749 3765 RTTIMESPEC time; … … 3751 3767 mHWData.backup(); 3752 3768 property.strName = aName; 3753 property.strValue = utf8Value;3769 property.strValue = aValue; 3754 3770 property.mTimestamp = RTTimeSpecGetNano(RTTimeNow(&time)); 3755 3771 property.mFlags = fFlags; … … 3769 3785 else 3770 3786 { 3771 ComPtr<IInternalSessionControl> directControl = mData->mSession.mDirectControl; 3787 ComPtr<IInternalSessionControl> directControl = 3788 mData->mSession.mDirectControl; 3772 3789 3773 3790 /* just be on the safe side when calling another process */ … … 3780 3797 else 3781 3798 rc = directControl->AccessGuestProperty(aName, 3782 aValue,3799 *aValue ? aValue : NULL, /** @todo Fix when adding DeleteGuestProperty(), see defect. */ 3783 3800 aFlags, 3784 3801 true /* isSetter */, … … 3914 3931 aControllerName, aControllerPort, aDevice)); 3915 3932 3916 CheckComArg StrNotEmptyOrNull(aControllerName);3933 CheckComArgNotNull(aControllerName); 3917 3934 CheckComArgOutPointerValid(aAttachment); 3918 3935 … … 8930 8947 #endif /* VBOX_WITH_USB */ 8931 8948 8932 if (!mData->mSession.mType.is Empty())8949 if (!mData->mSession.mType.isNull()) 8933 8950 { 8934 8951 /* mType is not null when this machine's process has been started by … … 9638 9655 using namespace guestProp; 9639 9656 9640 CheckComArg StrNotEmptyOrNull(aName);9641 if (aValue && *aValue&& (!VALID_PTR(aValue) || !VALID_PTR(aFlags)))9657 CheckComArgNotNull(aName); 9658 if (aValue != NULL && (!VALID_PTR(aValue) || !VALID_PTR(aFlags))) 9642 9659 return E_POINTER; /* aValue can be NULL to indicate deletion */ 9643 9660 -
trunk/src/VBox/Main/Matching.cpp
r26550 r26553 198 198 return 199 199 mSimple.isEmpty() || 200 (mIgnoreCase && mSimple.compare (aValue, Bstr::CaseInsensitive) == 0) ||201 (!mIgnoreCase && mSimple.compare (aValue) == 0);200 (mIgnoreCase && mSimple.compareIgnoreCase (aValue) == 0) || 201 (!mIgnoreCase && mSimple.compare (aValue) == 0); 202 202 } 203 203 -
trunk/src/VBox/Main/MediumImpl.cpp
r26550 r26553 1361 1361 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1362 1362 1363 m->strDescription.cloneTo(aDescription); 1363 if (m->strDescription.isEmpty()) 1364 Bstr("").cloneTo(aDescription); 1365 else 1366 m->strDescription.cloneTo(aDescription); 1364 1367 1365 1368 return S_OK; … … 1368 1371 STDMETHODIMP Medium::COMSETTER(Description)(IN_BSTR aDescription) 1369 1372 { 1373 CheckComArgNotNull(aDescription); 1374 1370 1375 AutoCaller autoCaller(this); 1371 1376 if (FAILED(autoCaller.rc())) return autoCaller.rc(); … … 1410 1415 STDMETHODIMP Medium::COMSETTER(Location)(IN_BSTR aLocation) 1411 1416 { 1412 CheckComArg StrNotEmptyOrNull(aLocation);1417 CheckComArgNotNull(aLocation); 1413 1418 1414 1419 AutoCaller autoCaller(this); … … 1720 1725 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1721 1726 1722 m->strLastAccessError.cloneTo(aLastAccessError); 1727 if (m->strLastAccessError.isEmpty()) 1728 Bstr("").cloneTo(aLastAccessError); 1729 else 1730 m->strLastAccessError.cloneTo(aLastAccessError); 1723 1731 1724 1732 return S_OK; … … 2094 2102 tr("Property '%ls' does not exist"), aName); 2095 2103 2096 it->second.cloneTo(aValue); 2104 if (it->second.isEmpty()) 2105 Bstr("").cloneTo(aValue); 2106 else 2107 it->second.cloneTo(aValue); 2097 2108 2098 2109 return S_OK; … … 2158 2169 { 2159 2170 it->first.cloneTo(&names[i]); 2160 it->second.cloneTo(&values[i]); 2171 if (it->second.isEmpty()) 2172 Bstr("").cloneTo(&values[i]); 2173 else 2174 it->second.cloneTo(&values[i]); 2161 2175 ++ i; 2162 2176 } … … 2348 2362 2349 2363 STDMETHODIMP Medium::CloneTo(IMedium *aTarget, 2350 MediumVariant_T aVariant,2351 IMedium *aParent,2352 IProgress **aProgress)2364 MediumVariant_T aVariant, 2365 IMedium *aParent, 2366 IProgress **aProgress) 2353 2367 { 2354 2368 CheckComArgNotNull(aTarget); … … 3076 3090 { 3077 3091 /* only save properties that have non-default values */ 3078 if (!it->second.is Empty())3092 if (!it->second.isNull()) 3079 3093 { 3080 3094 Utf8Str name = it->first; … … 4844 4858 4845 4859 /* we interpret null values as "no value" in Medium */ 4846 if (it->second.is Empty())4860 if (it->second.isNull()) 4847 4861 return VERR_CFGM_VALUE_NOT_FOUND; 4848 4862 … … 4871 4885 4872 4886 /* we interpret null values as "no value" in Medium */ 4873 if (it->second.is Empty())4887 if (it->second.isNull()) 4874 4888 return VERR_CFGM_VALUE_NOT_FOUND; 4875 4889 -
trunk/src/VBox/Main/NetworkAdapterImpl.cpp
r26550 r26553 1026 1026 case NetworkAttachmentType_NAT: 1027 1027 mData->mNATNetwork = data.strName; 1028 if (mData->mNATNetwork.isNull()) 1029 mData->mNATNetwork = ""; 1028 1030 rc = AttachToNAT(); 1029 1031 if (FAILED(rc)) return rc; … … 1039 1041 case NetworkAttachmentType_Internal: 1040 1042 mData->mInternalNetwork = data.strName; 1041 Assert(!mData->mInternalNetwork.is Empty());1043 Assert(!mData->mInternalNetwork.isNull()); 1042 1044 1043 1045 rc = AttachToInternalNetwork(); -
trunk/src/VBox/Main/ProgressImpl.cpp
r26550 r26553 97 97 * @return COM result indicator. 98 98 */ 99 HRESULT ProgressBase::protectedInit (AutoInitSpan &aAutoInitSpan,99 HRESULT ProgressBase::protectedInit (AutoInitSpan &aAutoInitSpan, 100 100 #if !defined (VBOX_COM_INPROC) 101 101 VirtualBox *aParent, 102 102 #endif 103 IUnknown *aInitiator, 104 const Utf8Str &strDescription, 105 OUT_GUID aId /* = NULL */) 103 IUnknown *aInitiator, 104 CBSTR aDescription, OUT_GUID aId /* = NULL */) 106 105 { 107 106 /* Guarantees subclasses call this method at the proper time */ … … 117 116 #endif 118 117 119 AssertReturn( !strDescription.isEmpty(), E_INVALIDARG);118 AssertReturn(aDescription, E_INVALIDARG); 120 119 121 120 #if !defined (VBOX_COM_INPROC) … … 144 143 #endif 145 144 146 unconst(m _strDescription) = strDescription;145 unconst(mDescription) = aDescription; 147 146 148 147 return S_OK; … … 221 220 222 221 /* mDescription is constant during life time, no need to lock */ 223 m _strDescription.cloneTo(aDescription);222 mDescription.cloneTo(aDescription); 224 223 225 224 return S_OK; … … 466 465 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 467 466 468 m_ strOperationDescription.cloneTo(aOperationDescription);467 m_bstrOperationDescription.cloneTo(aOperationDescription); 469 468 470 469 return S_OK; … … 664 663 #endif 665 664 IUnknown *aInitiator, 666 const Utf8Str &strDescription,665 CBSTR aDescription, 667 666 BOOL aCancelable, 668 667 ULONG cOperations, 669 668 ULONG ulTotalOperationsWeight, 670 const Utf8Str &strFirstOperationDescription,669 CBSTR bstrFirstOperationDescription, 671 670 ULONG ulFirstOperationWeight, 672 671 OUT_GUID aId /* = NULL */) 673 672 { 674 LogFlowThisFunc(("aDescription=\"% s\", cOperations=%d, ulTotalOperationsWeight=%d, strFirstOperationDescription=\"%s\", ulFirstOperationWeight=%d\n",675 strDescription.c_str(),673 LogFlowThisFunc(("aDescription=\"%ls\", cOperations=%d, ulTotalOperationsWeight=%d, bstrFirstOperationDescription=\"%ls\", ulFirstOperationWeight=%d\n", 674 aDescription, 676 675 cOperations, 677 676 ulTotalOperationsWeight, 678 strFirstOperationDescription.c_str(),677 bstrFirstOperationDescription, 679 678 ulFirstOperationWeight)); 680 679 681 AssertReturn( !strFirstOperationDescription.isEmpty(), E_INVALIDARG);680 AssertReturn(bstrFirstOperationDescription, E_INVALIDARG); 682 681 AssertReturn(ulTotalOperationsWeight >= 1, E_INVALIDARG); 683 682 … … 688 687 HRESULT rc = S_OK; 689 688 690 rc = ProgressBase::protectedInit (autoInitSpan,689 rc = ProgressBase::protectedInit (autoInitSpan, 691 690 #if !defined (VBOX_COM_INPROC) 692 aParent,691 aParent, 693 692 #endif 694 aInitiator, 695 strDescription, 696 aId); 693 aInitiator, aDescription, aId); 697 694 if (FAILED(rc)) return rc; 698 695 … … 703 700 m_ulOperationsCompletedWeight = 0; 704 701 m_ulCurrentOperation = 0; 705 m_ strOperationDescription =strFirstOperationDescription;702 m_bstrOperationDescription = bstrFirstOperationDescription; 706 703 m_ulCurrentOperationWeight = ulFirstOperationWeight; 707 704 m_ulOperationPercent = 0; … … 736 733 HRESULT Progress::init(BOOL aCancelable, 737 734 ULONG aOperationCount, 738 const Utf8Str &strOperationDescription)739 { 740 LogFlowThisFunc(("aOperationDescription=\"% s\"\n", strOperationDescription.c_str()));735 CBSTR aOperationDescription) 736 { 737 LogFlowThisFunc(("aOperationDescription=\"%ls\"\n", aOperationDescription)); 741 738 742 739 /* Enclose the state transition NotReady->InInit->Ready */ … … 746 743 HRESULT rc = S_OK; 747 744 748 rc = ProgressBase::protectedInit (autoInitSpan);745 rc = ProgressBase::protectedInit (autoInitSpan); 749 746 if (FAILED(rc)) return rc; 750 747 … … 757 754 m_ulOperationsCompletedWeight = 0; 758 755 m_ulCurrentOperation = 0; 759 m_ strOperationDescription = strOperationDescription;756 m_bstrOperationDescription = aOperationDescription; 760 757 m_ulCurrentOperationWeight = 1; 761 758 m_ulOperationPercent = 0; 762 759 763 int vrc = RTSemEventMultiCreate (&mCompletedSem);764 ComAssertRCRet (vrc, E_FAIL);765 766 RTSemEventMultiReset (mCompletedSem);760 int vrc = RTSemEventMultiCreate (&mCompletedSem); 761 ComAssertRCRet (vrc, E_FAIL); 762 763 RTSemEventMultiReset (mCompletedSem); 767 764 768 765 /* Confirm a successful initialization when it's the case */ … … 790 787 if (mWaitersCount > 0) 791 788 { 792 LogFlow (("WARNING: There are still %d threads waiting for '% s' completion!\n",793 mWaitersCount, m _strDescription.c_str()));794 RTSemEventMultiSignal (mCompletedSem);789 LogFlow (("WARNING: There are still %d threads waiting for '%ls' completion!\n", 790 mWaitersCount, mDescription.raw())); 791 RTSemEventMultiSignal (mCompletedSem); 795 792 } 796 793 797 RTSemEventMultiDestroy (mCompletedSem);798 799 ProgressBase::protectedUninit (autoUninitSpan);794 RTSemEventMultiDestroy (mCompletedSem); 795 796 ProgressBase::protectedUninit (autoUninitSpan); 800 797 } 801 798 … … 1007 1004 m_ulOperationsCompletedWeight += m_ulCurrentOperationWeight; 1008 1005 1009 m_ strOperationDescription = bstrNextOperationDescription;1006 m_bstrOperationDescription = bstrNextOperationDescription; 1010 1007 m_ulCurrentOperationWeight = ulNextOperationsWeight; 1011 1008 m_ulOperationPercent = 0; 1012 1009 1013 Log(("Progress::setNextOperation(% s): ulNextOperationsWeight = %d; m_ulCurrentOperation is now %d, m_ulOperationsCompletedWeight is now %d\n",1014 m_ strOperationDescription.c_str(), ulNextOperationsWeight, m_ulCurrentOperation, m_ulOperationsCompletedWeight));1010 Log(("Progress::setNextOperation(%ls): ulNextOperationsWeight = %d; m_ulCurrentOperation is now %d, m_ulOperationsCompletedWeight is now %d\n", 1011 m_bstrOperationDescription.raw(), ulNextOperationsWeight, m_ulCurrentOperation, m_ulOperationsCompletedWeight)); 1015 1012 1016 1013 /* wake up all waiting threads */ … … 1289 1286 1290 1287 m_ulCurrentOperation = 0; 1291 Bstr bstrOperationDescription; 1292 rc = mProgresses[0]->COMGETTER(OperationDescription)(bstrOperationDescription.asOutParam()); 1293 m_strOperationDescription = bstrOperationDescription; 1288 rc = mProgresses[0]->COMGETTER(OperationDescription)(m_bstrOperationDescription.asOutParam()); 1294 1289 if (FAILED(rc)) return rc; 1295 1290 … … 1791 1786 { 1792 1787 m_ulCurrentOperation = mCompletedOperations + operation; 1793 Bstr bstrOperationDescription; 1794 rc = progress->COMGETTER(OperationDescription)(bstrOperationDescription.asOutParam()); 1795 m_strOperationDescription = bstrOperationDescription; 1788 rc = progress->COMGETTER(OperationDescription) ( 1789 m_bstrOperationDescription.asOutParam()); 1796 1790 } 1797 1791 } -
trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp
r26550 r26553 134 134 ///////////////////////////////////////////////////////////////////////////// 135 135 136 STDMETHODIMP RemoteUSBDevice::COMGETTER(Id) (BSTR *aId)136 STDMETHODIMP RemoteUSBDevice::COMGETTER(Id) (BSTR *aId) 137 137 { 138 138 CheckComArgOutPointerValid(aId); … … 142 142 143 143 /* this is const, no need to lock */ 144 Bstr(mData.id .toUtf16()).cloneTo(aId);144 Bstr(mData.id).cloneTo(aId); 145 145 146 146 return S_OK; -
trunk/src/VBox/Main/SessionImpl.cpp
r26550 r26553 682 682 } 683 683 684 STDMETHODIMP Session::AccessGuestProperty(IN_BSTR aName, 685 IN_BSTR aValue, 686 IN_BSTR aFlags, 687 BOOL aIsSetter, 688 BSTR *aRetValue, 689 ULONG64 *aRetTimestamp, 690 BSTR *aRetFlags) 684 STDMETHODIMP Session::AccessGuestProperty(IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags, 685 BOOL aIsSetter, BSTR *aRetValue, ULONG64 *aRetTimestamp, BSTR *aRetFlags) 691 686 { 692 687 #ifdef VBOX_WITH_GUEST_PROPS … … 699 694 Global::stringifySessionState(mState)); 700 695 AssertReturn(mType == SessionType_Direct, VBOX_E_INVALID_OBJECT_STATE); 701 CheckComArg StrNotEmptyOrNull(aName);696 CheckComArgNotNull(aName); 702 697 if (!aIsSetter && !VALID_PTR(aRetValue)) 703 698 return E_POINTER; -
trunk/src/VBox/Main/SharedFolderImpl.cpp
r26550 r26553 333 333 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 334 334 335 m.lastAccessError.cloneTo(aLastAccessError); 335 if (m.lastAccessError.isEmpty()) 336 Bstr("").cloneTo(aLastAccessError); 337 else 338 m.lastAccessError.cloneTo(aLastAccessError); 336 339 337 340 return S_OK; -
trunk/src/VBox/Main/SnapshotImpl.cpp
r26550 r26553 342 342 STDMETHODIMP Snapshot::COMSETTER(Name)(IN_BSTR aName) 343 343 { 344 CheckComArg StrNotEmptyOrNull(aName);344 CheckComArgNotNull(aName); 345 345 346 346 AutoCaller autoCaller(this); … … 378 378 STDMETHODIMP Snapshot::COMSETTER(Description)(IN_BSTR aDescription) 379 379 { 380 CheckComArgNotNull(aDescription); 381 380 382 AutoCaller autoCaller(this); 381 383 if (FAILED(autoCaller.rc())) return autoCaller.rc(); -
trunk/src/VBox/Main/SystemPropertiesImpl.cpp
r26550 r26553 814 814 * @return ComObjPtr<MediumFormat> 815 815 */ 816 ComObjPtr<MediumFormat> SystemProperties::mediumFormat (CBSTR aFormat)816 ComObjPtr<MediumFormat> SystemProperties::mediumFormat (CBSTR aFormat) 817 817 { 818 818 ComObjPtr<MediumFormat> format; … … 824 824 825 825 for (MediumFormatList::const_iterator it = mMediumFormats.begin(); 826 it != mMediumFormats.end(); 827 ++it) 826 it != mMediumFormats.end(); ++ it) 828 827 { 829 828 /* MediumFormat is all const, no need to lock */ 830 829 831 if ((*it)->id().compare (aFormat, Bstr::CaseInsensitive) == 0)830 if ((*it)->id().compareIgnoreCase (aFormat) == 0) 832 831 { 833 832 format = *it; -
trunk/src/VBox/Main/USBControllerImpl.cpp
r26550 r26553 1110 1110 rc = aUSBDevice->COMGETTER(Manufacturer) (manufacturer.asOutParam()); 1111 1111 ComAssertComRCRet(rc, false); 1112 if (!manufacturer.is Empty())1112 if (!manufacturer.isNull()) 1113 1113 USBFilterSetStringExact (&dev, USBFILTERIDX_MANUFACTURER_STR, Utf8Str(manufacturer).c_str(), true); 1114 1114 … … 1116 1116 rc = aUSBDevice->COMGETTER(Product) (product.asOutParam()); 1117 1117 ComAssertComRCRet(rc, false); 1118 if (!product.is Empty())1118 if (!product.isNull()) 1119 1119 USBFilterSetStringExact (&dev, USBFILTERIDX_PRODUCT_STR, Utf8Str(product).c_str(), true); 1120 1120 … … 1122 1122 rc = aUSBDevice->COMGETTER(SerialNumber) (serialNumber.asOutParam()); 1123 1123 ComAssertComRCRet(rc, false); 1124 if (!serialNumber.is Empty())1124 if (!serialNumber.isNull()) 1125 1125 USBFilterSetStringExact (&dev, USBFILTERIDX_SERIAL_NUMBER_STR, Utf8Str(serialNumber).c_str(), true); 1126 1126 -
trunk/src/VBox/Main/USBDeviceImpl.cpp
r26550 r26553 155 155 156 156 /* this is const, no need to lock */ 157 Guid(mData.id).to Utf16().cloneTo(aId);157 Guid(mData.id).toString().cloneTo(aId); 158 158 159 159 return S_OK; -
trunk/src/VBox/Main/VirtualBoxBase.cpp
r26550 r26553 810 810 */ 811 811 /* static */ 812 HRESULT VirtualBoxSupportErrorInfoImplBase::setErrorInternal(HRESULT aResultCode, 813 const GUID &aIID, 814 const Bstr &aComponent, 815 const Bstr &aText, 816 bool aWarning, 817 bool aLogIt) 812 HRESULT VirtualBoxSupportErrorInfoImplBase::setErrorInternal ( 813 HRESULT aResultCode, const GUID &aIID, 814 const Bstr &aComponent, const Bstr &aText, 815 bool aWarning, bool aLogIt) 818 816 { 819 817 /* whether multi-error mode is turned on */ … … 827 825 828 826 /* these are mandatory, others -- not */ 829 AssertReturn( (!aWarning && FAILED(aResultCode))830 ||(aWarning && aResultCode != S_OK),827 AssertReturn((!aWarning && FAILED(aResultCode)) || 828 (aWarning && aResultCode != S_OK), 831 829 E_FAIL); 832 830 AssertReturn(!aText.isEmpty(), E_FAIL); … … 916 914 917 915 /* set the current error info and preserve the previous one if any */ 918 rc = info->init (aResultCode, aIID, aComponent.raw(), aText.raw(), curInfo);916 rc = info->init (aResultCode, aIID, aComponent, aText, curInfo); 919 917 if (FAILED(rc)) break; 920 918 -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r26550 r26553 302 302 LogFlowThisFuncEnter(); 303 303 304 if (sVersion.is Empty())304 if (sVersion.isNull()) 305 305 sVersion = VBOX_VERSION_STRING; 306 306 sRevision = RTBldCfgRevision(); 307 if (sPackageType.is Empty())307 if (sPackageType.isNull()) 308 308 sPackageType = VBOX_PACKAGE_STRING; 309 309 LogFlowThisFunc(("Version: %ls, Package: %ls\n", sVersion.raw(), sPackageType.raw())); … … 323 323 /* compose the VirtualBox.xml file name */ 324 324 unconst(m->strSettingsFilePath) = Utf8StrFmt("%s%c%s", 325 326 327 325 m->strHomeDir.raw(), 326 RTPATH_DELIMITER, 327 VBOX_GLOBAL_SETTINGS_FILE); 328 328 HRESULT rc = S_OK; 329 329 bool fCreate = false; … … 979 979 firmwareDesc[i].fileName); 980 980 rc = calculateFullPath(shortName, fullName); AssertRCReturn(rc, rc); 981 if (RTFileExists(fullName. c_str()))981 if (RTFileExists(fullName.raw())) 982 982 { 983 983 *aResult = TRUE; 984 984 if (aFile) 985 fullName.cloneTo(aFile);985 Utf8Str(fullName).cloneTo(aFile); 986 986 break; 987 987 } … … 993 993 RTPATH_DELIMITER, 994 994 firmwareDesc[i].fileName); 995 if (RTFileExists(fullName. c_str()))995 if (RTFileExists(fullName.raw())) 996 996 { 997 997 *aResult = TRUE; 998 998 if (aFile) 999 fullName.cloneTo(aFile);999 Utf8Str(fullName).cloneTo(aFile); 1000 1000 break; 1001 1001 } … … 1225 1225 LogFlowThisFunc(("aName=\"%ls\", aMachine={%p}\n", aName, aMachine)); 1226 1226 1227 CheckComArg StrNotEmptyOrNull(aName);1227 CheckComArgNotNull(aName); 1228 1228 CheckComArgOutSafeArrayPointerValid(aMachine); 1229 1229 … … 1346 1346 IMedium **aHardDisk) 1347 1347 { 1348 CheckComArgStrNotEmptyOrNull(aLocation); 1348 CheckComArgNotNull(aLocation); 1349 CheckComArgNotNull(aImageId); 1350 CheckComArgNotNull(aParentId); 1349 1351 CheckComArgOutSafeArrayPointerValid(aHardDisk); 1350 1352 … … 1421 1423 IMedium **aHardDisk) 1422 1424 { 1423 CheckComArg StrNotEmptyOrNull(aLocation);1425 CheckComArgNotNull(aLocation); 1424 1426 CheckComArgOutSafeArrayPointerValid(aHardDisk); 1425 1427 … … 1428 1430 1429 1431 ComObjPtr<Medium> hardDisk; 1430 Utf8Str strLocation(aLocation); 1431 HRESULT rc = findHardDisk(NULL, &strLocation, true /* setError */, &hardDisk); 1432 HRESULT rc = findHardDisk(NULL, aLocation, true /* setError */, &hardDisk); 1432 1433 1433 1434 /* the below will set *aHardDisk to NULL if hardDisk is null */ … … 1478 1479 1479 1480 /** @note Locks objects! */ 1480 STDMETHODIMP VirtualBox::GetDVDImage (IN_BSTR aId, IMedium **aDVDImage)1481 STDMETHODIMP VirtualBox::GetDVDImage (IN_BSTR aId, IMedium **aDVDImage) 1481 1482 { 1482 1483 CheckComArgOutSafeArrayPointerValid(aDVDImage); … … 1496 1497 1497 1498 /** @note Locks objects! */ 1498 STDMETHODIMP VirtualBox::FindDVDImage (IN_BSTR aLocation, IMedium **aDVDImage)1499 { 1500 CheckComArg StrNotEmptyOrNull(aLocation);1499 STDMETHODIMP VirtualBox::FindDVDImage (IN_BSTR aLocation, IMedium **aDVDImage) 1500 { 1501 CheckComArgNotNull(aLocation); 1501 1502 CheckComArgOutSafeArrayPointerValid(aDVDImage); 1502 1503 … … 1505 1506 1506 1507 ComObjPtr<Medium> image; 1507 Utf8Str strLocation(aLocation); 1508 HRESULT rc = findDVDImage(NULL, &strLocation, true /* setError */, &image); 1508 HRESULT rc = findDVDImage (NULL, aLocation, true /* setError */, &image); 1509 1509 1510 1510 /* the below will set *aDVDImage to NULL if dvd is null */ … … 1515 1515 1516 1516 /** @note Doesn't lock anything. */ 1517 STDMETHODIMP VirtualBox::OpenFloppyImage (IN_BSTR aLocation, IN_BSTR aId,1518 IMedium **aFloppyImage)1517 STDMETHODIMP VirtualBox::OpenFloppyImage (IN_BSTR aLocation, IN_BSTR aId, 1518 IMedium **aFloppyImage) 1519 1519 { 1520 1520 CheckComArgStrNotEmptyOrNull(aLocation); … … 1555 1555 1556 1556 /** @note Locks objects! */ 1557 STDMETHODIMP VirtualBox::GetFloppyImage (IN_BSTR aId,1558 IMedium **aFloppyImage)1557 STDMETHODIMP VirtualBox::GetFloppyImage (IN_BSTR aId, 1558 IMedium **aFloppyImage) 1559 1559 1560 1560 { … … 1575 1575 1576 1576 /** @note Locks objects! */ 1577 STDMETHODIMP VirtualBox::FindFloppyImage (IN_BSTR aLocation,1578 IMedium **aFloppyImage)1579 { 1580 CheckComArg StrNotEmptyOrNull(aLocation);1577 STDMETHODIMP VirtualBox::FindFloppyImage (IN_BSTR aLocation, 1578 IMedium **aFloppyImage) 1579 { 1580 CheckComArgNotNull(aLocation); 1581 1581 CheckComArgOutSafeArrayPointerValid(aFloppyImage); 1582 1582 … … 1585 1585 1586 1586 ComObjPtr<Medium> image; 1587 Utf8Str strLocation(aLocation); 1588 HRESULT rc = findFloppyImage(NULL, &strLocation, true /* setError */, &image); 1587 HRESULT rc = findFloppyImage(NULL, aLocation, true /* setError */, &image); 1589 1588 1590 1589 /* the below will set *aFloppyImage to NULL if img is null */ … … 1595 1594 1596 1595 /** @note Locks this object for reading. */ 1597 STDMETHODIMP VirtualBox::GetGuestOSType (IN_BSTR aId, IGuestOSType **aType)1596 STDMETHODIMP VirtualBox::GetGuestOSType (IN_BSTR aId, IGuestOSType **aType) 1598 1597 { 1599 1598 /* Old ID to new ID conversion table. See r39691 for a source */ … … 1616 1615 }; 1617 1616 1618 CheckComArgNotNull (aType);1617 CheckComArgNotNull (aType); 1619 1618 1620 1619 AutoCaller autoCaller(this); … … 1640 1639 { 1641 1640 const Bstr &typeId = (*it)->id(); 1642 if (typeId.compare(id, Bstr::CaseInsensitive) == 0) 1641 AssertMsg (!!typeId, ("ID must not be NULL")); 1642 if (typeId.compareIgnoreCase (id) == 0) 1643 1643 { 1644 1644 (*it).queryInterfaceTo(aType); … … 1709 1709 BSTR *aValue) 1710 1710 { 1711 CheckComArg StrNotEmptyOrNull(aKey);1711 CheckComArgNotNull(aKey); 1712 1712 CheckComArgNotNull(aValue); 1713 1713 … … 1716 1716 1717 1717 /* start with nothing found */ 1718 Bstr bstrResult ;1718 Bstr bstrResult(""); 1719 1719 1720 1720 settings::ExtraDataItemsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.find(Utf8Str(aKey)); … … 1735 1735 IN_BSTR aValue) 1736 1736 { 1737 CheckComArg StrNotEmptyOrNull(aKey);1737 CheckComArgNotNull(aKey); 1738 1738 1739 1739 AutoCaller autoCaller(this); … … 1766 1766 // lock to copy the list of callbacks to invoke 1767 1767 Bstr error; 1768 Bstr bstrValue(aValue); 1768 Bstr bstrValue; 1769 if (aValue) 1770 bstrValue = aValue; 1771 else 1772 bstrValue = (const char *)""; 1769 1773 1770 1774 if (!onExtraDataCanChange(Guid::Empty, aKey, bstrValue, error)) 1771 1775 { 1772 1776 const char *sep = error.isEmpty() ? "" : ": "; 1773 CBSTR err = error. raw();1777 CBSTR err = error.isNull() ? (CBSTR) L"" : error.raw(); 1774 1778 LogWarningFunc(("Someone vetoed! Change refused%s%ls\n", 1775 1779 sep, err)); … … 1862 1866 LogRel(("remotesession=%s\n", Utf8Str(aMachineId).c_str())); 1863 1867 1864 CheckComArg StrNotEmptyOrNull(aMachineId);1868 CheckComArgNotNull(aMachineId); 1865 1869 CheckComArgNotNull(aSession); 1870 CheckComArgNotNull(aType); 1866 1871 CheckComArgOutSafeArrayPointerValid(aProgress); 1867 1872 … … 1892 1897 ComObjPtr<Progress> progress; 1893 1898 progress.createObject(); 1894 progress->init(this, 1895 static_cast<IMachine*>(machine), 1896 tr("Spawning session"), 1897 FALSE /* aCancelable */); 1899 progress->init (this, static_cast <IMachine *> (machine), 1900 Bstr (tr ("Spawning session")), 1901 FALSE /* aCancelable */); 1898 1902 1899 1903 rc = machine->openRemoteSession (control, aType, aEnvironment, progress); … … 2430 2434 case DataChanged: 2431 2435 LogFlow (("OnMachineDataChange: id={%RTuuid}\n", id.ptr())); 2432 aCallback->OnMachineDataChange (id.toUtf16());2436 aCallback->OnMachineDataChange (id.toUtf16()); 2433 2437 break; 2434 2438 … … 2436 2440 LogFlow (("OnMachineStateChange: id={%RTuuid}, state=%d\n", 2437 2441 id.ptr(), state)); 2438 aCallback->OnMachineStateChange (id.toUtf16(), state);2442 aCallback->OnMachineStateChange (id.toUtf16(), state); 2439 2443 break; 2440 2444 … … 2442 2446 LogFlow (("OnMachineRegistered: id={%RTuuid}, registered=%d\n", 2443 2447 id.ptr(), registered)); 2444 aCallback->OnMachineRegistered (id.toUtf16(), registered);2448 aCallback->OnMachineRegistered (id.toUtf16(), registered); 2445 2449 break; 2446 2450 } … … 2493 2497 while ((it != list.end()) && allowChange) 2494 2498 { 2495 HRESULT rc = (*it++)->OnExtraDataCanChange(id, 2496 aKey, 2497 aValue, 2498 aError.asOutParam(), 2499 &allowChange); 2499 HRESULT rc = (*it++)->OnExtraDataCanChange (id, aKey, aValue, 2500 aError.asOutParam(), &allowChange); 2500 2501 if (FAILED(rc)) 2501 2502 { … … 2526 2527 LogFlow (("OnExtraDataChange: machineId={%RTuuid}, key='%ls', val='%ls'\n", 2527 2528 machineId.ptr(), key.raw(), val.raw())); 2528 aCallback->OnExtraDataChange (machineId.toUtf16(), key, val);2529 aCallback->OnExtraDataChange (machineId.toUtf16(), key, val); 2529 2530 } 2530 2531 … … 2553 2554 { 2554 2555 SessionEvent (VirtualBox *aVB, const Guid &aMachineId, SessionState_T aState) 2555 : CallbackEvent (aVB), machineId (aMachineId), sessionState (aState)2556 : CallbackEvent (aVB), machineId (aMachineId), sessionState (aState) 2556 2557 {} 2557 2558 … … 2560 2561 LogFlow (("OnSessionStateChange: machineId={%RTuuid}, sessionState=%d\n", 2561 2562 machineId.ptr(), sessionState)); 2562 aCallback->OnSessionStateChange (machineId.toUtf16(), sessionState);2563 aCallback->OnSessionStateChange (machineId.toUtf16(), sessionState); 2563 2564 } 2564 2565 … … 2597 2598 LogFlow (("OnSnapshotTaken: machineId={%RTuuid}, snapshotId={%RTuuid}\n", 2598 2599 machineId.ptr(), snapshotId.ptr())); 2599 aCallback->OnSnapshotTaken (mid, sid);2600 aCallback->OnSnapshotTaken (mid, sid); 2600 2601 break; 2601 2602 … … 2603 2604 LogFlow (("OnSnapshotDiscarded: machineId={%RTuuid}, snapshotId={%RTuuid}\n", 2604 2605 machineId.ptr(), snapshotId.ptr())); 2605 aCallback->OnSnapshotDiscarded (mid, sid);2606 aCallback->OnSnapshotDiscarded (mid, sid); 2606 2607 break; 2607 2608 … … 2609 2610 LogFlow (("OnSnapshotChange: machineId={%RTuuid}, snapshotId={%RTuuid}\n", 2610 2611 machineId.ptr(), snapshotId.ptr())); 2611 aCallback->OnSnapshotChange (mid, sid);2612 aCallback->OnSnapshotChange (mid, sid); 2612 2613 break; 2613 2614 } … … 2660 2661 LogFlow(("OnGuestPropertyChange: machineId={%RTuuid}, name='%ls', value='%ls', flags='%ls'\n", 2661 2662 machineId.ptr(), name.raw(), value.raw(), flags.raw())); 2662 aCallback->OnGuestPropertyChange (machineId.toUtf16(), name, value, flags);2663 aCallback->OnGuestPropertyChange (machineId.toUtf16(), name, value, flags); 2663 2664 } 2664 2665 … … 2796 2797 * 2797 2798 * @param aId ID of the hard disk (unused when NULL). 2798 * @param pstrLocationFull location specification (unused NULL).2799 * @param aLocation Full location specification (unused NULL). 2799 2800 * @param aSetError If @c true , the appropriate error info is set in case 2800 2801 * when the hard disk is not found. … … 2806 2807 */ 2807 2808 HRESULT VirtualBox::findHardDisk(const Guid *aId, 2808 const Utf8Str *pstrLocation,2809 CBSTR aLocation, 2809 2810 bool aSetError, 2810 2811 ComObjPtr<Medium> *aHardDisk /*= NULL*/) 2811 2812 { 2812 AssertReturn(aId || pstrLocation, E_INVALIDARG);2813 AssertReturn(aId || aLocation, E_INVALIDARG); 2813 2814 2814 2815 // we use the hard disks map, but it is protected by the … … 2830 2831 /* then iterate and search by location */ 2831 2832 int result = -1; 2832 if (pstrLocation) 2833 { 2833 if (aLocation) 2834 { 2835 Utf8Str location = aLocation; 2836 2834 2837 for (HardDiskMap::const_iterator it = m->mapHardDisks.begin(); 2835 2838 it != m->mapHardDisks.end(); … … 2838 2841 const ComObjPtr<Medium> &hd = (*it).second; 2839 2842 2840 HRESULT rc = hd->compareLocationTo( pstrLocation->c_str(), result);2843 HRESULT rc = hd->compareLocationTo(location.c_str(), result); 2841 2844 if (FAILED(rc)) return rc; 2842 2845 … … 2861 2864 else 2862 2865 setError(rc, 2863 tr("Could not find a hard disk with location '% s' in the media registry ('%s')"),2864 pstrLocation->c_str(),2866 tr("Could not find a hard disk with location '%ls' in the media registry ('%s')"), 2867 aLocation, 2865 2868 m->strSettingsFilePath.raw()); 2866 2869 } … … 2885 2888 */ 2886 2889 HRESULT VirtualBox::findDVDImage(const Guid *aId, 2887 const Utf8Str *pstrLocation,2890 CBSTR aLocation, 2888 2891 bool aSetError, 2889 2892 ComObjPtr<Medium> *aImage /* = NULL */) 2890 2893 { 2891 AssertReturn(aId || pstrLocation, E_INVALIDARG);2894 AssertReturn(aId || aLocation, E_INVALIDARG); 2892 2895 2893 2896 Utf8Str location; 2894 2897 2895 if ( pstrLocation != NULL)2896 { 2897 int vrc = calculateFullPath( *pstrLocation, location);2898 if (aLocation != NULL) 2899 { 2900 int vrc = calculateFullPath(Utf8Str(aLocation), location); 2898 2901 if (RT_FAILURE(vrc)) 2899 2902 return setError(VBOX_E_FILE_ERROR, 2900 tr("Invalid image file location '% s' (%Rrc)"),2901 pstrLocation->c_str(),2903 tr("Invalid image file location '%ls' (%Rrc)"), 2904 aLocation, 2902 2905 vrc); 2903 2906 } … … 2914 2917 AutoReadLock imageLock(*it COMMA_LOCKVAL_SRC_POS); 2915 2918 2916 found = (aId && (*it)->getId() == *aId)2917 || ( pstrLocation != NULL2918 &&RTPathCompare(location.c_str(),2919 2920 2919 found = (aId && (*it)->getId() == *aId) || 2920 (aLocation != NULL && 2921 RTPathCompare(location.c_str(), 2922 (*it)->getLocationFull().c_str() 2923 ) == 0); 2921 2924 if (found) 2922 2925 { … … 2938 2941 else 2939 2942 setError(rc, 2940 tr("Could not find a CD/DVD image with location '% s' in the media registry ('%s')"),2941 pstrLocation->c_str(),2943 tr("Could not find a CD/DVD image with location '%ls' in the media registry ('%s')"), 2944 aLocation, 2942 2945 m->strSettingsFilePath.raw()); 2943 2946 } … … 2963 2966 */ 2964 2967 HRESULT VirtualBox::findFloppyImage(const Guid *aId, 2965 const Utf8Str *pstrLocation,2968 CBSTR aLocation, 2966 2969 bool aSetError, 2967 2970 ComObjPtr<Medium> *aImage /* = NULL */) 2968 2971 { 2969 AssertReturn(aId || pstrLocation, E_INVALIDARG);2972 AssertReturn(aId || aLocation, E_INVALIDARG); 2970 2973 2971 2974 Utf8Str location; 2972 2975 2973 if ( pstrLocation != NULL)2974 { 2975 int vrc = calculateFullPath( *pstrLocation, location);2976 if (aLocation != NULL) 2977 { 2978 int vrc = calculateFullPath(Utf8Str(aLocation), location); 2976 2979 if (RT_FAILURE(vrc)) 2977 2980 return setError(VBOX_E_FILE_ERROR, 2978 tr("Invalid image file location '%s' (%Rrc)"), 2979 pstrLocation->c_str(), 2980 vrc); 2981 tr("Invalid image file location '%ls' (%Rrc)"), 2982 aLocation, vrc); 2981 2983 } 2982 2984 … … 2992 2994 AutoReadLock imageLock(*it COMMA_LOCKVAL_SRC_POS); 2993 2995 2994 found = (aId && (*it)->getId() == *aId)2995 || ( pstrLocation != NULL2996 &&RTPathCompare(location.c_str(),2997 2998 2996 found = (aId && (*it)->getId() == *aId) || 2997 (aLocation != NULL && 2998 RTPathCompare(location.c_str(), 2999 (*it)->getLocationFull().c_str() 3000 ) == 0); 2999 3001 if (found) 3000 3002 { … … 3016 3018 else 3017 3019 setError(rc, 3018 tr("Could not find a floppy image with location '% s' in the media registry ('%s')"),3019 pstrLocation->c_str(),3020 tr("Could not find a floppy image with location '%ls' in the media registry ('%s')"), 3021 aLocation, 3020 3022 m->strSettingsFilePath.raw()); 3021 3023 } … … 3195 3197 HRESULT rc = S_OK; 3196 3198 3199 Bstr bstrLocation(aLocation); 3200 3197 3201 { 3198 3202 ComObjPtr<Medium> hardDisk; 3199 rc = findHardDisk(&aId, &aLocation, false /* aSetError */, &hardDisk);3203 rc = findHardDisk(&aId, bstrLocation, false /* aSetError */, &hardDisk); 3200 3204 if (SUCCEEDED(rc)) 3201 3205 { … … 3211 3215 { 3212 3216 ComObjPtr<Medium> image; 3213 rc = findDVDImage(&aId, &aLocation, false /* aSetError */, &image);3217 rc = findDVDImage(&aId, bstrLocation, false /* aSetError */, &image); 3214 3218 if (SUCCEEDED(rc)) 3215 3219 { … … 3225 3229 { 3226 3230 ComObjPtr<Medium> image; 3227 rc = findFloppyImage(&aId, &aLocation, false /* aSetError */, &image);3231 rc = findFloppyImage(&aId, bstrLocation, false /* aSetError */, &image); 3228 3232 if (SUCCEEDED(rc)) 3229 3233 { … … 4355 4359 STDMETHODIMP VirtualBox::CreateDHCPServer (IN_BSTR aName, IDHCPServer ** aServer) 4356 4360 { 4357 CheckComArg StrNotEmptyOrNull(aName);4361 CheckComArgNotNull(aName); 4358 4362 CheckComArgNotNull(aServer); 4359 4363 … … 4376 4380 STDMETHODIMP VirtualBox::FindDHCPServerByNetworkName(IN_BSTR aName, IDHCPServer ** aServer) 4377 4381 { 4378 CheckComArg StrNotEmptyOrNull(aName);4382 CheckComArgNotNull(aName); 4379 4383 CheckComArgNotNull(aServer); 4380 4384 … … 4452 4456 4453 4457 ComPtr<IDHCPServer> existing; 4454 rc = FindDHCPServerByNetworkName(name , existing.asOutParam());4458 rc = FindDHCPServerByNetworkName(name.mutableRaw(), existing.asOutParam()); 4455 4459 if (SUCCEEDED(rc)) 4456 4460 { -
trunk/src/VBox/Main/generic/NetIf-generic.cpp
r26550 r26553 231 231 Bstr ifname; 232 232 ComPtr<IHostNetworkInterface> iface; 233 if (FAILED(host->FindHostNetworkInterfaceById (Guid(aId).toUtf16(), iface.asOutParam())))233 if (FAILED(host->FindHostNetworkInterfaceById (Guid(aId).toUtf16(), iface.asOutParam()))) 234 234 return VERR_INVALID_PARAMETER; 235 iface->COMGETTER(Name) (ifname.asOutParam());236 if (ifname.is Empty())235 iface->COMGETTER(Name) (ifname.asOutParam()); 236 if (ifname.isNull()) 237 237 return VERR_INTERNAL_ERROR; 238 238 239 rc = progress->init(pVBox, 240 host, 241 Bstr("Removing host network interface"), 239 rc = progress->init (pVBox, host, 240 Bstr ("Removing host network interface"), 242 241 FALSE /* aCancelable */); 243 242 if(SUCCEEDED(rc)) -
trunk/src/VBox/Main/glue/ErrorInfo.cpp
r26550 r26553 170 170 { 171 171 mCalleeIID = aIID; 172 GetInterfaceNameByIID (aIID, mCalleeName.asOutParam());172 GetInterfaceNameByIID (aIID, mCalleeName.asOutParam()); 173 173 } 174 174 } -
trunk/src/VBox/Main/include/ApplianceImpl.h
r26550 r26553 96 96 97 97 void disksWeight(uint32_t &ulTotalMB, uint32_t &cDisks) const; 98 HRESULT setUpProgressFS(ComObjPtr<Progress> &pProgress, const Utf8Str &strDescription);99 HRESULT setUpProgressImportS3(ComObjPtr<Progress> &pProgress, const Utf8Str &strDescription);100 HRESULT setUpProgressWriteS3(ComObjPtr<Progress> &pProgress, const Utf8Str &strDescription);98 HRESULT setUpProgressFS(ComObjPtr<Progress> &pProgress, const Bstr &bstrDescription); 99 HRESULT setUpProgressImportS3(ComObjPtr<Progress> &pProgress, const Bstr &bstrDescription); 100 HRESULT setUpProgressWriteS3(ComObjPtr<Progress> &pProgress, const Bstr &bstrDescription); 101 101 102 102 struct LocationInfo; -
trunk/src/VBox/Main/include/ProgressImpl.h
r26550 r26553 52 52 HRESULT protectedInit(AutoInitSpan &aAutoInitSpan, 53 53 #if !defined (VBOX_COM_INPROC) 54 VirtualBox *aParent, 55 #endif 56 IUnknown *aInitiator, 57 const Utf8Str &strDescription, 58 OUT_GUID aId = NULL); 54 VirtualBox *aParent, 55 #endif 56 IUnknown *aInitiator, 57 CBSTR aDescription, OUT_GUID aId = NULL); 59 58 HRESULT protectedInit(AutoInitSpan &aAutoInitSpan); 60 59 void protectedUninit(AutoUninitSpan &aAutoUninitSpan); … … 106 105 107 106 const Guid mId; 108 const Utf8Str m_strDescription;107 const Bstr mDescription; 109 108 110 109 uint64_t m_ullTimestamp; // progress object creation timestamp, for ETA computation … … 127 126 128 127 ULONG m_ulCurrentOperation; // operations counter, incremented with each setNextOperation() 129 Utf8Str m_strOperationDescription;// name of current operation; initially from constructor, changed with setNextOperation()128 Bstr m_bstrOperationDescription; // name of current operation; initially from constructor, changed with setNextOperation() 130 129 ULONG m_ulCurrentOperationWeight; // weight of current operation, given to setNextOperation() 131 130 ULONG m_ulOperationPercent; // percentage of current operation, set with setCurrentOperationProgress() … … 177 176 #endif 178 177 IUnknown *aInitiator, 179 const Utf8Str &strDescription,178 CBSTR aDescription, 180 179 BOOL aCancelable, 181 180 OUT_GUID aId = NULL) … … 186 185 #endif 187 186 aInitiator, 188 strDescription,187 aDescription, 189 188 aCancelable, 190 189 1, // cOperations 191 190 1, // ulTotalOperationsWeight 192 strDescription, // bstrFirstOperationDescription191 aDescription, // bstrFirstOperationDescription 193 192 1, // ulFirstOperationWeight 194 193 aId); … … 212 211 #endif 213 212 IUnknown *aInitiator, 214 const Utf8Str &strDescription, 215 BOOL aCancelable, 213 CBSTR aDescription, BOOL aCancelable, 216 214 ULONG cOperations, 217 const Utf8Str &strFirstOperationDescription,215 CBSTR bstrFirstOperationDescription, 218 216 OUT_GUID aId = NULL) 219 217 { … … 223 221 #endif 224 222 aInitiator, 225 strDescription,223 aDescription, 226 224 aCancelable, 227 225 cOperations, // cOperations 228 226 cOperations, // ulTotalOperationsWeight = cOperations 229 strFirstOperationDescription, // bstrFirstOperationDescription227 bstrFirstOperationDescription, // bstrFirstOperationDescription 230 228 1, // ulFirstOperationWeight: weigh them all the same 231 229 aId); … … 237 235 #endif 238 236 IUnknown *aInitiator, 239 const Utf8Str &strDescription,237 CBSTR aDescription, 240 238 BOOL aCancelable, 241 239 ULONG cOperations, 242 240 ULONG ulTotalOperationsWeight, 243 const Utf8Str &strFirstOperationDescription,241 CBSTR bstrFirstOperationDescription, 244 242 ULONG ulFirstOperationWeight, 245 243 OUT_GUID aId = NULL); … … 247 245 HRESULT init(BOOL aCancelable, 248 246 ULONG aOperationCount, 249 const Utf8Str &strOperationDescription);247 CBSTR aOperationDescription); 250 248 251 249 void uninit(); -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r26550 r26553 246 246 ComObjPtr<Machine> *machine = NULL); 247 247 248 HRESULT findHardDisk(const Guid *aId, const Utf8Str *pstrLocation,248 HRESULT findHardDisk(const Guid *aId, CBSTR aLocation, 249 249 bool aSetError, ComObjPtr<Medium> *aHardDisk = NULL); 250 HRESULT findDVDImage(const Guid *aId, const Utf8Str *pstrLocation,250 HRESULT findDVDImage(const Guid *aId, CBSTR aLocation, 251 251 bool aSetError, ComObjPtr<Medium> *aImage = NULL); 252 HRESULT findFloppyImage(const Guid *aId, const Utf8Str *pstrLocation,252 HRESULT findFloppyImage(const Guid *aId, CBSTR aLocation, 253 253 bool aSetError, ComObjPtr<Medium> *aImage = NULL); 254 254 -
trunk/src/VBox/Main/xml/Settings.cpp
r26550 r26553 195 195 strLine = Utf8StrFmt(" (line %RU32)", pNode->getLineNumber()); 196 196 197 const char *pcsz = strLine.c_str(); 197 198 Utf8StrFmt str(N_("Error in %s%s -- %s"), 198 199 file->m->strFilename.c_str(), 199 strLine.c_str(),200 (pcsz) ? pcsz : "", 200 201 strWhat.c_str()); 201 202
Note:
See TracChangeset
for help on using the changeset viewer.