VirtualBox

Changeset 51630 in vbox


Ignore:
Timestamp:
Jun 17, 2014 12:52:44 PM (10 years ago)
Author:
vboxsync
Message:

Main/Console: fix severe BSTR vs. Bstr related regressions from wrapper conversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r51614 r51630  
    26962696            Global::stringifyMachineState(mMachineState));
    26972697
    2698     return mControl->AdoptSavedState(BSTR(aSavedStateFile.c_str()));
     2698    return mControl->AdoptSavedState(Bstr(aSavedStateFile.c_str()).raw());
    26992699}
    27002700
     
    28282828
    28292829    /* Request the device capture */
    2830     return mControl->CaptureUSBDevice(BSTR(aId.toString().c_str()));
     2830    return mControl->CaptureUSBDevice(Bstr(aId.toString()).raw());
    28312831
    28322832#else   /* !VBOX_WITH_USB */
     
    28672867     */
    28682868    alock.release();
    2869     HRESULT rc = mControl->DetachUSBDevice(BSTR(aId.toString().c_str()), false /* aDone */);
     2869    HRESULT rc = mControl->DetachUSBDevice(Bstr(aId.toString()).raw(), false /* aDone */);
    28702870    if (FAILED(rc))
    28712871    {
     
    28822882        /* Request the device release. Even if it fails, the device will
    28832883         * remain as held by proxy, which is OK for us (the VM process). */
    2884         rc = mControl->DetachUSBDevice(BSTR(aId.toString().c_str()), true /* aDone */);
     2884        rc = mControl->DetachUSBDevice(Bstr(aId.toString()).raw(), true /* aDone */);
    28852885    }
    28862886    else
     
    29492949        rc = devsvec[i]->COMGETTER(Id)(id.asOutParam());
    29502950        if (FAILED(rc)) return rc;
    2951         if (id == BSTR(aId.toString().c_str()))
     2951        if (Utf8Str(id) == aId.toString())
    29522952        {
    29532953            ComObjPtr<OUSBDevice> pUSBDevice;
     
    32353235    ComObjPtr<IProgress> iProgress;
    32363236    MachineState_T machineState = MachineState_Null;
    3237     HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, BSTR(aId.toString().c_str()), BSTR(aId.toString().c_str()), FALSE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam());
     3237    HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, Bstr(aId.toString()).raw(), Bstr(aId.toString()).raw(), FALSE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam());
    32383238    if (FAILED(rc)) return rc;
    32393239    iProgress.queryInterfaceTo(aProgress.asOutParam());
     
    32553255    ComObjPtr<IProgress> iProgress;
    32563256    MachineState_T machineState = MachineState_Null;
    3257     HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, BSTR(aId.toString().c_str()), BSTR(aId.toString().c_str()), TRUE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam());
     3257    HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, Bstr(aId.toString()).raw(), Bstr(aId.toString()).raw(), TRUE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam());
    32583258    if (FAILED(rc)) return rc;
    32593259    iProgress.queryInterfaceTo(aProgress.asOutParam());
     
    32743274    ComObjPtr<IProgress> iProgress;
    32753275    MachineState_T machineState = MachineState_Null;
    3276     HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, BSTR(aStartId.toString().c_str()), BSTR(aEndId.toString().c_str()), FALSE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam());
     3276    HRESULT rc = mControl->DeleteSnapshot((IConsole *)this, Bstr(aStartId.toString()).raw(), Bstr(aEndId.toString()).raw(), FALSE /* fDeleteAllChildren */, &machineState, iProgress.asOutParam());
    32773277    if (FAILED(rc)) return rc;
    32783278    iProgress.queryInterfaceTo(aProgress.asOutParam());
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette