VirtualBox

Changeset 19239 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 28, 2009 1:19:14 PM (16 years ago)
Author:
vboxsync
Message:

Main: support for using VBox from Python on Windows (still certain limitation apply, such as enum visibility)

Location:
trunk/src/VBox
Files:
101 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r19134 r19239  
    446446              VBOX_VERSION_STRING);
    447447
    448     Guid id;
     448    Bstr id;
    449449    /* the below cannot be Bstr because on Linux Bstr doesn't work until XPCOM (nsMemory) is initialized */
    450450    const char *name = NULL;
     
    518518        {
    519519            case 's':
    520                 id = ValueUnion.psz;
     520                id = asGuidStr(ValueUnion.psz);
    521521                /* If the argument was not a UUID, then it must be a name. */
    522522                if (!id)
     
    693693
    694694        Log (("VBoxHeadless: Opening a session with machine (id={%s})...\n",
    695               id.toString().raw()));
     695              Utf8Str(id).raw()));
    696696
    697697        // open a session
  • trunk/src/VBox/Frontends/VBoxHeadless/testcase/tstHeadless.cpp

    r16530 r19239  
    9494
    9595        // find ID by name
    96         Guid id;
     96        Bstr id;
    9797        {
    9898            ComPtr <IMachine> m;
  • trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp

    r18491 r19239  
    414414    ComPtr<IMachine> machine;
    415415    /* assume it's a UUID */
    416     rc = aVirtualBox->GetMachine(Guid(argv[0]), machine.asOutParam());
     416    rc = aVirtualBox->GetMachine(Bstr(argv[0]), machine.asOutParam());
    417417    if (FAILED(rc) || !machine)
    418418    {
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r18901 r19239  
    281281    ComPtr<IMachine> machine;
    282282    /* assume it's a UUID */
    283     rc = a->virtualBox->GetMachine(Guid(VMName), machine.asOutParam());
     283    rc = a->virtualBox->GetMachine(Guid(VMName).toUtf16(), machine.asOutParam());
    284284    if (FAILED(rc) || !machine)
    285285    {
     
    289289    if (machine)
    290290    {
    291         Guid uuid;
     291        Bstr uuid;
    292292        machine->COMGETTER(Id)(uuid.asOutParam());
    293293        machine = NULL;
     
    373373        if (!settingsFile)
    374374            CHECK_ERROR_BREAK(a->virtualBox,
    375                 CreateMachine(name, osTypeId, baseFolder, Guid(id), machine.asOutParam()));
     375                CreateMachine(name, osTypeId, baseFolder, Guid(id).toUtf16(), machine.asOutParam()));
    376376        else
    377377            CHECK_ERROR_BREAK(a->virtualBox,
    378                 CreateLegacyMachine(name, osTypeId, settingsFile, Guid(id), machine.asOutParam()));
     378                CreateLegacyMachine(name, osTypeId, settingsFile, Guid(id).toUtf16(), machine.asOutParam()));
    379379
    380380        CHECK_ERROR_BREAK(machine, SaveSettings());
     
    383383            CHECK_ERROR_BREAK(a->virtualBox, RegisterMachine(machine));
    384384        }
    385         Guid uuid;
     385        Bstr uuid;
    386386        CHECK_ERROR_BREAK(machine, COMGETTER(Id)(uuid.asOutParam()));
    387387        CHECK_ERROR_BREAK(machine, COMGETTER(SettingsFilePath)(settingsFile.asOutParam()));
     
    390390                 "Settings file: '%ls'\n",
    391391                 name.raw(), fRegister ? " and registered" : "",
    392                  uuid.toString().raw(), settingsFile.raw());
     392                 Utf8Str(uuid).raw(), settingsFile.raw());
    393393    }
    394394    while (0);
     
    500500    ComPtr<IMachine> machine;
    501501    /* assume it's a UUID */
    502     rc = a->virtualBox->GetMachine(Guid(VMName), machine.asOutParam());
     502    rc = a->virtualBox->GetMachine(Guid(VMName).toUtf16(), machine.asOutParam());
    503503    if (FAILED(rc) || !machine)
    504504    {
     
    508508    if (machine)
    509509    {
    510         Guid uuid;
     510        Bstr uuid;
    511511        machine->COMGETTER(Id)(uuid.asOutParam());
    512512
     
    561561    /* try to find the given machine */
    562562    ComPtr <IMachine> machine;
    563     Guid uuid (a->argv[0]);
    564     if (!uuid.isEmpty())
     563    Bstr uuid (a->argv[0]);
     564    if (!Guid(uuid).isEmpty())
    565565    {
    566566        CHECK_ERROR (a->virtualBox, GetMachine (uuid, machine.asOutParam()));
     
    568568    else
    569569    {
    570         CHECK_ERROR (a->virtualBox, FindMachine (Bstr(a->argv[0]), machine.asOutParam()));
     570        CHECK_ERROR (a->virtualBox, FindMachine (uuid, machine.asOutParam()));
    571571        if (SUCCEEDED (rc))
    572572            machine->COMGETTER(Id) (uuid.asOutParam());
     
    788788            bool attach = !strcmp(a->argv[1], "usbattach");
    789789
    790             Guid usbId = a->argv [2];
    791             if (usbId.isEmpty())
     790            Bstr usbId = a->argv [2];
     791            if (Guid(usbId).isEmpty())
    792792            {
    793793                // assume address
     
    904904            {
    905905                /* first assume it's a UUID */
    906                 Guid uuid(a->argv[2]);
     906                Bstr uuid(a->argv[2]);
    907907                ComPtr<IDVDImage> dvdImage;
    908908                rc = a->virtualBox->GetDVDImage(uuid, dvdImage.asOutParam());
     
    914914                    if (!dvdImage)
    915915                    {
    916                         Guid emptyUUID;
     916                        Bstr emptyUUID;
    917917                        CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(a->argv[2]), emptyUUID, dvdImage.asOutParam()));
    918918                    }
     
    966966            {
    967967                /* first assume it's a UUID */
    968                 Guid uuid(a->argv[2]);
     968                Bstr uuid(a->argv[2]);
    969969                ComPtr<IFloppyImage> floppyImage;
    970970                rc = a->virtualBox->GetFloppyImage(uuid, floppyImage.asOutParam());
     
    976976                    if (!floppyImage)
    977977                    {
    978                         Guid emptyUUID;
     978                        Bstr emptyUUID;
    979979                        CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(a->argv[2]), emptyUUID, floppyImage.asOutParam()));
    980980                    }
     
    10651065    ComPtr<IMachine> machine;
    10661066    /* assume it's a UUID */
    1067     rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     1067    rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    10681068    if (FAILED(rc) || !machine)
    10691069    {
     
    10761076        {
    10771077            /* we have to open a session for this task */
    1078             Guid guid;
     1078            Bstr guid;
    10791079            machine->COMGETTER(Id)(guid.asOutParam());
    10801080            CHECK_ERROR_BREAK(a->virtualBox, OpenSession(a->session, guid));
     
    11031103    ComPtr<IMachine> machine;
    11041104    /* assume it's a UUID */
    1105     rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     1105    rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    11061106    if (FAILED(rc) || !machine)
    11071107    {
     
    11141114        {
    11151115            /* we have to open a session for this task */
    1116             Guid guid;
     1116            Bstr guid;
    11171117            machine->COMGETTER(Id)(guid.asOutParam());
    11181118            CHECK_ERROR_BREAK(a->virtualBox, OpenSession(a->session, guid));
     
    11731173        ComPtr<IMachine> machine;
    11741174        /* assume it's a UUID */
    1175         rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     1175        rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    11761176        if (FAILED(rc) || !machine)
    11771177        {
     
    12351235        ComPtr<IMachine> machine;
    12361236        /* assume it's a UUID */
    1237         rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     1237        rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    12381238        if (FAILED(rc) || !machine)
    12391239        {
     
    13311331    ComPtr<IMachine> machine;
    13321332    /* assume it's a UUID */
    1333     rc = a->virtualBox->GetMachine(Guid(a->argv[1]), machine.asOutParam());
     1333    rc = a->virtualBox->GetMachine(Bstr(a->argv[1]), machine.asOutParam());
    13341334    if (FAILED(rc) || !machine)
    13351335    {
     
    13391339    if (!machine)
    13401340        return 1;
    1341     Guid uuid;
     1341    Bstr uuid;
    13421342    machine->COMGETTER(Id)(uuid.asOutParam());
    13431343
     
    15051505    /* try to find the given machine */
    15061506    ComPtr <IMachine> machine;
    1507     Guid uuid (a->argv[0]);
     1507    Bstr uuid (a->argv[0]);
    15081508    if (!uuid.isEmpty())
    15091509        CHECK_ERROR(a->virtualBox, GetMachine(uuid, machine.asOutParam()));
     
    17001700                 m != cvtMachines.end(); ++ m)
    17011701            {
    1702                 Guid id;
     1702                Bstr id;
    17031703                CHECK_ERROR_BREAK((*m), COMGETTER(Id) (id.asOutParam()));
    17041704
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp

    r19172 r19239  
    289289                    doClose = !fRemember;
    290290
    291                     Guid uuid;
     291                    Bstr uuid;
    292292                    CHECK_ERROR(hardDisk, COMGETTER(Id)(uuid.asOutParam()));
    293293
     
    297297                    }
    298298
    299                     RTPrintf("Disk image created. UUID: %s\n", uuid.toString().raw());
     299                    RTPrintf("Disk image created. UUID: %s\n", Utf8Str(uuid).raw());
    300300                }
    301301            }
     
    409409    /* first guess is that it's a UUID */
    410410    Guid uuid(FilenameOrUuid);
    411     rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
     411    rc = a->virtualBox->GetHardDisk(uuid.toUtf16(), hardDisk.asOutParam());
    412412    /* no? then it must be a filename */
    413413    if (!hardDisk)
     
    582582
    583583    /* first guess is that it's a UUID */
    584     Guid uuid(Utf8Str(src).raw());
    585     rc = a->virtualBox->GetHardDisk(uuid, srcDisk.asOutParam());
     584    rc = a->virtualBox->GetHardDisk(src, srcDisk.asOutParam());
    586585    /* no? then it must be a filename */
    587586    if (FAILED (rc))
     
    640639        }
    641640
     641        Bstr uuid;
    642642        CHECK_ERROR_BREAK(dstDisk, COMGETTER(Id)(uuid.asOutParam()));
    643643
    644644        RTPrintf("Clone hard disk created in format '%ls'. UUID: %s\n",
    645                  format.raw(), uuid.toString().raw());
     645                 format.raw(), Utf8Str(uuid).raw());
    646646    }
    647647    while (0);
     
    10371037        }
    10381038
    1039         Guid guid;
     1039        Bstr guid;
    10401040        CHECK_ERROR(hardDisk, COMGETTER(Id)(guid.asOutParam()));
    1041         RTPrintf("iSCSI disk created. UUID: %s\n", guid.toString().raw());
     1041        RTPrintf("iSCSI disk created. UUID: %s\n", Utf8Str(guid).raw());
    10421042    }
    10431043    while (0);
     
    10961096    bool unknown = false;
    10971097    /* first guess is that it's a UUID */
    1098     Guid uuid(FilenameOrUuid);
     1098    Bstr uuid(FilenameOrUuid);
    10991099    rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
    11001100    /* no? then it must be a filename */
     
    11311131
    11321132        hardDisk->COMGETTER(Id)(uuid.asOutParam());
    1133         RTPrintf("UUID:                 %s\n", uuid.toString().raw());
     1133        RTPrintf("UUID:                 %s\n", Utf8Str(uuid).raw());
    11341134
    11351135        /* check for accessibility */
     
    11901190        if (!unknown)
    11911191        {
    1192             com::SafeGUIDArray machineIds;
     1192            com::SafeArray<BSTR> machineIds;
    11931193            hardDisk->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(machineIds));
    11941194            for (size_t j = 0; j < machineIds.size(); ++ j)
     
    12001200                machine->COMGETTER(Name)(name.asOutParam());
    12011201                machine->COMGETTER(Id)(uuid.asOutParam());
    1202                 RTPrintf("%s%lS (UUID: %RTuuid)\n",
     1202                RTPrintf("%s%lS (UUID: %lS)\n",
    12031203                         j == 0 ? "In use by VMs:        " : "                      ",
    1204                          name.raw(), &machineIds[j]);
     1204                         name.raw(), machineIds[j]);
    12051205            }
    12061206            /// @todo NEWMEDIA check usage in snapshots too
     
    13561356            return errorSyntax(USAGE_OPENMEDIUM, "Invalid option for DVD images");
    13571357        ComPtr<IDVDImage> dvdImage;
    1358         rc = a->virtualBox->OpenDVDImage(Bstr(Filename), Guid(), dvdImage.asOutParam());
     1358        rc = a->virtualBox->OpenDVDImage(Bstr(Filename), Bstr(), dvdImage.asOutParam());
    13591359        if (rc == VBOX_E_FILE_ERROR)
    13601360        {
     
    13661366                return 1;
    13671367            }
    1368             CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(szFilenameAbs), Guid(), dvdImage.asOutParam()));
     1368            CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(szFilenameAbs), Bstr(), dvdImage.asOutParam()));
    13691369        }
    13701370        else if (FAILED(rc))
    1371             CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(Filename), Guid(), dvdImage.asOutParam()));
     1371            CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(Filename), Bstr(), dvdImage.asOutParam()));
    13721372    }
    13731373    else if (cmd == CMD_FLOPPY)
     
    13761376            return errorSyntax(USAGE_OPENMEDIUM, "Invalid option for DVD images");
    13771377        ComPtr<IFloppyImage> floppyImage;
    1378          rc = a->virtualBox->OpenFloppyImage(Bstr(Filename), Guid(), floppyImage.asOutParam());
     1378         rc = a->virtualBox->OpenFloppyImage(Bstr(Filename), Bstr(), floppyImage.asOutParam());
    13791379        if (rc == VBOX_E_FILE_ERROR)
    13801380        {
     
    13861386                return 1;
    13871387            }
    1388             CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(szFilenameAbs), Guid(), floppyImage.asOutParam()));
     1388            CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(szFilenameAbs), Bstr(), floppyImage.asOutParam()));
    13891389        }
    13901390        else if (FAILED(rc))
    1391             CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(Filename), Guid(), floppyImage.asOutParam()));
     1391            CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(Filename), Bstr(), floppyImage.asOutParam()));
    13921392    }
    13931393
     
    14711471
    14721472    /* first guess is that it's a UUID */
    1473     Guid uuid(FilenameOrUuid);
     1473    Bstr uuid(FilenameOrUuid);
    14741474
    14751475    if (cmd == CMD_DISK)
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp

    r19134 r19239  
    9696    NS_DECL_ISUPPORTS
    9797
    98     STDMETHOD(OnMachineStateChange)(IN_GUID machineId,
     98    STDMETHOD(OnMachineStateChange)(IN_BSTR machineId,
    9999                                    MachineState_T state)
    100100    {
     
    102102    }
    103103
    104     STDMETHOD(OnMachineDataChange)(IN_GUID machineId)
    105     {
    106         return S_OK;
    107     }
    108 
    109     STDMETHOD(OnExtraDataCanChange)(IN_GUID machineId, IN_BSTR key,
     104    STDMETHOD(OnMachineDataChange)(IN_BSTR machineId)
     105    {
     106        return S_OK;
     107    }
     108
     109    STDMETHOD(OnExtraDataCanChange)(IN_BSTR machineId, IN_BSTR key,
    110110                                    IN_BSTR value, BSTR *error,
    111111                                    BOOL *changeAllowed)
     
    118118    }
    119119
    120     STDMETHOD(OnExtraDataChange)(IN_GUID machineId, IN_BSTR key,
     120    STDMETHOD(OnExtraDataChange)(IN_BSTR machineId, IN_BSTR key,
    121121                                 IN_BSTR value)
    122122    {
     
    124124    }
    125125
    126     STDMETHOD(OnMediaRegistered)(IN_GUID mediaId,
     126    STDMETHOD(OnMediaRegistered)(IN_BSTR mediaId,
    127127                                 DeviceType_T mediaType, BOOL registered)
    128128    {
     
    133133    }
    134134
    135     STDMETHOD(OnMachineRegistered)(IN_GUID machineId, BOOL registered)
    136     {
    137         return S_OK;
    138     }
    139 
    140      STDMETHOD(OnSessionStateChange)(IN_GUID machineId,
     135    STDMETHOD(OnMachineRegistered)(IN_BSTR machineId, BOOL registered)
     136    {
     137        return S_OK;
     138    }
     139
     140     STDMETHOD(OnSessionStateChange)(IN_BSTR machineId,
    141141                                    SessionState_T state)
    142142    {
     
    144144    }
    145145
    146     STDMETHOD(OnSnapshotTaken)(IN_GUID aMachineId,
    147                                IN_GUID aSnapshotId)
    148     {
    149         return S_OK;
    150     }
    151 
    152     STDMETHOD(OnSnapshotDiscarded)(IN_GUID aMachineId,
    153                                    IN_GUID aSnapshotId)
    154     {
    155         return S_OK;
    156     }
    157 
    158     STDMETHOD(OnSnapshotChange)(IN_GUID aMachineId,
    159                                 IN_GUID aSnapshotId)
    160     {
    161         return S_OK;
    162     }
    163 
    164     STDMETHOD(OnGuestPropertyChange)(IN_GUID machineId,
     146    STDMETHOD(OnSnapshotTaken)(IN_BSTR aMachineId,
     147                               IN_BSTR aSnapshotId)
     148    {
     149        return S_OK;
     150    }
     151
     152    STDMETHOD(OnSnapshotDiscarded)(IN_BSTR aMachineId,
     153                                   IN_BSTR aSnapshotId)
     154    {
     155        return S_OK;
     156    }
     157
     158    STDMETHOD(OnSnapshotChange)(IN_BSTR aMachineId,
     159                                IN_BSTR aSnapshotId)
     160    {
     161        return S_OK;
     162    }
     163
     164    STDMETHOD(OnGuestPropertyChange)(IN_BSTR machineId,
    165165                                     IN_BSTR name, IN_BSTR value,
    166166                                     IN_BSTR flags)
     
    230230    ComPtr<IMachine> machine;
    231231    /* assume it's a UUID */
    232     rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     232    rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    233233    if (FAILED(rc) || !machine)
    234234    {
     
    238238    if (machine)
    239239    {
    240         Guid uuid;
     240        Bstr uuid;
    241241        machine->COMGETTER(Id)(uuid.asOutParam());
    242242
     
    299299    ComPtr<IMachine> machine;
    300300    /* assume it's a UUID */
    301     rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     301    rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    302302    if (FAILED(rc) || !machine)
    303303    {
     
    307307    if (machine)
    308308    {
    309         Guid uuid;
     309        Bstr uuid;
    310310        machine->COMGETTER(Id)(uuid.asOutParam());
    311311
     
    363363    ComPtr<IMachine> machine;
    364364    /* assume it's a UUID */
    365     HRESULT rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     365    HRESULT rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    366366    if (FAILED(rc) || !machine)
    367367    {
     
    371371    if (machine)
    372372    {
    373         Guid uuid;
     373        Bstr uuid;
    374374        machine->COMGETTER(Id)(uuid.asOutParam());
    375375
     
    422422    ComPtr<IMachine> machine;
    423423    /* assume it's a UUID */
    424     HRESULT rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     424    HRESULT rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    425425    if (FAILED(rc) || !machine)
    426426    {
     
    452452     * Set up the callback and wait.
    453453     */
    454     Guid uuid;
     454    Bstr uuid;
    455455    machine->COMGETTER(Id)(uuid.asOutParam());
    456456    GuestPropertyCallback *callback = new GuestPropertyCallback(pszPatterns, uuid);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp

    r18843 r19239  
    114114    CHECK_ERROR(host, FindHostNetworkInterfaceByName(name, hif.asOutParam()));
    115115
    116     GUID guid;
    117     CHECK_ERROR(hif, COMGETTER(Id)(&guid));
     116    Bstr guid;
     117    CHECK_ERROR(hif, COMGETTER(Id)(guid.asOutParam()));
    118118
    119119    ComPtr<IProgress> progress;
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp

    r18809 r19239  
    767767                    ComPtr<IMachine> machine;
    768768                    /* assume it's a UUID */
    769                     rc = a->virtualBox->GetMachine(Guid(strMachine), machine.asOutParam());
     769                    rc = a->virtualBox->GetMachine(Bstr(strMachine), machine.asOutParam());
    770770                    if (FAILED(rc) || !machine)
    771771                    {
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r18829 r19239  
    5252    /* start with the root */
    5353    Bstr name;
    54     Guid uuid;
     54    Bstr uuid;
    5555    rootSnapshot->COMGETTER(Name)(name.asOutParam());
    5656    rootSnapshot->COMGETTER(Id)(uuid.asOutParam());
     
    5959        /* print with hierarchical numbering */
    6060        RTPrintf("SnapshotName%lS=\"%lS\"\n", prefix.raw(), name.raw());
    61         RTPrintf("SnapshotUUID%lS=\"%s\"\n", prefix.raw(), uuid.toString().raw());
     61        RTPrintf("SnapshotUUID%lS=\"%s\"\n", prefix.raw(), Utf8Str(uuid).raw());
    6262    }
    6363    else
    6464    {
    6565        /* print with indentation */
    66         RTPrintf("   %lSName: %lS (UUID: %s)\n", prefix.raw(), name.raw(), uuid.toString().raw());
     66        RTPrintf("   %lSName: %lS (UUID: %s)\n", prefix.raw(), name.raw(), Utf8Str(uuid).raw());
    6767    }
    6868
     
    136136    CheckComRCReturnRC (rc);
    137137
    138     Guid uuid;
     138    Bstr uuid;
    139139    rc = machine->COMGETTER(Id) (uuid.asOutParam());
    140140
     
    142142    {
    143143        if (details == VMINFO_COMPACT)
    144             RTPrintf("\"<inaccessible>\" {%s}\n", uuid.toString().raw());
     144            RTPrintf("\"<inaccessible>\" {%s}\n", Utf8Str(uuid).raw());
    145145        else
    146146        {
     
    150150                RTPrintf ("Name:            <inaccessible!>\n");
    151151            if (details == VMINFO_MACHINEREADABLE)
    152                 RTPrintf ("UUID=\"%s\"\n", uuid.toString().raw());
     152                RTPrintf ("UUID=\"%s\"\n", Utf8Str(uuid).raw());
    153153            else
    154                 RTPrintf ("UUID:            %s\n", uuid.toString().raw());
     154                RTPrintf ("UUID:            %s\n", Utf8Str(uuid).raw());
    155155            if (details != VMINFO_MACHINEREADABLE)
    156156            {
     
    174174    if (details == VMINFO_COMPACT)
    175175    {
    176         RTPrintf("\"%lS\" {%s}\n", machineName.raw(), uuid.toString().raw());
     176        RTPrintf("\"%lS\" {%s}\n", machineName.raw(), Utf8Str(uuid).raw());
    177177        return S_OK;
    178178    }
     
    195195
    196196    if (details == VMINFO_MACHINEREADABLE)
    197         RTPrintf("UUID=\"%s\"\n", uuid.toString().raw());
    198     else
    199         RTPrintf("UUID:            %s\n", uuid.toString().raw());
     197        RTPrintf("UUID=\"%s\"\n", Utf8Str(uuid).raw());
     198    else
     199        RTPrintf("UUID:            %s\n", Utf8Str(uuid).raw());
    200200
    201201    Bstr settingsFilePath;
     
    398398                        Bstr imagePath;
    399399                        floppyImage->COMGETTER(Location)(imagePath.asOutParam());
    400                         Guid imageGuid;
     400                        Bstr imageGuid;
    401401                        floppyImage->COMGETTER(Id)(imageGuid.asOutParam());
    402402                        if (details == VMINFO_MACHINEREADABLE)
    403403                        {
    404                             RTPrintf("FloppyImageUUID=\"%s\"\n", imageGuid.toString().raw());
     404                            RTPrintf("FloppyImageUUID=\"%s\"\n", Utf8Str(imageGuid).raw());
    405405                            pszFloppy = Utf8StrFmt("%lS", imagePath.raw());
    406406                        }
    407407                        else
    408                             pszFloppy = Utf8StrFmt("%lS (UUID: %s)", imagePath.raw(), imageGuid.toString().raw());
     408                            pszFloppy = Utf8StrFmt("%lS (UUID: %s)", imagePath.raw(), Utf8Str(imageGuid).raw());
    409409                    }
    410410                    break;
     
    482482                {
    483483                    RTPrintf("sataport%d=\"%lS\"\n", i, filePath.raw());
    484                     RTPrintf("SataPortImageUUID%d=\"%s\"\n", i, uuid.toString().raw());
     484                    RTPrintf("SataPortImageUUID%d=\"%s\"\n", i, Utf8Str(uuid).raw());
    485485                }
    486486                else
    487                     RTPrintf("SATA %d:          %lS (UUID: %s)\n", i, filePath.raw(), uuid.toString().raw());
     487                    RTPrintf("SATA %d:          %lS (UUID: %s)\n", i, filePath.raw(), Utf8Str(uuid).raw());
    488488            }
    489489            else
     
    539539        {
    540540            RTPrintf("hda=\"%lS\"\n", filePath.raw());
    541             RTPrintf("HdaImageUUID=\"%s\"\n", uuid.toString().raw());
    542         }
    543         else
    544             RTPrintf("Primary master:  %lS (UUID: %s)\n", filePath.raw(), uuid.toString().raw());
     541            RTPrintf("HdaImageUUID=\"%s\"\n", Utf8Str(uuid).raw());
     542        }
     543        else
     544            RTPrintf("Primary master:  %lS (UUID: %s)\n", filePath.raw(), Utf8Str(uuid).raw());
    545545    }
    546546    else
     
    557557        {
    558558            RTPrintf("hdb=\"%lS\"\n", filePath.raw());
    559             RTPrintf("HdbImageUUID=\"%s\"\n", uuid.toString().raw());
    560         }
    561         else
    562             RTPrintf("Primary slave:   %lS (UUID: %s)\n", filePath.raw(), uuid.toString().raw());
     559            RTPrintf("HdbImageUUID=\"%s\"\n", Utf8Str(uuid).raw());
     560        }
     561        else
     562            RTPrintf("Primary slave:   %lS (UUID: %s)\n", filePath.raw(), Utf8Str(uuid).raw());
    563563    }
    564564    else
     
    575575        {
    576576            RTPrintf("hdd=\"%lS\"\n", filePath.raw());
    577             RTPrintf("HddImageUUID=\"%s\"\n", uuid.toString().raw());
    578         }
    579         else
    580             RTPrintf("Secondary slave: %lS (UUID: %s)\n", filePath.raw(), uuid.toString().raw());
     577            RTPrintf("HddImageUUID=\"%s\"\n", Utf8Str(uuid).raw());
     578        }
     579        else
     580            RTPrintf("Secondary slave: %lS (UUID: %s)\n", filePath.raw(), Utf8Str(uuid).raw());
    581581    }
    582582    else
     
    600600                {
    601601                    RTPrintf("dvd=\"%lS\"\n", filePath.raw());
    602                     RTPrintf("DvdImageUUID=\"%s\"\n", uuid.toString().raw());
     602                    RTPrintf("DvdImageUUID=\"%s\"\n", Utf8Str(uuid).raw());
    603603                }
    604604                else
    605                     RTPrintf("DVD:             %lS (UUID: %s)\n", filePath.raw(), uuid.toString().raw());
     605                    RTPrintf("DVD:             %lS (UUID: %s)\n", filePath.raw(), Utf8Str(uuid).raw());
    606606            }
    607607        }
     
    12251225
    12261226                        /* Query info. */
    1227                         Guid id;
     1227                        Bstr id;
    12281228                        CHECK_ERROR_RET (dev, COMGETTER(Id)(id.asOutParam()), rc);
    12291229                        USHORT usVendorId;
     
    12391239                                     "USBRemoteProductId%zu=\"%#06x\"\n"
    12401240                                     "USBRemoteRevision%zu=\"%#04x%02x\"\n",
    1241                                      index + 1, id.toString().raw(),
     1241                                     index + 1, Utf8Str(id).raw(),
    12421242                                     index + 1, usVendorId,
    12431243                                     index + 1, usProductId,
     
    12481248                                     "ProductId:          0x%04x (%04X)\n"
    12491249                                     "Revision:           %u.%u (%02u%02u)\n",
    1250                                      id.toString().raw(),
     1250                                     Utf8Str(id).raw(),
    12511251                                     usVendorId, usVendorId, usProductId, usProductId,
    12521252                                     bcdRevision >> 8, bcdRevision & 0xff,
     
    13141314
    13151315                        /* Query info. */
    1316                         Guid id;
     1316                        Bstr id;
    13171317                        CHECK_ERROR_RET (dev, COMGETTER(Id)(id.asOutParam()), rc);
    13181318                        USHORT usVendorId;
     
    13281328                                     "USBAttachedProductId%zu=\"%#06x\"\n"
    13291329                                     "USBAttachedRevision%zu=\"%#04x%02x\"\n",
    1330                                      index + 1, id.toString().raw(),
     1330                                     index + 1, Utf8Str(id).raw(),
    13311331                                     index + 1, usVendorId,
    13321332                                     index + 1, usProductId,
     
    13371337                                     "ProductId:          0x%04x (%04X)\n"
    13381338                                     "Revision:           %u.%u (%02u%02u)\n",
    1339                                      id.toString().raw(),
     1339                                     Utf8Str(id).raw(),
    13401340                                     usVendorId, usVendorId, usProductId, usProductId,
    13411341                                     bcdRevision >> 8, bcdRevision & 0xff,
     
    18261826     */
    18271827    ComPtr<ISnapshot> snapshot;
    1828     rc = machine->GetSnapshot(Guid(), snapshot.asOutParam());
     1828    rc = machine->GetSnapshot(Bstr(), snapshot.asOutParam());
    18291829    if (SUCCEEDED(rc) && snapshot)
    18301830    {
     
    19121912    /* try to find the given machine */
    19131913    ComPtr <IMachine> machine;
    1914     Guid uuid (VMNameOrUuid);
     1914    Bstr uuid (VMNameOrUuid);
    19151915    if (!uuid.isEmpty())
    19161916    {
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r19216 r19239  
    336336                networkInterface->COMGETTER(Name)(interfaceName.asOutParam());
    337337                RTPrintf("Name:            %lS\n", interfaceName.raw());
    338                 Guid interfaceGuid;
     338                Bstr interfaceGuid;
    339339                networkInterface->COMGETTER(Id)(interfaceGuid.asOutParam());
    340                 RTPrintf("GUID:            %lS\n", Bstr(interfaceGuid.toString()).raw());
     340                RTPrintf("GUID:            %lS\n", interfaceGuid);
    341341                BOOL bDhcpEnabled;
    342342                networkInterface->COMGETTER(DhcpEnabled)(&bDhcpEnabled);
     
    511511            {
    512512                ComPtr<IHardDisk> hdd = hdds[i];
    513                 Guid uuid;
     513                Bstr uuid;
    514514                hdd->COMGETTER(Id)(uuid.asOutParam());
    515                 RTPrintf("UUID:         %s\n", uuid.toString().raw());
     515                RTPrintf("UUID:         %s\n", Utf8Str(uuid).raw());
    516516                Bstr format;
    517517                hdd->COMGETTER(Format)(format.asOutParam());
     
    525525                hdd->COMGETTER(State)(&enmState);
    526526                RTPrintf("Accessible:   %s\n", enmState != MediaState_Inaccessible ? "yes" : "no");
    527                 com::SafeGUIDArray machineIds;
     527                com::SafeArray<BSTR> machineIds;
    528528                hdd->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(machineIds));
    529529                for (size_t j = 0; j < machineIds.size(); ++ j)
     
    535535                    machine->COMGETTER(Name)(name.asOutParam());
    536536                    machine->COMGETTER(Id)(uuid.asOutParam());
    537                     RTPrintf("%s%lS (UUID: %RTuuid)\n",
     537                    RTPrintf("%s%lS (UUID: %lS)\n",
    538538                            j == 0 ? "Usage:        " : "              ",
    539                             name.raw(), &machineIds[j]);
     539                            name.raw(), machineIds[j]);
    540540                }
    541541                /// @todo NEWMEDIA check usage in snapshots too
     
    554554            {
    555555                ComPtr<IDVDImage> dvdImage = dvds[i];
    556                 Guid uuid;
     556                Bstr uuid;
    557557                dvdImage->COMGETTER(Id)(uuid.asOutParam());
    558                 RTPrintf("UUID:       %s\n", uuid.toString().raw());
     558                RTPrintf("UUID:       %s\n", Utf8Str(uuid).raw());
    559559                Bstr filePath;
    560560                dvdImage->COMGETTER(Location)(filePath.asOutParam());
     
    576576            {
    577577                ComPtr<IFloppyImage> floppyImage = floppies[i];
    578                 Guid uuid;
     578                Bstr uuid;
    579579                floppyImage->COMGETTER(Id)(uuid.asOutParam());
    580                 RTPrintf("UUID:       %s\n", uuid.toString().raw());
     580                RTPrintf("UUID:       %s\n", Utf8Str(uuid).raw());
    581581                Bstr filePath;
    582582                floppyImage->COMGETTER(Location)(filePath.asOutParam());
     
    612612
    613613                    /* Query info. */
    614                     Guid id;
     614                    Bstr id;
    615615                    CHECK_ERROR_RET (dev, COMGETTER(Id)(id.asOutParam()), 1);
    616616                    USHORT usVendorId;
     
    625625                            "ProductId:          0x%04x (%04X)\n"
    626626                            "Revision:           %u.%u (%02u%02u)\n",
    627                             id.toString().raw(),
     627                            Utf8Str(id).raw(),
    628628                            usVendorId, usVendorId, usProductId, usProductId,
    629629                            bcdRevision >> 8, bcdRevision & 0xff,
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r19023 r19239  
    839839    /* try to find the given machine */
    840840    ComPtr <IMachine> machine;
    841     Guid uuid (a->argv[0]);
    842     if (!uuid.isEmpty())
     841    Bstr uuid (a->argv[0]);
     842    if (!Guid(uuid).isEmpty())
    843843    {
    844844        CHECK_ERROR (a->virtualBox, GetMachine (uuid, machine.asOutParam()));
     
    11061106            {
    11071107                /* first guess is that it's a UUID */
    1108                 Guid uuid(hdds[0]);
     1108                Bstr uuid(hdds[0]);
    11091109                ComPtr<IHardDisk> hardDisk;
    11101110                rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
     
    11391139            {
    11401140                /* first guess is that it's a UUID */
    1141                 Guid uuid(hdds[1]);
     1141                Bstr uuid(hdds[1]);
    11421142                ComPtr<IHardDisk> hardDisk;
    11431143                rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
     
    11721172            {
    11731173                /* first guess is that it's a UUID */
    1174                 Guid uuid(hdds[2]);
     1174                Bstr uuid(hdds[2]);
    11751175                ComPtr<IHardDisk> hardDisk;
    11761176                rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
     
    12401240            {
    12411241                /* first assume it's a UUID */
    1242                 Guid uuid(dvd);
     1242                Bstr uuid(dvd);
    12431243                ComPtr<IDVDImage> dvdImage;
    12441244                rc = a->virtualBox->GetDVDImage(uuid, dvdImage.asOutParam());
     
    12501250                    if (!dvdImage)
    12511251                    {
    1252                         Guid emptyUUID;
     1252                        Bstr emptyUUID;
    12531253                        CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(dvd), emptyUUID, dvdImage.asOutParam()));
    12541254                    }
     
    13381338                {
    13391339                    /* first assume it's a UUID */
    1340                     Guid uuid(floppy);
     1340                    Bstr uuid(floppy);
    13411341                    ComPtr<IFloppyImage> floppyImage;
    13421342                    rc = a->virtualBox->GetFloppyImage(uuid, floppyImage.asOutParam());
     
    13481348                        if (!floppyImage)
    13491349                        {
    1350                             Guid emptyUUID;
     1350                            Bstr emptyUUID;
    13511351                            CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(floppy), emptyUUID, floppyImage.asOutParam()));
    13521352                        }
     
    18891889                {
    18901890                    /* first guess is that it's a UUID */
    1891                     Guid uuid(hdds[i]);
     1891                    Bstr uuid(hdds[i]);
    18921892                    ComPtr<IHardDisk> hardDisk;
    18931893                    rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
     
    19781978                {
    19791979                    /* first guess is that it's a UUID */
    1980                     Guid uuid(hdds[i]);
     1980                    Bstr uuid(hdds[i]);
    19811981                    ComPtr<IHardDisk> hardDisk;
    19821982                    rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp

    r18777 r19239  
    4747    ComPtr<IMachine> machine;
    4848    /* assume it's a UUID */
    49     rc = a->virtualBox->GetMachine(Guid(a->argv[0]), machine.asOutParam());
     49    rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    5050    if (FAILED(rc) || !machine)
    5151    {
     
    5555    if (!machine)
    5656        return 1;
    57     Guid guid;
     57    Bstr guid;
    5858    machine->COMGETTER(Id)(guid.asOutParam());
    5959
     
    117117
    118118            /* assume it's a UUID */
    119             Guid guid(a->argv[2]);
     119            Bstr guid(a->argv[2]);
    120120            if (!guid.isEmpty())
    121121            {
     
    203203            {
    204204                /* assume it's a UUID */
    205                 Guid guid(a->argv[2]);
     205                Bstr guid(a->argv[2]);
    206206                if (!guid.isEmpty())
    207207                {
     
    266266
    267267            /* assume it's a UUID */
    268             Guid guid(a->argv[2]);
     268            Bstr guid(a->argv[2]);
    269269            if (!guid.isEmpty())
    270270            {
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp

    r18779 r19239  
    234234                    {
    235235                        /* assume it's a UUID of a machine */
    236                         rc = a->virtualBox->GetMachine(Guid(a->argv[i]), cmd.mMachine.asOutParam());
     236                        rc = a->virtualBox->GetMachine(Bstr(a->argv[i]), cmd.mMachine.asOutParam());
    237237                        if (FAILED(rc) || !cmd.mMachine)
    238238                        {
     
    388388                    {
    389389                        /* assume it's a UUID of a machine */
    390                         rc = a->virtualBox->GetMachine(Guid(a->argv[i]), cmd.mMachine.asOutParam());
     390                        rc = a->virtualBox->GetMachine(Bstr(a->argv[i]), cmd.mMachine.asOutParam());
    391391                        if (FAILED(rc) || !cmd.mMachine)
    392392                        {
     
    416416    else
    417417    {
    418         Guid uuid;
     418        Bstr uuid;
    419419        cmd.mMachine->COMGETTER(Id)(uuid.asOutParam());
    420420        /* open a session for the VM */
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r19134 r19239  
    286286    NS_DECL_ISUPPORTS
    287287
    288     STDMETHOD(OnMachineStateChange)(IN_GUID machineId, MachineState_T state)
     288    STDMETHOD(OnMachineStateChange)(IN_BSTR machineId, MachineState_T state)
    289289    {
    290290        return S_OK;
    291291    }
    292292
    293     STDMETHOD(OnMachineDataChange)(IN_GUID machineId)
     293    STDMETHOD(OnMachineDataChange)(IN_BSTR machineId)
    294294    {
    295295        return S_OK;
    296296    }
    297297
    298     STDMETHOD(OnExtraDataCanChange)(IN_GUID machineId, IN_BSTR key, IN_BSTR value,
     298    STDMETHOD(OnExtraDataCanChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value,
    299299                                    BSTR *error, BOOL *changeAllowed)
    300300    {
     
    306306    }
    307307
    308     STDMETHOD(OnExtraDataChange)(IN_GUID machineId, IN_BSTR key, IN_BSTR value)
     308    STDMETHOD(OnExtraDataChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value)
    309309    {
    310310#ifdef VBOX_SECURELABEL
     
    315315             * check if we're interested in the message
    316316             */
    317             Guid ourGuid;
    318             Guid messageGuid = machineId;
     317            Bstr ourGuid;
    319318            gMachine->COMGETTER(Id)(ourGuid.asOutParam());
    320             if (ourGuid == messageGuid)
     319            if (ourGuid == machineId)
    321320            {
    322321                Bstr keyString = key;
     
    337336    }
    338337
    339     STDMETHOD(OnMediaRegistered) (IN_GUID mediaId, DeviceType_T mediaType,
     338    STDMETHOD(OnMediaRegistered) (IN_BSTR mediaId, DeviceType_T mediaType,
    340339                                  BOOL registered)
    341340    {
     
    346345    }
    347346
    348     STDMETHOD(OnMachineRegistered)(IN_GUID machineId, BOOL registered)
     347    STDMETHOD(OnMachineRegistered)(IN_BSTR machineId, BOOL registered)
    349348    {
    350349        return S_OK;
    351350    }
    352351
    353     STDMETHOD(OnSessionStateChange)(IN_GUID machineId, SessionState_T state)
     352    STDMETHOD(OnSessionStateChange)(IN_BSTR machineId, SessionState_T state)
    354353    {
    355354        return S_OK;
    356355    }
    357356
    358     STDMETHOD(OnSnapshotTaken) (IN_GUID aMachineId, IN_GUID aSnapshotId)
     357    STDMETHOD(OnSnapshotTaken) (IN_BSTR aMachineId, IN_BSTR aSnapshotId)
    359358    {
    360359        return S_OK;
    361360    }
    362361
    363     STDMETHOD(OnSnapshotDiscarded) (IN_GUID aMachineId, IN_GUID aSnapshotId)
     362    STDMETHOD(OnSnapshotDiscarded) (IN_BSTR aMachineId, IN_BSTR aSnapshotId)
    364363    {
    365364        return S_OK;
    366365    }
    367366
    368     STDMETHOD(OnSnapshotChange) (IN_GUID aMachineId, IN_GUID aSnapshotId)
     367    STDMETHOD(OnSnapshotChange) (IN_BSTR aMachineId, IN_BSTR aSnapshotId)
    369368    {
    370369        return S_OK;
    371370    }
    372371
    373     STDMETHOD(OnGuestPropertyChange)(IN_GUID machineId, IN_BSTR key, IN_BSTR value, IN_BSTR flags)
     372    STDMETHOD(OnGuestPropertyChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value, IN_BSTR flags)
    374373    {
    375374        return S_OK;
     
    916915                 m != cvtMachines.end(); ++ m)
    917916            {
    918                 Guid id;
     917                Bstr id;
    919918                CHECK_ERROR_BREAK((*m), COMGETTER(Id) (id.asOutParam()));
    920919
     
    16641663        if ((rc == S_OK) && aMachine)
    16651664        {
    1666             aMachine->COMGETTER(Id)(uuid.asOutParam());
     1665            Bstr id;
     1666            aMachine->COMGETTER(Id)(id.asOutParam());
     1667            uuid = Guid(id);
    16671668        }
    16681669        else
     
    16821683    AssertReleaseRC(rc);
    16831684
    1684     rc = virtualBox->OpenSession(session, uuid);
     1685    rc = virtualBox->OpenSession(session, uuid.toUtf16());
    16851686    if (FAILED(rc))
    16861687    {
     
    17431744             * Go and attach it!
    17441745             */
    1745             Guid uuid;
     1746            Bstr uuid;
    17461747            hardDisk->COMGETTER(Id)(uuid.asOutParam());
    17471748            gMachine->DetachHardDisk(Bstr("IDE"), 0, 0);
     
    18021803                /* try to add to the list */
    18031804                RTPrintf ("Adding floppy image '%S'...\n", fdaFile);
    1804                 Guid uuid;
    1805                 CHECK_ERROR_BREAK (virtualBox, OpenFloppyImage (medium, uuid,
     1805                CHECK_ERROR_BREAK (virtualBox, OpenFloppyImage (medium, Bstr(),
    18061806                                                                image.asOutParam()));
    18071807            }
    18081808
    18091809            /* attach */
    1810             Guid uuid;
     1810            Bstr uuid;
    18111811            image->COMGETTER(Id)(uuid.asOutParam());
    18121812            CHECK_ERROR_BREAK (drive, MountImage (uuid));
     
    18631863                /* try to add to the list */
    18641864                RTPrintf ("Adding ISO image '%S'...\n", cdromFile);
    1865                 Guid uuid;
    1866                 CHECK_ERROR_BREAK (virtualBox, OpenDVDImage (medium, uuid,
     1865                CHECK_ERROR_BREAK (virtualBox, OpenDVDImage (medium, Bstr(),
    18671866                                                             image.asOutParam()));
    18681867            }
    18691868
    18701869            /* attach */
    1871             Guid uuid;
     1870            Bstr uuid;
    18721871            image->COMGETTER(Id)(uuid.asOutParam());
    18731872            CHECK_ERROR_BREAK (drive, MountImage (uuid));
  • trunk/src/VBox/Frontends/VBoxShell/mscom/vboxshell.py

    r18705 r19239  
    3939    sys.exit(1)
    4040
    41 ctx = {'mgr':mgr, 'vb':vbox, 'ifaces':win32com.client.constants,
    42        'remote':False, 'perf':PerfCollector(vbox) }
     41# fake constants, while get resolved constants issues for real
     42# win32com.client.constants doesn't work for some reasons
     43class DummyInterfaces: pass
     44class SessionState:pass
     45
     46DummyInterfaces.SessionState=SessionState()
     47DummyInterfaces.SessionState.Open = 2
     48
     49ctx = {'mgr':mgr, 'vb':vbox, 'ifaces':DummyInterfaces(),
     50#'ifaces':win32com.client.constants,
     51       'remote':False, 'type':'mscom' }
    4352
    4453interpret(ctx)
  • trunk/src/VBox/Frontends/VBoxShell/shellcommon.py

    r18693 r19239  
    177177        # we ignore exceptions to allow starting VM even if
    178178        # perf collector cannot be started
    179         try:
     179        if perf:
     180          try:
    180181            perf.setup(['*'], [mach], 10, 15)
    181         except:
     182          except Exception,e:
    182183            print e
    183184            if g_verbose:
     
    192193
    193194def getMachines(ctx):
    194     return ctx['vb'].getMachines()
     195    # XPCOM brigde has trouble with array attributes
     196    if ctx['type'] == 'xpcom':
     197       return ctx['vb'].getMachines()
     198    else:
     199       return ctx['vb'].machines
    195200
    196201def asState(var):
     
    201206
    202207def guestStats(ctx,mach):
     208    if not ctx['perf']:
     209        return
    203210    for metric in ctx['perf'].query(["*"], [mach]):
    204211        print metric['name'], metric['values_as_string']
     
    427434      print "Processor #%d speed: %dMHz" %(i,host.getProcessorSpeed(i))
    428435
    429    for metric in ctx['perf'].query(["*"], [host]):
     436   if ctx['perf']:
     437     for metric in ctx['perf'].query(["*"], [host]):
    430438       print metric['name'], metric['values_as_string']
    431439
     
    488496    print "Running VirtualBox version %s" %(vbox.version)
    489497
    490     ctx['perf'] = PerfCollector(vbox)
     498    # MSCOM doesn't work with collector yet
     499    if ctx['type'] != 'mscom':
     500       ctx['perf'] = PerfCollector(vbox)
     501    else:
     502       ctx['perf'] = None
    491503
    492504    autoCompletion(commands, ctx)
     
    494506    # to allow to print actual host information, we collect info for
    495507    # last 150 secs maximum, (sample every 10 secs and keep up to 15 samples)
    496     try:
     508    if ctx['perf']:
     509      try:
    497510        ctx['perf'].setup(['*'], [vbox.host], 10, 15)
    498     except:
     511      except:
    499512        pass
    500513
     
    516529    try:
    517530        # There is no need to disable metric collection. This is just an example.
    518         ctx['perf'].disable(['*'], [vbox.host])
     531        if ct['perf']:
     532           ctx['perf'].disable(['*'], [vbox.host])
    519533    except:
    520534        pass
  • trunk/src/VBox/Frontends/VBoxShell/ws/vboxshell.py

    r18693 r19239  
    3232
    3333ctx = {'mgr':mgr, 'vb':vbox, 'ifaces': g_reflectionInfo, 'remote': True,
    34        'perf':PerfCollector(vbox)}
     34       'type':'ws'}
    3535
    3636interpret(ctx)
  • trunk/src/VBox/Frontends/VBoxShell/xpcom/vboxshell.py

    r18705 r19239  
    4343
    4444ctx = {'mgr':mgr, 'vb':vbox, 'ifaces':xpcom.components.interfaces,
    45        'remote':False, 'perf':PerfCollector(vbox)}
     45       'remote':False, 'type':'xpcom' }
    4646
    4747interpret(ctx)
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r19203 r19239  
    2525
    2626#include "COMDefs.h"
     27#include "VBox/com/Guid.h"
    2728
    2829#include "VBoxGlobalSettings.h"
     
    5152{
    5253public:
    53     VBoxMachineStateChangeEvent (const QUuid &aId, KMachineState aState)
     54    VBoxMachineStateChangeEvent (const QString &aId, KMachineState aState)
    5455        : QEvent ((QEvent::Type) VBoxDefs::MachineStateChangeEventType)
    5556        , id (aId), state (aState)
    5657        {}
    5758
    58     const QUuid id;
     59    const QString id;
    5960    const KMachineState state;
    6061};
     
    6364{
    6465public:
    65     VBoxMachineDataChangeEvent (const QUuid &aId)
     66    VBoxMachineDataChangeEvent (const QString &aId)
    6667        : QEvent ((QEvent::Type) VBoxDefs::MachineDataChangeEventType)
    6768        , id (aId)
    6869        {}
    6970
    70     const QUuid id;
     71    const QString id;
    7172};
    7273
     
    7475{
    7576public:
    76     VBoxMachineRegisteredEvent (const QUuid &aId, bool aRegistered)
     77    VBoxMachineRegisteredEvent (const QString &aId, bool aRegistered)
    7778        : QEvent ((QEvent::Type) VBoxDefs::MachineRegisteredEventType)
    7879        , id (aId), registered (aRegistered)
    7980        {}
    8081
    81     const QUuid id;
     82    const QString id;
    8283    const bool registered;
    8384};
     
    8687{
    8788public:
    88     VBoxSessionStateChangeEvent (const QUuid &aId, KSessionState aState)
     89    VBoxSessionStateChangeEvent (const QString &aId, KSessionState aState)
    8990        : QEvent ((QEvent::Type) VBoxDefs::SessionStateChangeEventType)
    9091        , id (aId), state (aState)
    9192        {}
    9293
    93     const QUuid id;
     94    const QString id;
    9495    const KSessionState state;
    9596};
     
    101102    enum What { Taken, Discarded, Changed };
    102103
    103     VBoxSnapshotEvent (const QUuid &aMachineId, const QUuid &aSnapshotId,
     104    VBoxSnapshotEvent (const QString &aMachineId, const QString &aSnapshotId,
    104105                       What aWhat)
    105106        : QEvent ((QEvent::Type) VBoxDefs::SnapshotEventType)
     
    110111    const What what;
    111112
    112     const QUuid machineId;
    113     const QUuid snapshotId;
     113    const QString machineId;
     114    const QString snapshotId;
    114115};
    115116
     
    285286    bool trayIconInstall();
    286287#endif
    287     QUuid managedVMUuid() const { return vmUuid; }
     288    QString managedVMUuid() const { return vmUuid; }
    288289
    289290    VBoxDefs::RenderMode vmRenderMode() const { return vm_render_mode; }
     
    609610    { checkForAutoConvertedSettings (true); }
    610611
    611     CSession openSession (const QUuid &aId, bool aExisting = false);
     612    CSession openSession (const QString &aId, bool aExisting = false);
    612613
    613614    /** Shortcut to openSession (aId, true). */
    614     CSession openExistingSession (const QUuid &aId) { return openSession (aId, true); }
    615 
    616     bool startMachine (const QUuid &id);
     615    CSession openExistingSession (const QString &aId) { return openSession (aId, true); }
     616
     617    bool startMachine (const QString &id);
    617618
    618619    void startEnumeratingMedia();
     
    634635    void addMedium (const VBoxMedium &);
    635636    void updateMedium (const VBoxMedium &);
    636     void removeMedium (VBoxDefs::MediaType, const QUuid &);
     637    void removeMedium (VBoxDefs::MediaType, const QString &);
    637638
    638639    bool findMedium (const CMedium &, VBoxMedium &) const;
     
    795796
    796797    /** Emitted when the media is removed using #removeMedia(). */
    797     void mediumRemoved (VBoxDefs::MediaType, const QUuid &);
     798    void mediumRemoved (VBoxDefs::MediaType, const QString &);
    798799
    799800    /* signals emitted when the VirtualBox callback is called by the server
     
    852853    VBoxUpdateDlg *mUpdDlg;
    853854
    854     QUuid vmUuid;
     855    QString vmUuid;
    855856
    856857#ifdef VBOX_GUI_WITH_SYSTRAY
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaComboBox.h

    r13580 r19239  
    3535public:
    3636
    37     typedef QMap <QUuid, QUuid> BaseToDiffMap;
     37    typedef QMap <QString, QString> BaseToDiffMap;
    3838
    3939    VBoxMediaComboBox (QWidget *aParent);
     
    4242    void repopulate();
    4343
    44     QUuid id (int = -1) const;
     44    QString id (int = -1) const;
    4545    QString location (int = -1) const;
    4646
    47     void setCurrentItem (const QUuid &aItemId);
     47    void setCurrentItem (const QString &aItemId);
    4848    void setType (VBoxDefs::MediaType aMediaType);
    49     void setMachineId (const QUuid &aMachineId = QUuid());
     49    void setMachineId (const QString &aMachineId = QString::null);
    5050
    5151    void setShowDiffs (bool aShowDiffs);
     
    5959    void mediumAdded (const VBoxMedium &);
    6060    void mediumUpdated (const VBoxMedium &);
    61     void mediumRemoved (VBoxDefs::MediaType, const QUuid &);
     61    void mediumRemoved (VBoxDefs::MediaType, const QString &);
    6262
    6363    void processActivated (int aIndex);
     
    7575    void replaceItem (int, const VBoxMedium &);
    7676
    77     bool findMediaIndex (const QUuid &aId, int &aIndex);
     77    bool findMediaIndex (const QString &aId, int &aIndex);
    7878
    7979    VBoxDefs::MediaType mType;
     
    8383    {
    8484        Medium() {}
    85         Medium (const QUuid &aId, const QString &aLocation,
     85        Medium (const QString &aId, const QString &aLocation,
    8686                const QString aToolTip)
    8787            : id (aId), location (aLocation), toolTip (aToolTip) {}
    8888
    89         QUuid id;
     89        QString id;
    9090        QString location;
    9191        QString toolTip;
     
    9595    Media mMedia;
    9696
    97     QUuid mLastId;
     97    QString mLastId;
    9898
    9999    bool mShowDiffs : 1;
    100100
    101     QUuid mMachineId;
     101    QString mMachineId;
    102102};
    103103
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaManagerDlg.h

    r13580 r19239  
    5252                bool aRefresh = true,
    5353                const CMachine &aSessionMachine = CMachine(),
    54                 const QUuid &aSelectId = QUuid(),
     54                const QString &aSelectId = QString::null,
    5555                bool aShowDiffs = true);
    5656
    5757    static void showModeless (QWidget *aParent = NULL, bool aRefresh = true);
    5858
    59     QUuid selectedId() const;
     59    QString selectedId() const;
    6060    QString selectedLocation() const;
    6161
     
    7777    void mediumAdded (const VBoxMedium &aMedium);
    7878    void mediumUpdated (const VBoxMedium &aMedium);
    79     void mediumRemoved (VBoxDefs::MediaType aType, const QUuid &aId);
     79    void mediumRemoved (VBoxDefs::MediaType aType, const QString &aId);
    8080
    8181    void mediumEnumStarted();
     
    8888    void doReleaseMedium();
    8989
    90     bool releaseMediumFrom (const VBoxMedium &aMedium, const QUuid &aMachineId);
     90    bool releaseMediumFrom (const VBoxMedium &aMedium, const QString &aMachineId);
    9191
    9292    void processCurrentChanged (int index = -1);
     
    117117    void updateTabIcons (MediaItem *aItem, ItemAction aAction);
    118118
    119     MediaItem* searchItem (QTreeWidget *aTree, const QUuid &aId) const;
     119    MediaItem* searchItem (QTreeWidget *aTree, const QString &aId) const;
    120120
    121121    bool checkMediumFor (MediaItem *aItem, Action aAction);
     
    162162    /* Machine */
    163163    CMachine mSessionMachine;
    164     QUuid mSessionMachineId;
     164    QString mSessionMachineId;
    165165    bool mHardDisksInaccessible;
    166166    bool mDVDImagesInaccessible;
    167167    bool mFloppyImagesInaccessible;
    168     QUuid mHDSelectedId;
    169     QUuid mDVDSelectedId;
    170     QUuid mFloppySelectedId;
     168    QString mHDSelectedId;
     169    QString mDVDSelectedId;
     170    QString mFloppySelectedId;
    171171};
    172172
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxMedium.h

    r17385 r19239  
    135135    const CFloppyImage &floppyImage() const { return mFloppyImage; }
    136136
    137     QUuid id() const { return mId; }
     137    QString id() const { return mId; }
    138138
    139139    QString location (bool aNoDiffs = false) const
     
    179179     * current state.
    180180     */
    181     bool isAttachedInCurStateTo (const QUuid &aMachineId) const
     181    bool isAttachedInCurStateTo (const QString &aMachineId) const
    182182        { return mCurStateMachineIds.indexOf (aMachineId) >= 0; }
    183183
     
    186186     * to in their current state (i.e. excluding snapshots).
    187187     */
    188     const QList <QUuid> &curStateMachineIds() const
     188    const QList <QString> &curStateMachineIds() const
    189189        { return mCurStateMachineIds; }
    190190
     
    235235    CFloppyImage mFloppyImage;
    236236
    237     QUuid mId;
     237    QString mId;
    238238    QString mLocation;
    239239    QString mName;
     
    250250    bool mIsUsedInSnapshots : 1;
    251251
    252     QList <QUuid> mCurStateMachineIds;
     252    QList <QString> mCurStateMachineIds;
    253253
    254254    VBoxMedium *mParent;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h

    r17730 r19239  
    7777    void vmSettings (const QString &aCategory = QString::null,
    7878                     const QString &aControl = QString::null,
    79                      const QUuid & = QUuid_null);
    80     void vmDelete (const QUuid & = QUuid_null);
    81     void vmStart (const QUuid & = QUuid_null);
    82     void vmDiscard (const QUuid & = QUuid_null);
    83     void vmPause (bool, const QUuid & = QUuid_null);
    84     void vmRefresh (const QUuid & = QUuid_null);
    85     void vmShowLogs (const QUuid & = QUuid_null);
     79                     const QString & = QString::null);
     80    void vmDelete (const QString & = QString::null);
     81    void vmStart (const QString & = QString::null);
     82    void vmDiscard (const QString & = QString::null);
     83    void vmPause (bool, const QString & = QString::null);
     84    void vmRefresh (const QString & = QString::null);
     85    void vmShowLogs (const QString & = QString::null);
    8686
    8787    void refreshVMList();
    88     void refreshVMItem (const QUuid &aID, bool aDetails,
     88    void refreshVMItem (const QString &aID, bool aDetails,
    8989                                          bool aSnapshots,
    9090                                          bool aDescription);
     
    189189#ifdef VBOX_GUI_WITH_SYSTRAY
    190190
    191 Q_DECLARE_METATYPE(QUuid);
     191Q_DECLARE_METATYPE(QString);
    192192
    193193class VBoxTrayIcon : public QSystemTrayIcon
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxSnapshotsWgt.h

    r10852 r19239  
    7373
    7474    void refreshAll (bool aKeepSelected = true);
    75     SnapshotWgtItem* findItem (const QUuid &aSnapshotId);
     75    SnapshotWgtItem* findItem (const QString &aSnapshotId);
    7676    SnapshotWgtItem* curStateItem();
    7777    void populateSnapshots (const CSnapshot &aSnapshot, QTreeWidgetItem *aItem);
    7878
    7979    CMachine         mMachine;
    80     QUuid            mMachineId;
     80    QString          mMachineId;
    8181    KSessionState    mSessionState;
    8282    SnapshotWgtItem *mCurSnapshotItem;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMListView.h

    r17412 r19239  
    4444    QString name() const { return mName; }
    4545    QIcon osIcon() const { return mAccessible ? vboxGlobal().vmGuestOSTypeIcon (mOSTypeId) : QPixmap (":/os_other.png"); }
    46     QUuid id() const { return mId; }
     46    QString id() const { return mId; }
    4747
    4848    QString sessionStateName() const;
     
    7070
    7171    /* Cached machine data (to minimize server requests) */
    72     QUuid mId;
     72    QString mId;
    7373    QString mSettingsFile;
    7474
     
    113113    void clear();
    114114
    115     VBoxVMItem *itemById (const QUuid &aId) const;
     115    VBoxVMItem *itemById (const QString &aId) const;
    116116    VBoxVMItem *itemByRow (int aRow) const;
    117     QModelIndex indexById (const QUuid &aId) const;
    118 
    119     int rowById (const QUuid &aId) const;;
     117    QModelIndex indexById (const QString &aId) const;
     118
     119    int rowById (const QString &aId) const;;
    120120
    121121    void sort (Qt::SortOrder aOrder = Qt::AscendingOrder) { sort (0, aOrder); }
     
    148148
    149149    void selectItemByRow (int row);
    150     void selectItemById (const QUuid &aID);
     150    void selectItemById (const QString &aID);
    151151    void ensureSomeRowSelected (int aRowHint);
    152152    VBoxVMItem * selectedItem() const;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsCD.h

    r13580 r19239  
    6565    QIWidgetValidator *mValidator;
    6666    QVector<CHostDVDDrive> mHostCDs;
    67     QUuid mUuidIsoCD;
     67    QString mUuidIsoCD;
    6868    QRadioButton *mLastSelected;
    6969};
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsFD.h

    r13580 r19239  
    6565    QIWidgetValidator *mValidator;
    6666    QVector<CHostFloppyDrive> mHostFDs;
    67     QUuid mUuidIsoFD;
     67    QString mUuidIsoFD;
    6868    QRadioButton *mLastSelected;
    6969};
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsHD.h

    r17884 r19239  
    7979public:
    8080    DiskValue()
    81         : id (QUuid())
     81        : id (QString::null)
    8282        , name (QString::null), tip (QString::null), pix (QPixmap()) {}
    83     DiskValue (const QUuid &aId);
     83    DiskValue (const QString &aId);
    8484    DiskValue (const DiskValue &aOther)
    8585        : id (aOther.id)
     
    105105    }
    106106
    107     QUuid  id;
     107    QString id;
    108108    QString name;
    109109    QString tip;
     
    382382
    383383    /* private functions */
    384     QUuid getWithMediaManager (const QUuid &aInitialId = QUuid());
    385     QUuid getWithNewHDWizard();
     384    QString getWithMediaManager (const QString &aInitialId = QString::null);
     385    QString getWithNewHDWizard();
    386386    int maxNameLength() const;
    387387    void prepareComboboxes();
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r19191 r19239  
    26632663    QString snapShotName = tr ("Snapshot %1");
    26642664    QRegExp regExp (QString ("^") + snapShotName.arg ("([0-9]+)") + QString ("$"));
    2665     CSnapshot index = cmachine.GetSnapshot (QUuid());
     2665    CSnapshot index = cmachine.GetSnapshot (QString::null);
    26662666    while (!index.isNull())
    26672667    {
     
    28932893{
    28942894    CVirtualBox vbox = vboxGlobal().virtualBox();
    2895     QUuid uuid;
     2895    QString uuid;
    28962896
    28972897    CDVDImage image = vbox.FindDVDImage (aSource);
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxExportApplianceWzd.cpp

    r18625 r19239  
    228228            icon = vboxGlobal().vmGuestOSTypeIcon (m->GetOSTypeId()).scaled (16, 16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
    229229            name = m->GetName();
    230             uuid = m->GetId().toString();
     230            uuid = m->GetId();
    231231            enabled = m->GetSessionState() == KSessionState_Closed;
    232232        }
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r19215 r19239  
    8585
    8686#include <VBox/sup.h>
     87#include <VBox/com/Guid.h>
    8788
    8889#include <iprt/asm.h>
     
    211212    // a deadlock.
    212213
    213     STDMETHOD(OnMachineStateChange) (IN_GUID id, MachineState_T state)
    214     {
    215         postEvent (new VBoxMachineStateChangeEvent (COMBase::ToQUuid (id),
     214    STDMETHOD(OnMachineStateChange) (IN_BSTR id, MachineState_T state)
     215    {
     216        postEvent (new VBoxMachineStateChangeEvent (QString::fromUtf16(id),
    216217                                                    (KMachineState) state));
    217218        return S_OK;
    218219    }
    219220
    220     STDMETHOD(OnMachineDataChange) (IN_GUID id)
    221     {
    222         postEvent (new VBoxMachineDataChangeEvent (COMBase::ToQUuid (id)));
     221    STDMETHOD(OnMachineDataChange) (IN_BSTR id)
     222    {
     223        postEvent (new VBoxMachineDataChangeEvent (QString::fromUtf16(id)));
    223224        return S_OK;
    224225    }
    225226
    226     STDMETHOD(OnExtraDataCanChange)(IN_GUID id,
     227    STDMETHOD(OnExtraDataCanChange)(IN_BSTR id,
    227228                                    IN_BSTR key, IN_BSTR value,
    228229                                    BSTR *error, BOOL *allowChange)
     
    231232            return E_INVALIDARG;
    232233
    233         if (COMBase::ToQUuid (id).isNull())
     234        if (com::asGuidStr(id).isNull())
    234235        {
    235236            /* it's a global extra data key someone wants to change */
     
    310311    }
    311312
    312     STDMETHOD(OnExtraDataChange) (IN_GUID id,
     313    STDMETHOD(OnExtraDataChange) (IN_BSTR id,
    313314                                  IN_BSTR key, IN_BSTR value)
    314315    {
    315         if (COMBase::ToQUuid (id).isNull())
     316        if (com::asGuidStr(id).isNull())
    316317        {
    317318            QString sKey = QString::fromUtf16 (key);
     
    394395    }
    395396
    396     STDMETHOD(OnMediaRegistered) (IN_GUID id, DeviceType_T type,
     397    STDMETHOD(OnMediaRegistered) (IN_BSTR id, DeviceType_T type,
    397398                                  BOOL registered)
    398399    {
     
    404405    }
    405406
    406     STDMETHOD(OnMachineRegistered) (IN_GUID id, BOOL registered)
    407     {
    408         postEvent (new VBoxMachineRegisteredEvent (COMBase::ToQUuid (id),
     407    STDMETHOD(OnMachineRegistered) (IN_BSTR id, BOOL registered)
     408    {
     409        postEvent (new VBoxMachineRegisteredEvent (QString::fromUtf16(id),
    409410                                                   registered));
    410411        return S_OK;
    411412    }
    412413
    413     STDMETHOD(OnSessionStateChange) (IN_GUID id, SessionState_T state)
    414     {
    415         postEvent (new VBoxSessionStateChangeEvent (COMBase::ToQUuid (id),
     414    STDMETHOD(OnSessionStateChange) (IN_BSTR id, SessionState_T state)
     415    {
     416        postEvent (new VBoxSessionStateChangeEvent (QString::fromUtf16(id),
    416417                                                    (KSessionState) state));
    417418        return S_OK;
    418419    }
    419420
    420     STDMETHOD(OnSnapshotTaken) (IN_GUID aMachineId, IN_GUID aSnapshotId)
    421     {
    422         postEvent (new VBoxSnapshotEvent (COMBase::ToQUuid (aMachineId),
    423                                           COMBase::ToQUuid (aSnapshotId),
     421    STDMETHOD(OnSnapshotTaken) (IN_BSTR aMachineId, IN_BSTR aSnapshotId)
     422    {
     423        postEvent (new VBoxSnapshotEvent (QString::fromUtf16(aMachineId),
     424                                          QString::fromUtf16(aSnapshotId),
    424425                                          VBoxSnapshotEvent::Taken));
    425426        return S_OK;
    426427    }
    427428
    428     STDMETHOD(OnSnapshotDiscarded) (IN_GUID aMachineId, IN_GUID aSnapshotId)
    429     {
    430         postEvent (new VBoxSnapshotEvent (COMBase::ToQUuid (aMachineId),
    431                                           COMBase::ToQUuid (aSnapshotId),
     429    STDMETHOD(OnSnapshotDiscarded) (IN_BSTR aMachineId, IN_BSTR aSnapshotId)
     430    {
     431        postEvent (new VBoxSnapshotEvent (QString::fromUtf16(aMachineId),
     432                                          QString::fromUtf16(aSnapshotId),
    432433                                          VBoxSnapshotEvent::Discarded));
    433434        return S_OK;
    434435    }
    435436
    436     STDMETHOD(OnSnapshotChange) (IN_GUID aMachineId, IN_GUID aSnapshotId)
    437     {
    438         postEvent (new VBoxSnapshotEvent (COMBase::ToQUuid (aMachineId),
    439                                           COMBase::ToQUuid (aSnapshotId),
     437    STDMETHOD(OnSnapshotChange) (IN_BSTR aMachineId, IN_BSTR aSnapshotId)
     438    {
     439        postEvent (new VBoxSnapshotEvent (QString::fromUtf16(aMachineId),
     440                                          QString::fromUtf16(aSnapshotId),
    440441                                          VBoxSnapshotEvent::Changed));
    441442        return S_OK;
    442443    }
    443444
    444     STDMETHOD(OnGuestPropertyChange) (IN_GUID /* id */,
     445    STDMETHOD(OnGuestPropertyChange) (IN_BSTR /* id */,
    445446                                      IN_BSTR /* key */,
    446447                                      IN_BSTR /* value */,
     
    23692370 *                      session.
    23702371 */
    2371 CSession VBoxGlobal::openSession (const QUuid &aId, bool aExisting /* = false */)
     2372CSession VBoxGlobal::openSession (const QString &aId, bool aExisting /* = false */)
    23722373{
    23732374    CSession session;
     
    24052406 *  Starts a machine with the given ID.
    24062407 */
    2407 bool VBoxGlobal::startMachine (const QUuid &id)
     2408bool VBoxGlobal::startMachine (const QString &id)
    24082409{
    24092410    AssertReturn (mValid, false);
     
    27022703 * @sa #currentMediaList()
    27032704 */
    2704 void VBoxGlobal::removeMedium (VBoxDefs::MediaType aType, const QUuid &aId)
     2705void VBoxGlobal::removeMedium (VBoxDefs::MediaType aType, const QString &aId)
    27052706{
    27062707    VBoxMediaList::Iterator it;
     
    53735374            {
    53745375                QString param = QString (qApp->argv() [i]);
    5375                 QUuid uuid = QUuid (param);
     5376                QUuid uuid = QUuid(param);         
    53765377                if (!uuid.isNull())
    53775378                {
    5378                     vmUuid = uuid;
     5379                    vmUuid = param;
    53795380                }
    53805381                else
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaComboBox.cpp

    r13641 r19239  
    2626#include <QDir>
    2727#include <QAbstractItemView>
    28 #include <QUuid>
    2928
    3029VBoxMediaComboBox::VBoxMediaComboBox (QWidget *aParent)
    3130    : QComboBox (aParent)
    3231    , mType (VBoxDefs::MediaType_Invalid)
    33     , mLastId (QUuid())
     32    , mLastId (QString::null)
    3433    , mShowDiffs (false)
    35     , mMachineId (QUuid())
     34    , mMachineId (QString::null)
    3635{
    3736    /* Setup the elide mode */
     
    5251    connect (&vboxGlobal(), SIGNAL (mediumUpdated (const VBoxMedium &)),
    5352             this, SLOT (mediumUpdated (const VBoxMedium &)));
    54     connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QUuid &)),
    55              this, SLOT (mediumRemoved (VBoxDefs::MediaType, const QUuid &)));
     53    connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QString &)),
     54             this, SLOT (mediumRemoved (VBoxDefs::MediaType, const QString &)));
    5655
    5756    /* Setup other connections */
     
    101100}
    102101
    103 QUuid VBoxMediaComboBox::id (int aIndex /*= -1*/) const
    104 {
    105     QUuid uuidNull; /* gcc-3.3 hack */
     102QString VBoxMediaComboBox::id (int aIndex /*= -1*/) const
     103{
     104    QString uuidNull; /* gcc-3.3 hack */
    106105    AssertReturn (aIndex == -1 ||
    107106                  (aIndex >= 0 && aIndex < mMedia.size()),
     
    120119}
    121120
    122 void VBoxMediaComboBox::setCurrentItem (const QUuid &aId)
     121void VBoxMediaComboBox::setCurrentItem (const QString &aId)
    123122{
    124123    mLastId = aId;
     
    139138}
    140139
    141 void VBoxMediaComboBox::setMachineId (const QUuid &aMachineId)
     140void VBoxMediaComboBox::setMachineId (const QString &aMachineId)
    142141{
    143142    mMachineId = aMachineId;
     
    221220
    222221void VBoxMediaComboBox::mediumRemoved (VBoxDefs::MediaType aType,
    223                                        const QUuid &aId)
     222                                       const QString &aId)
    224223{
    225224    if (mType != aType)
     
    258257
    259258    mMedia.append (
    260         Medium (QUuid(), QString::null,
     259        Medium (QString::null, QString::null,
    261260                tr ("No media available. Use the Virtual Media "
    262261                    "Manager to add media of the corresponding type.")));
     
    339338 * @param aIndex    Where to store the found media index.
    340339 */
    341 bool VBoxMediaComboBox::findMediaIndex (const QUuid &aId, int &aIndex)
     340bool VBoxMediaComboBox::findMediaIndex (const QString &aId, int &aIndex)
    342341{
    343342    aIndex = 0;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp

    r18177 r19239  
    8888    KMediaState state() const { return mMedium.state (!mManager->showDiffs()); }
    8989
    90     QUuid id() const { return mMedium.id(); }
     90    QString id() const { return mMedium.id(); }
    9191    QString location() const { return mMedium.location (!mManager->showDiffs()); }
    9292
     
    455455                                 bool aRefresh /* = true */,
    456456                                 const CMachine &aSessionMachine /* = CMachine() */,
    457                                  const QUuid &aSelectId /* = QUuid() */,
     457                                 const QString &aSelectId /* = QString() */,
    458458                                 bool aShowDiffs /* = true */)
    459459{
     
    465465
    466466    mSessionMachine = aSessionMachine;
    467     mSessionMachineId = mSessionMachine.isNull() ? QUuid() : mSessionMachine.GetId();
     467    mSessionMachineId = mSessionMachine.isNull() ? QString::null : mSessionMachine.GetId();
    468468    mShowDiffs = mSessionMachine.isNull() ? true : aShowDiffs;
    469469
     
    509509             this, SLOT (mediumUpdated (const VBoxMedium &)));
    510510    /* Listen to "media remove" signals */
    511     connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QUuid &)),
    512              this, SLOT (mediumRemoved (VBoxDefs::MediaType, const QUuid &)));
     511    connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QString &)),
     512             this, SLOT (mediumRemoved (VBoxDefs::MediaType, const QString &)));
    513513
    514514    if (aRefresh && !vboxGlobal().isMediaEnumerationStarted())
     
    581581}
    582582
    583 QUuid VBoxMediaManagerDlg::selectedId() const
     583QString VBoxMediaManagerDlg::selectedId() const
    584584{
    585585    QTreeWidget *tree = currentTreeWidget();
    586     QUuid uuid;
     586    QString uuid;
    587587
    588588    MediaItem *item = toMediaItem (selectedItem (tree));
     
    786786            {
    787787                setCurrentItem (mHardDiskView, item);
    788                 mHDSelectedId = QUuid();
     788                mHDSelectedId = QString::null;
    789789            }
    790790            break;
     
    803803            {
    804804                setCurrentItem (mDVDView, item);
    805                 mDVDSelectedId = QUuid();
     805                mDVDSelectedId = QString::null;
    806806            }
    807807            break;
     
    820820            {
    821821                setCurrentItem (mFloppyView, item);
    822                 mFloppySelectedId = QUuid();
     822                mFloppySelectedId = QString::null;
    823823            }
    824824            break;
     
    888888
    889889void VBoxMediaManagerDlg::mediumRemoved (VBoxDefs::MediaType aType,
    890                                          const QUuid &aId)
     890                                         const QString &aId)
    891891{
    892892    /* Ignore non-interesting aMedium */
     
    10621062
    10631063    /* Remember ID/type as they may get lost after the closure/deletion */
    1064     QUuid id = item->id();
     1064    QString id = item->id();
    10651065    AssertReturnVoid (!id.isNull());
    10661066    VBoxDefs::MediaType type = item->type();
     
    11631163    CMachineVector machines;
    11641164
    1165     const QList <QUuid> &machineIds = item->medium().curStateMachineIds();
    1166     for (QList <QUuid>::const_iterator it = machineIds.begin();
     1165    const QList <QString> &machineIds = item->medium().curStateMachineIds();
     1166    for (QList <QString>::const_iterator it = machineIds.begin();
    11671167         it != machineIds.end(); ++ it)
    11681168    {
     
    11911191        return;
    11921192
    1193     for (QList <QUuid>::const_iterator it = machineIds.begin();
     1193    for (QList <QString>::const_iterator it = machineIds.begin();
    11941194         it != machineIds.end(); ++ it)
    11951195    {
     
    12061206
    12071207bool VBoxMediaManagerDlg::releaseMediumFrom (const VBoxMedium &aMedium,
    1208                                              const QUuid &aMachineId)
     1208                                             const QString &aMachineId)
    12091209{
    12101210    CSession session;
     
    15381538    AssertReturnVoid (!aLocation.isEmpty());
    15391539
    1540     QUuid uuid;
     1540    QString uuid;
    15411541    VBoxMedium medium;
    15421542
     
    17051705
    17061706MediaItem* VBoxMediaManagerDlg::searchItem (QTreeWidget *aTree,
    1707                                             const QUuid &aId) const
     1707                                            const QString &aId) const
    17081708{
    17091709    if (aId.isNull())
     
    18551855    mi = toMediaItem (mHardDiskView->currentItem());
    18561856    if (mHDSelectedId.isNull())
    1857         mHDSelectedId = mi ? mi->id() : QUuid();
     1857        mHDSelectedId = mi ? mi->id() : QString::null;
    18581858
    18591859    mi = toMediaItem (mDVDView->currentItem());
    18601860    if (mDVDSelectedId.isNull())
    1861         mDVDSelectedId = mi ? mi->id() : QUuid();
     1861        mDVDSelectedId = mi ? mi->id() : QString::null;
    18621862
    18631863    mi = toMediaItem (mFloppyView->currentItem());
    18641864    if (mFloppySelectedId.isNull())
    1865         mFloppySelectedId = mi ? mi->id() : QUuid();
     1865        mFloppySelectedId = mi ? mi->id() : QString::null;
    18661866
    18671867    /* Finally, clear all the lists...
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMedium.cpp

    r17385 r19239  
    178178    mCurStateMachineIds.clear();
    179179
    180     QVector <QUuid> machineIds = mMedium.GetMachineIds();
     180    QVector <QString> machineIds = mMedium.GetMachineIds();
    181181    if (machineIds.size() > 0)
    182182    {
     
    185185        CVirtualBox vbox = vboxGlobal().virtualBox();
    186186
    187         for (QVector <QUuid>::ConstIterator it = machineIds.begin();
     187        for (QVector <QString>::ConstIterator it = machineIds.begin();
    188188             it != machineIds.end(); ++ it)
    189189        {
     
    193193            QString snapshots;
    194194
    195             QVector <QUuid> snapIds = mMedium.GetSnapshotIds (*it);
    196             for (QVector <QUuid>::ConstIterator jt = snapIds.begin();
     195            QVector <QString> snapIds = mMedium.GetSnapshotIds (*it);
     196            for (QVector <QString>::ConstIterator jt = snapIds.begin();
    197197                 jt != snapIds.end(); ++ jt)
    198198            {
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxNewVMWzd.cpp

    r18699 r19239  
    204204    if (dlg.exec() == QDialog::Accepted)
    205205    {
    206         QUuid newId = dlg.selectedId();
     206        QString newId = dlg.selectedId();
    207207        if (mHDCombo->id() != newId)
    208208        {
     
    355355    if (mMachine.isNull())
    356356    {
    357         mMachine = vbox.CreateMachine (mLeName->text(), typeId, QString::null, QUuid());
     357        mMachine = vbox.CreateMachine (mLeName->text(), typeId, QString::null, QString::null);
    358358        if (!vbox.isOk())
    359359        {
     
    399399    {
    400400        bool success = false;
    401         QUuid machineId = mMachine.GetId();
     401        QString machineId = mMachine.GetId();
    402402        CSession session = vboxGlobal().openSession (machineId);
    403403        if (!session.isNull())
     
    440440    {
    441441        /* Remember ID as it may be lost after the deletion */
    442         QUuid id = mHardDisk.GetId();
     442        QString id = mHardDisk.GetId();
    443443
    444444        bool success = false;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r19132 r19239  
    646646        QString prevVMId = vbox.GetExtraData (VBoxDefs::GUI_LastVMSelected);
    647647
    648         mVMListView->selectItemById (QUuid (prevVMId));
     648        mVMListView->selectItemById (prevVMId);
    649649    }
    650650
     
    826826 */
    827827void VBoxSelectorWnd::vmSettings (const QString &aCategory, const QString &aControl,
    828                                   const QUuid &aUuid /*= QUuid_null*/)
     828                                  const QString &aUuid /*= QUuid_null*/)
    829829{
    830830    if (!aCategory.isEmpty() && aCategory [0] != '#')
     
    841841
    842842    // open a direct session to modify VM settings
    843     QUuid id = item->id();
     843    QString id = item->id();
    844844    CSession session = vboxGlobal().openSession (id);
    845845    if (session.isNull())
     
    877877}
    878878
    879 void VBoxSelectorWnd::vmDelete (const QUuid &aUuid /*= QUuid_null*/)
     879void VBoxSelectorWnd::vmDelete (const QString &aUuid /*= QUuid_null*/)
    880880{
    881881    VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() :
     
    887887    {
    888888        CVirtualBox vbox = vboxGlobal().virtualBox();
    889         QUuid id = item->id();
     889        QString id = item->id();
    890890        bool ok = false;
    891891        if (item->accessible())
     
    943943}
    944944
    945 void VBoxSelectorWnd::vmStart (const QUuid &aUuid /*= QUuid_null*/)
    946 {
    947     VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() :
     945void VBoxSelectorWnd::vmStart (const QString &aUuid /*= QUuid_null*/)
     946{
     947    QUuid uuid (aUuid);
     948    VBoxVMItem *item = uuid.isNull() ? mVMListView->selectedItem() :
    948949                       mVMModel->itemById (aUuid);
    949950
     
    951952
    952953    /* Are we called from the mVMListView's activated() signal? */
    953     if (aUuid.isNull())
     954    if (uuid.isNull())
    954955    {
    955956        /* We always get here when mVMListView emits the activated() signal,
     
    974975               ("Machine must be PoweredOff/Saved/Aborted"));
    975976
    976     QUuid id = item->id();
     977    QString id = item->id();
    977978    CVirtualBox vbox = vboxGlobal().virtualBox();
    978979    CSession session;
     
    10251026}
    10261027
    1027 void VBoxSelectorWnd::vmDiscard (const QUuid &aUuid /*= QUuid_null*/)
     1028void VBoxSelectorWnd::vmDiscard (const QString &aUuid /*= QUuid_null*/)
    10281029{
    10291030    VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() :
     
    10361037
    10371038    /* open a session to modify VM settings */
    1038     QUuid id = item->id();
     1039    QString id = item->id();
    10391040    CSession session;
    10401041    CVirtualBox vbox = vboxGlobal().virtualBox();
     
    10601061}
    10611062
    1062 void VBoxSelectorWnd::vmPause (bool aPause, const QUuid &aUuid /*= QUuid_null*/)
     1063void VBoxSelectorWnd::vmPause (bool aPause, const QString &aUuid /*= QUuid_null*/)
    10631064{
    10641065    VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() :
     
    10921093}
    10931094
    1094 void VBoxSelectorWnd::vmRefresh (const QUuid &aUuid /*= QUuid_null*/)
     1095void VBoxSelectorWnd::vmRefresh (const QString &aUuid /*= QUuid_null*/)
    10951096{
    10961097    VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() :
     
    11101111}
    11111112
    1112 void VBoxSelectorWnd::vmShowLogs (const QUuid &aUuid /*= QUuid_null*/)
     1113void VBoxSelectorWnd::vmShowLogs (const QString &aUuid /*= QUuid_null*/)
    11131114{
    11141115    VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() :
     
    11381139}
    11391140
    1140 void VBoxSelectorWnd::refreshVMItem (const QUuid &aID, bool aDetails,
     1141void VBoxSelectorWnd::refreshVMItem (const QString &aID, bool aDetails,
    11411142                                                       bool aSnapshots,
    11421143                                                       bool aDescription)
     
    18171818    {
    18181819        vID = pMenu->menuAction()->data();
    1819         if (vID.canConvert<QUuid>() && mVMModel)
    1820             pItem = mVMModel->itemById (qvariant_cast<QUuid>(vID));
     1820        if (vID.canConvert<QString>() && mVMModel)
     1821            pItem = mVMModel->itemById (qvariant_cast<QString>(vID));
    18211822    }
    18221823
     
    19351936    {
    19361937        vID = pMenu->menuAction()->data();
    1937         if (vID.canConvert<QUuid>() && mVMModel)
    1938             pItem = mVMModel->itemById (qvariant_cast<QUuid>(vID));
     1938        if (vID.canConvert<QString>() && mVMModel)
     1939            pItem = mVMModel->itemById (qvariant_cast<QString>(vID));
    19391940    }
    19401941
     
    20102011    {
    20112012        QVariant v = pAction->data();
    2012         if (v.canConvert<QUuid>() && mVMModel)
    2013             pItem = mVMModel->itemById (qvariant_cast<QUuid>(v));
     2013        if (v.canConvert<QString>() && mVMModel)
     2014            pItem = mVMModel->itemById (qvariant_cast<QString>(v));
    20142015    }
    20152016
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotsWgt.cpp

    r18006 r19239  
    103103
    104104    CSnapshot snapshot() const { return mSnapshot; }
    105     QUuid snapshotId() const { return mId; }
     105    QString snapshotId() const { return mId; }
    106106
    107107    void recache()
     
    210210    CMachine mMachine;
    211211
    212     QUuid mId;
     212    QString mId;
    213213    bool mOnline;
    214214    QString mDesc;
     
    346346    if (aMachine.isNull())
    347347    {
    348         mMachineId = QUuid();
     348        mMachineId = QString::null;
    349349        mSessionState = KSessionState_Null;
    350350    }
     
    456456    AssertReturn (item, (void) 0);
    457457
    458     QUuid snapId = item->snapshotId();
     458    QString snapId = item->snapshotId();
    459459    AssertReturn (!snapId.isNull(), (void) 0);
    460460
     
    710710    SnapshotEditBlocker guardBlock (mEditProtector);
    711711
    712     QUuid selected, selectedFirstChild;
     712    QString selected, selectedFirstChild;
    713713    if (aKeepSelected)
    714714    {
     
    735735    if (mMachine.GetSnapshotCount() > 0)
    736736    {
    737         CSnapshot snapshot = mMachine.GetSnapshot (QUuid());
     737        CSnapshot snapshot = mMachine.GetSnapshot (QString::null);
    738738
    739739        populateSnapshots (snapshot, 0);
     
    769769}
    770770
    771 SnapshotWgtItem* VBoxSnapshotsWgt::findItem (const QUuid &aSnapshotId)
     771SnapshotWgtItem* VBoxSnapshotsWgt::findItem (const QString &aSnapshotId)
    772772{
    773773    QTreeWidgetItemIterator it (mTreeWidget);
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMListView.cpp

    r17349 r19239  
    452452 *  Returns the list item with the given UUID.
    453453 */
    454 VBoxVMItem *VBoxVMModel::itemById (const QUuid &aId) const
     454VBoxVMItem *VBoxVMModel::itemById (const QString &aId) const
    455455{
    456456    foreach (VBoxVMItem *item, mVMItemList)
     
    465465}
    466466
    467 QModelIndex VBoxVMModel::indexById (const QUuid &aId) const
     467QModelIndex VBoxVMModel::indexById (const QString &aId) const
    468468{
    469469    int row = rowById (aId);
     
    474474}
    475475
    476 int VBoxVMModel::rowById (const QUuid &aId) const
     476int VBoxVMModel::rowById (const QString &aId) const
    477477{
    478478    for (int i=0; i < mVMItemList.count(); ++i)
     
    624624}
    625625
    626 void VBoxVMListView::selectItemById (const QUuid &aID)
     626void VBoxVMListView::selectItemById (const QString &aID)
    627627{
    628628    if (VBoxVMModel *m = qobject_cast <VBoxVMModel*> (model()))
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsCD.cpp

    r17238 r19239  
    112112            QFileInfo fi (src);
    113113            mRbIsoCD->setChecked (true);
    114             mUuidIsoCD = QUuid (img.GetId());
     114            mUuidIsoCD = QString(img.GetId());
    115115            mRbHostCD->setAutoExclusive (true);
    116116            mRbIsoCD->setAutoExclusive (true);
     
    243243void VBoxVMSettingsCD::onCbChange()
    244244{
    245     mUuidIsoCD = mGbCD->isChecked() ? mCbIsoCD->id() : QUuid();
     245    mUuidIsoCD = mGbCD->isChecked() ? mCbIsoCD->id() : QString::null;
    246246    emit cdChanged();
    247247    if (mValidator)
     
    251251void VBoxVMSettingsCD::showMediaManager()
    252252{
    253     QUuid oldId = mUuidIsoCD;
     253    QString oldId = mUuidIsoCD;
    254254    VBoxMediaManagerDlg dlg (this);
    255255
     
    257257               false /* aRefresh */, mMachine, mCbIsoCD->id());
    258258
    259     QUuid newId = dlg.exec() == QDialog::Accepted ?
     259    QString newId = dlg.exec() == QDialog::Accepted ?
    260260                  dlg.selectedId() : mCbIsoCD->id();
    261261    if (oldId != newId)
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsFD.cpp

    r17255 r19239  
    113113            QFileInfo fi (src);
    114114            mRbIsoFD->setChecked (true);
    115             mUuidIsoFD = QUuid (img.GetId());
     115            mUuidIsoFD = QString (img.GetId());
    116116            mRbHostFD->setAutoExclusive (true);
    117117            mRbIsoFD->setAutoExclusive (true);
     
    239239void VBoxVMSettingsFD::onCbChange()
    240240{
    241     mUuidIsoFD = mGbFD->isChecked() ? mCbIsoFD->id() : QUuid();
     241    mUuidIsoFD = mGbFD->isChecked() ? mCbIsoFD->id() : QString::null;
    242242    emit fdChanged();
    243243    if (mValidator)
     
    247247void VBoxVMSettingsFD::showMediaManager()
    248248{
    249     QUuid oldId = mUuidIsoFD;
     249    QString oldId = mUuidIsoFD;
    250250    VBoxMediaManagerDlg dlg (this);
    251251
     
    253253               false /* aRefresh */, mMachine, mCbIsoFD->id());
    254254
    255     QUuid newId = dlg.exec() == QDialog::Accepted ?
     255    QString newId = dlg.exec() == QDialog::Accepted ?
    256256                  dlg.selectedId() : mCbIsoFD->id();
    257257    if (oldId != newId)
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp

    r18692 r19239  
    6767
    6868/** Type to store disk data */
    69 DiskValue::DiskValue (const QUuid &aId)
     69DiskValue::DiskValue (const QString &aId)
    7070    : id (aId)
    7171    , name (QString::null), tip (QString::null), pix (QPixmap())
     
    634634    connect (&vboxGlobal(), SIGNAL (mediumUpdated (const VBoxMedium &)),
    635635             HDSettings::instance(), SLOT (update()));
    636     connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QUuid &)),
     636    connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QString &)),
    637637             HDSettings::instance(), SLOT (update()));
    638638
     
    841841    mNewAction->setEnabled (false);
    842842
    843     QUuid newId;
     843    QString newId;
    844844
    845845    {   /* Clear the focus */
     
    862862            int confirm = vboxProblem().confirmRunNewHDWzdOrVDM (this);
    863863            newId = confirm == QIMessageBox::Yes ? getWithNewHDWizard() :
    864                     confirm == QIMessageBox::No ? getWithMediaManager() : QUuid();
     864                    confirm == QIMessageBox::No ? getWithMediaManager() : QString::null;
    865865        }
    866866    }   /* Clear the focus */
     
    930930                       .value <DiskValue>());
    931931
    932     QUuid id = getWithMediaManager (current.id);
     932    QString id = getWithMediaManager (current.id);
    933933
    934934    if (!id.isNull())
     
    11481148}
    11491149
    1150 QUuid VBoxVMSettingsHD::getWithMediaManager (const QUuid &aInitialId)
     1150QString VBoxVMSettingsHD::getWithMediaManager (const QString &aInitialId)
    11511151{
    11521152    /* Run Media Manager */
     
    11591159               HDSettings::instance()->showDiffs());
    11601160
    1161     return dlg.exec() == QDialog::Accepted ? dlg.selectedId() : QUuid();
    1162 }
    1163 
    1164 QUuid VBoxVMSettingsHD::getWithNewHDWizard()
     1161    return dlg.exec() == QDialog::Accepted ? dlg.selectedId() : QString::null;
     1162}
     1163
     1164QString VBoxVMSettingsHD::getWithNewHDWizard()
    11651165{
    11661166    /* Run New HD Wizard */
    11671167    VBoxNewHDWzd dlg (this);
    11681168
    1169     return dlg.exec() == QDialog::Accepted ? dlg.hardDisk().GetId() : QUuid();
     1169    return dlg.exec() == QDialog::Accepted ? dlg.hardDisk().GetId() : QString::null;
    11701170}
    11711171
  • trunk/src/VBox/Main/ApplianceImpl.cpp

    r19165 r19239  
    18971897            const Utf8Str &strNameVBox = vsdeName.front()->strVbox;
    18981898            rc = pVirtualBox->CreateMachine(Bstr(strNameVBox), Bstr(strOsTypeVBox),
    1899                                                  Bstr(), Guid(),
     1899                                                 Bstr(), Bstr(),
    19001900                                                 pNewMachine.asOutParam());
    19011901            if (FAILED(rc)) throw rc;
     
    21722172            if (FAILED(rc)) throw rc;
    21732173
    2174             Guid newMachineId;
    2175             rc = pNewMachine->COMGETTER(Id)(newMachineId.asOutParam());
     2174            Bstr newMachineId_;
     2175            rc = pNewMachine->COMGETTER(Id)(newMachineId_.asOutParam());
    21762176            if (FAILED(rc)) throw rc;
     2177            Guid newMachineId(newMachineId_);
    21772178
    21782179            // store new machine for roll-back in case of errors
     
    21922193                    /* In order to attach hard disks we need to open a session
    21932194                     * for the new machine */
    2194                     rc = pVirtualBox->OpenSession(session, newMachineId);
     2195                    rc = pVirtualBox->OpenSession(session, newMachineId_);
    21952196                    if (FAILED(rc)) throw rc;
    21962197                    fSessionOpen = true;
     
    23182319                        rc = session->COMGETTER(Machine)(sMachine.asOutParam());
    23192320                        if (FAILED(rc)) throw rc;
    2320                         Guid hdId;
     2321                        Bstr hdId;
    23212322                        rc = dstHdVBox->COMGETTER(Id)(hdId.asOutParam());
    23222323                        if (FAILED(rc)) throw rc;
    2323 
     2324                         
    23242325                        /* For now we assume we have one controller of every type only */
    23252326                        HardDiskController hdc = (*vsysThis.mapControllers.find(vd.idController)).second;
     
    24332434        {
    24342435            const MyHardDiskAttachment &mhda = *itM;
    2435             rc2 = pVirtualBox->OpenSession(session, mhda.uuid);
     2436            rc2 = pVirtualBox->OpenSession(session, Bstr(mhda.uuid));
    24362437            if (SUCCEEDED(rc2))
    24372438            {
     
    24672468            const Guid &guid = *itID;
    24682469            ComPtr<IMachine> failedMachine;
    2469             rc2 = pVirtualBox->UnregisterMachine(guid, failedMachine.asOutParam());
     2470            rc2 = pVirtualBox->UnregisterMachine(guid.toUtf16(), failedMachine.asOutParam());
    24702471            if (SUCCEEDED(rc2))
    24712472                rc2 = failedMachine->DeleteSettings();
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r19230 r19239  
    485485    }
    486486
    487     Guid uuid;
    488     HRESULT hrc = mMachine->COMGETTER (Id) (uuid.asOutParam());
     487    Bstr id;
     488    HRESULT hrc = mMachine->COMGETTER (Id) (id.asOutParam());
     489    Guid uuid = Guid(id);
     490   
    489491    AssertComRCReturn (hrc, VERR_ACCESS_DENIED);
    490492
     
    736738    }
    737739#endif /* VBOX_WITH_VRDP */
    738 
    739     Guid uuid;
     740       
     741    Bstr uuid;
    740742    HRESULT hrc = mMachine->COMGETTER (Id) (uuid.asOutParam());
    741743    AssertComRC (hrc);
     
    19521954}
    19531955
    1954 STDMETHODIMP Console::AttachUSBDevice (IN_GUID aId)
     1956STDMETHODIMP Console::AttachUSBDevice (IN_BSTR aId)
    19551957{
    19561958#ifdef VBOX_WITH_USB
     
    19931995}
    19941996
    1995 STDMETHODIMP Console::DetachUSBDevice (IN_GUID aId, IUSBDevice **aDevice)
     1997STDMETHODIMP Console::DetachUSBDevice (IN_BSTR aId, IUSBDevice **aDevice)
    19961998{
    19971999#ifdef VBOX_WITH_USB
     
    20062008    ComObjPtr <OUSBDevice> device;
    20072009    USBDeviceList::iterator it = mUSBDevices.begin();
     2010    Guid uuid(aId);
    20082011    while (it != mUSBDevices.end())
    20092012    {
    2010         if ((*it)->id() == aId)
     2013        if ((*it)->id() == uuid)
    20112014        {
    20122015            device = *it;
     
    20882091}
    20892092
    2090 STDMETHODIMP Console::FindUSBDeviceById(IN_GUID aId, IUSBDevice **aDevice)
     2093STDMETHODIMP Console::FindUSBDeviceById(IN_BSTR aId, IUSBDevice **aDevice)
    20912094{
    20922095#ifdef VBOX_WITH_USB
     
    21022105    for (size_t i = 0; i < devsvec.size(); ++i)
    21032106    {
    2104         Guid id;
     2107        Bstr id;
    21052108        rc = devsvec[i]->COMGETTER(Id) (id.asOutParam());
    21062109        CheckComRCReturnRC (rc);
     
    24192422}
    24202423
    2421 STDMETHODIMP Console::DiscardSnapshot (IN_GUID aId, IProgress **aProgress)
     2424STDMETHODIMP Console::DiscardSnapshot (IN_BSTR aId, IProgress **aProgress)
    24222425{
    24232426    CheckComArgExpr(aId, Guid (aId).isEmpty() == false);
     
    35583561 *  @note Locks this object for writing.
    35593562 */
    3560 HRESULT Console::onUSBDeviceDetach (IN_GUID aId,
     3563HRESULT Console::onUSBDeviceDetach (IN_BSTR aId,
    35613564                                    IVirtualBoxErrorInfo *aError)
    35623565{
     
    54695472    Utf8Str Address (BstrAddress);
    54705473
    5471     Guid Uuid;
    5472     hrc = aHostDevice->COMGETTER (Id) (Uuid.asOutParam());
     5474    Bstr id;
     5475    hrc = aHostDevice->COMGETTER (Id) (id.asOutParam());
    54735476    ComAssertComRCRetRC (hrc);
     5477    Guid uuid(id);
    54745478
    54755479    BOOL fRemote = FALSE;
     
    54825486
    54835487    LogFlowThisFunc (("Proxying USB device '%s' {%RTuuid}...\n",
    5484                       Address.raw(), Uuid.ptr()));
     5488                      Address.raw(), uuid.ptr()));
    54855489
    54865490    /* leave the lock before a VMR3* call (EMT will call us back)! */
     
    54905494    PVMREQ pReq = NULL;
    54915495    int vrc = VMR3ReqCall (mpVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
    5492                            (PFNRT) usbAttachCallback, 6, this, aHostDevice, Uuid.ptr(), fRemote, Address.raw(), aMaskedIfs);
     5496                           (PFNRT) usbAttachCallback, 6, this, aHostDevice, uuid.ptr(), fRemote, Address.raw(), aMaskedIfs);
    54935497    if (VBOX_SUCCESS (vrc))
    54945498        vrc = pReq->iStatus;
     
    55035507    {
    55045508        LogWarningThisFunc (("Failed to create proxy device for '%s' {%RTuuid} (%Rrc)\n",
    5505                              Address.raw(), Uuid.ptr(), vrc));
     5509                             Address.raw(), uuid.ptr(), vrc));
    55065510
    55075511        switch (vrc)
     
    62336237        if (device->captured ())
    62346238        {
    6235             Guid uuid;
     6239            Bstr uuid;
    62366240            device->COMGETTER (Id) (uuid.asOutParam());
    62376241            onUSBDeviceDetach (uuid, NULL);
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r19230 r19239  
    191191    hrc = pMachine->COMGETTER(BIOSSettings)(biosSettings.asOutParam());             H();
    192192
    193     Guid uuid;
    194     hrc = pMachine->COMGETTER(Id)(uuid.asOutParam());                               H();
     193    Bstr id;
     194    hrc = pMachine->COMGETTER(Id)(id.asOutParam());                               H();
     195    Guid uuid(id);
    195196    PCRTUUID pUuid = uuid.raw();
    196197
     
    15271528                    }
    15281529
    1529                     Guid hostIFGuid;
    1530                     hrc = hostInterface->COMGETTER(Id)(hostIFGuid.asOutParam());
     1530                    Bstr hostIFGuid_;
     1531                    hrc = hostInterface->COMGETTER(Id)(hostIFGuid_.asOutParam());
    15311532                    if(FAILED(hrc))
    15321533                    {
     
    15341535                        H();
    15351536                    }
     1537                    Guid hostIFGuid(hostIFGuid_);
    15361538
    15371539                    INetCfg              *pNc;
     
    18521854
    18531855
    1854                 Guid hostIFGuid;
    1855                 hrc = hostInterface->COMGETTER(Id)(hostIFGuid.asOutParam());
     1856                Bstr hostIFGuid_;
     1857                hrc = hostInterface->COMGETTER(Id)(hostIFGuid_.asOutParam());
    18561858                if(FAILED(hrc))
    18571859                {
     
    18591861                    H();
    18601862                }
     1863                Guid hostIFGuid(hostIFGuid_);
    18611864
    18621865                INetCfg              *pNc;
  • trunk/src/VBox/Main/DVDDriveImpl.cpp

    r18210 r19239  
    247247////////////////////////////////////////////////////////////////////////////////
    248248
    249 STDMETHODIMP DVDDrive::MountImage (IN_GUID aImageId)
    250 {
    251     Guid imageId = aImageId;
     249STDMETHODIMP DVDDrive::MountImage (IN_BSTR aImageId)
     250{
     251    Guid imageId(aImageId);
    252252    CheckComArgExpr(aImageId, !imageId.isEmpty());
    253253
     
    444444    {
    445445        Guid uuid = typeNode.value <Guid> ("uuid");
    446         rc = MountImage (uuid);
     446        rc = MountImage (uuid.toUtf16());
    447447        CheckComRCReturnRC (rc);
    448448    }
     
    514514            Assert (!m->image.isNull());
    515515
    516             Guid id;
     516            Bstr id;
    517517            HRESULT rc = m->image->COMGETTER(Id) (id.asOutParam());
    518518            AssertComRC (rc);
     
    520520
    521521            Key imageNode = node.createKey ("Image");
    522             imageNode.setValue <Guid> ("uuid", id);
     522            imageNode.setValue <Guid> ("uuid", Guid(id));
    523523            break;
    524524        }
  • trunk/src/VBox/Main/FloppyDriveImpl.cpp

    r18210 r19239  
    254254/////////////////////////////////////////////////////////////////////////////
    255255
    256 STDMETHODIMP FloppyDrive::MountImage (IN_GUID aImageId)
     256STDMETHODIMP FloppyDrive::MountImage (IN_BSTR aImageId)
    257257{
    258258    Guid imageId = aImageId;
     
    451451    {
    452452        Guid uuid = typeNode.value <Guid> ("uuid");
    453         rc = MountImage (uuid);
     453        rc = MountImage (uuid.toUtf16());
    454454        CheckComRCReturnRC (rc);
    455455    }
     
    521521            Assert (!m->image.isNull());
    522522
    523             Guid id;
     523            Bstr id;
    524524            HRESULT rc = m->image->COMGETTER(Id) (id.asOutParam());
    525525            AssertComRC (rc);
     
    527527
    528528            Key imageNode = node.createKey ("Image");
    529             imageNode.setValue <Guid> ("uuid", id);
     529            imageNode.setValue <Guid> ("uuid", Guid(id));
    530530            break;
    531531        }
  • trunk/src/VBox/Main/HardDiskImpl.cpp

    r19108 r19239  
    15381538}
    15391539
    1540 STDMETHODIMP HardDisk::MergeTo (IN_GUID /* aTargetId */, IProgress ** /* aProgress */)
     1540STDMETHODIMP HardDisk::MergeTo (IN_BSTR /* aTargetId */, IProgress ** /* aProgress */)
    15411541{
    15421542    AutoCaller autoCaller (this);
  • trunk/src/VBox/Main/HostImpl.cpp

    r19130 r19239  
    12371237
    12381238STDMETHODIMP
    1239 Host::RemoveHostOnlyNetworkInterface (IN_GUID aId,
     1239Host::RemoveHostOnlyNetworkInterface (IN_BSTR aId,
    12401240                                  IHostNetworkInterface **aHostNetworkInterface,
    12411241                                  IProgress **aProgress)
     
    12561256    }
    12571257
    1258     int r = NetIfRemoveHostOnlyNetworkInterface (mParent, aId, aHostNetworkInterface, aProgress);
     1258    int r = NetIfRemoveHostOnlyNetworkInterface (mParent, Guid(aId), aHostNetworkInterface, aProgress);
    12591259    if(RT_SUCCESS(r))
    12601260    {
     
    23342334}
    23352335
    2336 STDMETHODIMP Host::FindHostNetworkInterfaceById(IN_GUID id, IHostNetworkInterface **networkInterface)
     2336STDMETHODIMP Host::FindHostNetworkInterfaceById(IN_BSTR id, IHostNetworkInterface **networkInterface)
    23372337{
    23382338#ifndef VBOX_WITH_HOSTNETIF_API
     
    23562356    for (it = list.begin(); it != list.end(); ++it)
    23572357    {
    2358         Guid g;
     2358        Bstr g;
    23592359        (*it)->COMGETTER(Id) (g.asOutParam());
    2360         if (g == Guid(id))
     2360        if (g == id)
    23612361            found = *it;
    23622362    }
     
    24342434}
    24352435
    2436 STDMETHODIMP Host::FindUSBDeviceById (IN_GUID aId, IHostUSBDevice **aDevice)
     2436STDMETHODIMP Host::FindUSBDeviceById (IN_BSTR aId, IHostUSBDevice **aDevice)
    24372437{
    24382438#ifdef VBOX_WITH_USB
     
    24482448    for (size_t i = 0; i < devsvec.size(); ++i)
    24492449    {
    2450         Guid id;
     2450        Bstr id;
    24512451        rc = devsvec[i]->COMGETTER(Id) (id.asOutParam());
    24522452        CheckComRCReturnRC (rc);
  • trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp

    r19130 r19239  
    180180 * @param   aGuid address of result pointer
    181181 */
    182 STDMETHODIMP HostNetworkInterface::COMGETTER(Id) (OUT_GUID aGuid)
     182STDMETHODIMP HostNetworkInterface::COMGETTER(Id) (BSTR *aGuid)
    183183{
    184184    CheckComArgOutPointerValid(aGuid);
     
    187187    CheckComRCReturnRC (autoCaller.rc());
    188188
    189     mGuid.cloneTo (aGuid);
     189    mGuid.toUtf16().cloneTo (aGuid);
    190190
    191191    return S_OK;
  • trunk/src/VBox/Main/MachineImpl.cpp

    r19236 r19239  
    869869}
    870870
    871 STDMETHODIMP Machine::COMGETTER(Id) (OUT_GUID aId)
     871STDMETHODIMP Machine::COMGETTER(Id) (BSTR *aId)
    872872{
    873873    CheckComArgOutPointerValid (aId);
     
    878878    AutoReadLock alock (this);
    879879
    880     mData->mUuid.cloneTo (aId);
     880    mData->mUuid.toUtf16().cloneTo (aId);
    881881
    882882    return S_OK;
     
    18871887}
    18881888
    1889 STDMETHODIMP Machine::AttachHardDisk(IN_GUID aId,
     1889STDMETHODIMP Machine::AttachHardDisk(IN_BSTR aId,
    18901890                                     IN_BSTR aControllerName, LONG aControllerPort,
    18911891                                     LONG aDevice)
     
    19541954    }
    19551955
    1956     Guid id = aId;
     1956    Guid id(aId);
    19571957
    19581958    /* find a hard disk by UUID */
     
    27992799}
    28002800
    2801 STDMETHODIMP Machine::GetSnapshot (IN_GUID aId, ISnapshot **aSnapshot)
     2801STDMETHODIMP Machine::GetSnapshot (IN_BSTR aId, ISnapshot **aSnapshot)
    28022802{
    28032803    CheckComArgOutPointerValid (aSnapshot);
     
    28082808    AutoReadLock alock (this);
    28092809
    2810     Guid id = aId;
     2810    Guid id(aId);
    28112811    ComObjPtr <Snapshot> snapshot;
    28122812
     
    28352835}
    28362836
    2837 STDMETHODIMP Machine::SetCurrentSnapshot (IN_GUID /* aId */)
     2837STDMETHODIMP Machine::SetCurrentSnapshot (IN_BSTR /* aId */)
    28382838{
    28392839    /// @todo (dmik) don't forget to set
     
    87378737 *  @note Locks the same as Host::captureUSBDevice() does.
    87388738 */
    8739 STDMETHODIMP SessionMachine::CaptureUSBDevice (IN_GUID aId)
     8739STDMETHODIMP SessionMachine::CaptureUSBDevice (IN_BSTR aId)
    87408740{
    87418741    LogFlowThisFunc (("\n"));
     
    87518751    USBProxyService *service = mParent->host()->usbProxyService();
    87528752    AssertReturn (service, E_FAIL);
    8753     return service->captureDeviceForVM (this, aId);
     8753    return service->captureDeviceForVM (this, Guid(aId));
    87548754#else
    87558755    return E_NOTIMPL;
     
    87608760 *  @note Locks the same as Host::detachUSBDevice() does.
    87618761 */
    8762 STDMETHODIMP SessionMachine::DetachUSBDevice (IN_GUID aId, BOOL aDone)
     8762STDMETHODIMP SessionMachine::DetachUSBDevice (IN_BSTR aId, BOOL aDone)
    87638763{
    87648764    LogFlowThisFunc (("\n"));
     
    87708770    USBProxyService *service = mParent->host()->usbProxyService();
    87718771    AssertReturn (service, E_FAIL);
    8772     return service->detachDeviceFromVM (this, aId, !!aDone);
     8772    return service->detachDeviceFromVM (this, Guid(aId), !!aDone);
    87738773#else
    87748774    return E_NOTIMPL;
     
    89308930
    89318931    /* memorize the progress ID and add it to the global collection */
    8932     Guid progressId;
     8932    Bstr progressId;
    89338933    HRESULT rc = aProgress->COMGETTER(Id) (progressId.asOutParam());
    89348934    AssertComRCReturn (rc, rc);
     
    89478947    /* fill in the snapshot data */
    89488948    mSnapshotData.mLastState = mData->mMachineState;
    8949     mSnapshotData.mProgressId = progressId;
     8949    mSnapshotData.mProgressId = Guid(progressId);
    89508950    mSnapshotData.mStateFilePath = stateFilePath;
    89518951
     
    92169216 */
    92179217STDMETHODIMP SessionMachine::DiscardSnapshot (
    9218     IConsole *aInitiator, IN_GUID aId,
     9218    IConsole *aInitiator, IN_BSTR aId,
    92199219    MachineState_T *aMachineState, IProgress **aProgress)
    92209220{
    92219221    LogFlowThisFunc (("\n"));
    92229222
    9223     Guid id = aId;
     9223    Guid id(aId);
    92249224    AssertReturn (aInitiator && !id.isEmpty(), E_INVALIDARG);
    92259225    AssertReturn (aMachineState && aProgress, E_POINTER);
     
    99829982 *  @note The calls shall hold no locks. Will temporarily lock this object for reading.
    99839983 */
    9984 HRESULT SessionMachine::onUSBDeviceDetach (IN_GUID aId,
     9984HRESULT SessionMachine::onUSBDeviceDetach (IN_BSTR aId,
    99859985                                           IVirtualBoxErrorInfo *aError)
    99869986{
  • trunk/src/VBox/Main/MediumImpl.cpp

    r18813 r19239  
    5252////////////////////////////////////////////////////////////////////////////////
    5353
    54 STDMETHODIMP MediumBase::COMGETTER(Id) (OUT_GUID aId)
     54STDMETHODIMP MediumBase::COMGETTER(Id) (BSTR *aId)
    5555{
    5656    CheckComArgOutPointerValid (aId);
     
    6161    AutoReadLock alock (this);
    6262
    63     m.id.cloneTo (aId);
     63    m.id.toUtf16().cloneTo (aId);
    6464
    6565    return S_OK;
     
    204204}
    205205
    206 STDMETHODIMP MediumBase::COMGETTER(MachineIds) (ComSafeGUIDArrayOut (aMachineIds))
     206STDMETHODIMP MediumBase::COMGETTER(MachineIds) (ComSafeArrayOut (BSTR,aMachineIds))
    207207{
    208208    if (ComSafeGUIDArrayOutIsNull (aMachineIds))
     
    214214    AutoReadLock alock (this);
    215215
    216     com::SafeGUIDArray machineIds;
     216    com::SafeArray<BSTR> machineIds;
    217217
    218218    if (m.backRefs.size() != 0)
     
    224224             it != m.backRefs.end(); ++ it, ++ i)
    225225        {
    226             machineIds [i] = it->machineId;
    227         }
    228     }
    229 
    230     machineIds.detachTo (ComSafeGUIDArrayOutArg (aMachineIds));
     226             it->machineId.toUtf16().detachTo(&machineIds [i]);
     227        }
     228    }
     229
     230    machineIds.detachTo (ComSafeArrayOutArg (aMachineIds));
    231231
    232232    return S_OK;
     
    236236////////////////////////////////////////////////////////////////////////////////
    237237
    238 STDMETHODIMP MediumBase::GetSnapshotIds (IN_GUID aMachineId,
    239                                          ComSafeGUIDArrayOut (aSnapshotIds))
     238STDMETHODIMP MediumBase::GetSnapshotIds (IN_BSTR aMachineId,
     239                                         ComSafeArrayOut (BSTR, aSnapshotIds))
    240240{
    241241    CheckComArgExpr (aMachineId, Guid (aMachineId).isEmpty() == false);
     
    247247    AutoReadLock alock (this);
    248248
    249     com::SafeGUIDArray snapshotIds;
    250 
     249    com::SafeArray<BSTR> snapshotIds;
     250
     251    Guid id(aMachineId);
    251252    for (BackRefList::const_iterator it = m.backRefs.begin();
    252253         it != m.backRefs.end(); ++ it)
    253254    {
    254         if (it->machineId == aMachineId)
     255        if (it->machineId == id)
    255256        {
    256257            size_t size = it->snapshotIds.size();
     
    267268                size_t j = 0;
    268269                if (it->inCurState)
    269                     snapshotIds [j ++] = it->machineId;
     270                    it->machineId.toUtf16().detachTo(&snapshotIds [j ++]);
    270271
    271272                for (BackRef::GuidList::const_iterator jt =
     
    273274                     jt != it->snapshotIds.end(); ++ jt, ++ j)
    274275                {
    275                     snapshotIds [j] = *jt;
     276                     (*jt).toUtf16().detachTo(&snapshotIds [j]);
    276277                }
    277278            }
     
    281282    }
    282283
    283     snapshotIds.detachTo (ComSafeGUIDArrayOutArg (aSnapshotIds));
     284    snapshotIds.detachTo (ComSafeArrayOutArg (aSnapshotIds));
    284285
    285286    return S_OK;
  • trunk/src/VBox/Main/ProgressImpl.cpp

    r18643 r19239  
    200200/////////////////////////////////////////////////////////////////////////////
    201201
    202 STDMETHODIMP ProgressBase::COMGETTER(Id) (OUT_GUID aId)
     202STDMETHODIMP ProgressBase::COMGETTER(Id) (BSTR *aId)
    203203{
    204204    CheckComArgOutPointerValid(aId);
     
    208208
    209209    /* mId is constant during life time, no need to lock */
    210     mId.cloneTo (aId);
     210    mId.toUtf16().cloneTo (aId);
    211211
    212212    return S_OK;
  • trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp

    r15051 r19239  
    132132/////////////////////////////////////////////////////////////////////////////
    133133
    134 STDMETHODIMP RemoteUSBDevice::COMGETTER(Id) (OUT_GUID aId)
     134STDMETHODIMP RemoteUSBDevice::COMGETTER(Id) (BSTR *aId)
    135135{
    136136    CheckComArgOutPointerValid(aId);
     
    140140
    141141    /* this is const, no need to lock */
    142     mData.id.cloneTo (aId);
     142    Bstr(mData.id).cloneTo (aId);
    143143
    144144    return S_OK;
  • trunk/src/VBox/Main/SessionImpl.cpp

    r17669 r19239  
    643643}
    644644
    645 STDMETHODIMP Session::OnUSBDeviceDetach (IN_GUID aId,
     645STDMETHODIMP Session::OnUSBDeviceDetach (IN_BSTR aId,
    646646                                         IVirtualBoxErrorInfo *aError)
    647647{
  • trunk/src/VBox/Main/SnapshotImpl.cpp

    r18482 r19239  
    165165////////////////////////////////////////////////////////////////////////////////
    166166
    167 STDMETHODIMP Snapshot::COMGETTER(Id) (OUT_GUID aId)
     167STDMETHODIMP Snapshot::COMGETTER(Id) (BSTR *aId)
    168168{
    169169    CheckComArgOutPointerValid(aId);
     
    172172    CHECK_READY();
    173173
    174     mData.mId.cloneTo (aId);
     174    mData.mId.toUtf16().cloneTo (aId);
    175175    return S_OK;
    176176}
  • trunk/src/VBox/Main/USBDeviceImpl.cpp

    r15051 r19239  
    9494    ComAssertComRCRet (hrc, hrc);
    9595
    96     hrc = aUSBDevice->COMGETTER(Id)(unconst (mData.id).asOutParam());
    97     ComAssertComRCRet (hrc, hrc);
     96    Bstr id;
     97    hrc = aUSBDevice->COMGETTER(Id)(id.asOutParam());
     98    ComAssertComRCRet (hrc, hrc);
     99    unconst(mData.id) = Guid(id);
    98100
    99101    /* Confirm a successful initialization */
     
    144146 * @param   aId   Address of result variable.
    145147 */
    146 STDMETHODIMP OUSBDevice::COMGETTER(Id)(OUT_GUID aId)
     148STDMETHODIMP OUSBDevice::COMGETTER(Id)(BSTR *aId)
    147149{
    148150    CheckComArgOutPointerValid(aId);
     
    152154
    153155    /* this is const, no need to lock */
    154     mData.id.cloneTo (aId);
     156    Guid(mData.id).toString().cloneTo (aId);
    155157
    156158    return S_OK;
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r19236 r19239  
    784784                                        IN_BSTR aOsTypeId,
    785785                                        IN_BSTR aBaseFolder,
    786                                         IN_GUID aId,
     786                                        IN_BSTR aId,
    787787                                        IMachine **aMachine)
    788788{
     
    822822
    823823    /* Create UUID if an empty one was specified. */
    824     Guid id = aId;
     824    Guid id(aId);
    825825    if (id.isEmpty())
    826826        id.create();
     
    866866                                              IN_BSTR aOsTypeId,
    867867                                              IN_BSTR aSettingsFile,
    868                                               IN_GUID aId,
     868                                              IN_BSTR aId,
    869869                                              IMachine **aMachine)
    870870{
     
    889889
    890890    /* Create UUID if an empty one was specified. */
    891     Guid id = aId;
     891    Guid id(aId);
    892892    if (id.isEmpty())
    893893        id.create();
     
    10001000
    10011001/** @note Locks objects! */
    1002 STDMETHODIMP VirtualBox::GetMachine (IN_GUID aId, IMachine **aMachine)
     1002STDMETHODIMP VirtualBox::GetMachine (IN_BSTR aId, IMachine **aMachine)
    10031003{
    10041004    CheckComArgOutSafeArrayPointerValid(aMachine);
     
    10681068
    10691069/** @note Locks objects! */
    1070 STDMETHODIMP VirtualBox::UnregisterMachine (IN_GUID aId,
     1070STDMETHODIMP VirtualBox::UnregisterMachine (IN_BSTR aId,
    10711071                                            IMachine **aMachine)
    10721072{
    1073     Guid id = aId;
     1073    Guid id(aId);
    10741074    if (id.isEmpty())
    10751075        return E_INVALIDARG;
     
    11711171}
    11721172
    1173 STDMETHODIMP VirtualBox::GetHardDisk(IN_GUID aId,
     1173STDMETHODIMP VirtualBox::GetHardDisk(IN_BSTR  aId,
    11741174                                     IHardDisk **aHardDisk)
    11751175{
     
    11791179    CheckComRCReturnRC (autoCaller.rc());
    11801180
    1181     Guid id = aId;
     1181    Guid id(aId);
    11821182    ComObjPtr<HardDisk> hardDisk;
    11831183    HRESULT rc = findHardDisk(&id, NULL, true /* setError */, &hardDisk);
     
    12081208
    12091209/** @note Doesn't lock anything. */
    1210 STDMETHODIMP VirtualBox::OpenDVDImage (IN_BSTR aLocation, IN_GUID aId,
     1210STDMETHODIMP VirtualBox::OpenDVDImage (IN_BSTR aLocation, IN_BSTR aId,
    12111211                                       IDVDImage **aDVDImage)
    12121212{
     
    12191219    HRESULT rc = VBOX_E_FILE_ERROR;
    12201220
    1221     Guid id = aId;
     1221    Guid id(aId);
    12221222    /* generate an UUID if not specified */
    12231223    if (id.isEmpty())
     
    12391239
    12401240/** @note Locks objects! */
    1241 STDMETHODIMP VirtualBox::GetDVDImage (IN_GUID aId, IDVDImage **aDVDImage)
     1241STDMETHODIMP VirtualBox::GetDVDImage (IN_BSTR aId, IDVDImage **aDVDImage)
    12421242{
    12431243    CheckComArgOutSafeArrayPointerValid(aDVDImage);
     
    12461246    CheckComRCReturnRC (autoCaller.rc());
    12471247
    1248     Guid id = aId;
     1248    Guid id(aId);
    12491249    ComObjPtr <DVDImage> image;
    12501250    HRESULT rc = findDVDImage (&id, NULL, true /* setError */, &image);
     
    12751275
    12761276/** @note Doesn't lock anything. */
    1277 STDMETHODIMP VirtualBox::OpenFloppyImage (IN_BSTR aLocation, IN_GUID aId,
     1277STDMETHODIMP VirtualBox::OpenFloppyImage (IN_BSTR aLocation, IN_BSTR aId,
    12781278                                          IFloppyImage **aFloppyImage)
    12791279{
     
    12861286    HRESULT rc = VBOX_E_FILE_ERROR;
    12871287
    1288     Guid id = aId;
     1288    Guid id(aId);
    12891289    /* generate an UUID if not specified */
    12901290    if (id.isEmpty())
     
    13061306
    13071307/** @note Locks objects! */
    1308 STDMETHODIMP VirtualBox::GetFloppyImage (IN_GUID aId,
     1308STDMETHODIMP VirtualBox::GetFloppyImage (IN_BSTR aId,
    13091309                                         IFloppyImage **aFloppyImage)
    13101310
     
    13151315    CheckComRCReturnRC (autoCaller.rc());
    13161316
    1317     Guid id = aId;
     1317    Guid id(aId);
    13181318    ComObjPtr<FloppyImage> image;
    13191319    HRESULT rc = findFloppyImage (&id, NULL, true /* setError */, &image);
     
    16961696 *  @note Locks objects!
    16971697 */
    1698 STDMETHODIMP VirtualBox::OpenSession (ISession *aSession, IN_GUID aMachineId)
     1698STDMETHODIMP VirtualBox::OpenSession (ISession *aSession, IN_BSTR aMachineId)
    16991699{
    17001700    CheckComArgNotNull(aSession);
     
    17031703    CheckComRCReturnRC (autoCaller.rc());
    17041704
    1705     Guid id = aMachineId;
     1705    Guid id(aMachineId);
    17061706    ComObjPtr <Machine> machine;
    1707 
     1707 
    17081708    HRESULT rc = findMachine (id, true /* setError */, &machine);
    17091709    CheckComRCReturnRC (rc);
     
    17341734
    17351735        /* fire an event */
    1736         onSessionStateChange (aMachineId, SessionState_Open);
     1736        onSessionStateChange (id, SessionState_Open);
    17371737    }
    17381738
     
    17441744 */
    17451745STDMETHODIMP VirtualBox::OpenRemoteSession (ISession *aSession,
    1746                                             IN_GUID aMachineId,
     1746                                            IN_BSTR aMachineId,
    17471747                                            IN_BSTR aType,
    17481748                                            IN_BSTR aEnvironment,
    17491749                                            IProgress **aProgress)
    17501750{
     1751    LogRel(("remotesession=%s\n", Utf8Str(aMachineId).c_str()));   
     1752
     1753    CheckComArgNotNull(aMachineId);
    17511754    CheckComArgNotNull(aSession);
    17521755    CheckComArgNotNull(aType);
     
    17561759    CheckComRCReturnRC (autoCaller.rc());
    17571760
    1758     Guid id = aMachineId;
     1761    Guid id(aMachineId);
    17591762    ComObjPtr <Machine> machine;
    17601763
     
    17931796
    17941797        /* fire an event */
    1795         onSessionStateChange (aMachineId, SessionState_Spawning);
     1798        onSessionStateChange (id, SessionState_Spawning);
    17961799    }
    17971800
     
    18031806 */
    18041807STDMETHODIMP VirtualBox::OpenExistingSession (ISession *aSession,
    1805                                               IN_GUID aMachineId)
     1808                                              IN_BSTR aMachineId)
    18061809{
    18071810    CheckComArgNotNull(aSession);
     
    18101813    CheckComRCReturnRC (autoCaller.rc());
    18111814
    1812     Guid id = aMachineId;
     1815    Guid id(aMachineId);
    18131816    ComObjPtr <Machine> machine;
    18141817
     
    19751978    CheckComRCReturnRC (autoCaller.rc());
    19761979
    1977     Guid id;
     1980    Bstr id;
    19781981    HRESULT rc = aProgress->COMGETTER(Id) (id.asOutParam());
    19791982    AssertComRCReturnRC (rc);
     
    19821985    AutoWriteLock safeLock (mSafeLock);
    19831986
    1984     mData.mProgressOperations.insert (ProgressMap::value_type (id, aProgress));
     1987    printf("adding  %s\n", Utf8Str(id).c_str());
     1988
     1989    mData.mProgressOperations.insert (ProgressMap::value_type (Guid(id), aProgress));
    19851990    return S_OK;
    19861991}
     
    23132318            case DataChanged:
    23142319                LogFlow (("OnMachineDataChange: id={%RTuuid}\n", id.ptr()));
    2315                 aCallback->OnMachineDataChange (id);
     2320                aCallback->OnMachineDataChange (id.toUtf16());
    23162321                break;
    23172322
     
    23192324                LogFlow (("OnMachineStateChange: id={%RTuuid}, state=%d\n",
    23202325                          id.ptr(), state));
    2321                 aCallback->OnMachineStateChange (id, state);
     2326                aCallback->OnMachineStateChange (id.toUtf16(), state);
    23222327                break;
    23232328
     
    23252330                LogFlow (("OnMachineRegistered: id={%RTuuid}, registered=%d\n",
    23262331                          id.ptr(), registered));
    2327                 aCallback->OnMachineRegistered (id, registered);
     2332                aCallback->OnMachineRegistered (id.toUtf16(), registered);
    23282333                break;
    23292334        }
     
    23732378    BOOL allowChange = TRUE;
    23742379    CallbackList::iterator it = list.begin();
     2380    Bstr id = aId.toUtf16();
    23752381    while ((it != list.end()) && allowChange)
    23762382    {
    2377         HRESULT rc = (*it++)->OnExtraDataCanChange (aId, aKey, aValue,
     2383        HRESULT rc = (*it++)->OnExtraDataCanChange (id, aKey, aValue,
    23782384                                                    aError.asOutParam(), &allowChange);
    23792385        if (FAILED (rc))
     
    24052411        LogFlow (("OnExtraDataChange: machineId={%RTuuid}, key='%ls', val='%ls'\n",
    24062412                  machineId.ptr(), key.raw(), val.raw()));
    2407         aCallback->OnExtraDataChange (machineId, key, val);
     2413        aCallback->OnExtraDataChange (machineId.toUtf16(), key, val);
    24082414    }
    24092415
     
    24392445        LogFlow (("OnSessionStateChange: machineId={%RTuuid}, sessionState=%d\n",
    24402446                  machineId.ptr(), sessionState));
    2441         aCallback->OnSessionStateChange (machineId, sessionState);
     2447        aCallback->OnSessionStateChange (machineId.toUtf16(), sessionState);
    24422448    }
    24432449
     
    24682474    void handleCallback (const ComPtr <IVirtualBoxCallback> &aCallback)
    24692475    {
     2476        Bstr mid = machineId.toUtf16();
     2477        Bstr sid = snapshotId.toUtf16();
     2478       
    24702479        switch (what)
    24712480        {
     
    24732482                LogFlow (("OnSnapshotTaken: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
    24742483                          machineId.ptr(), snapshotId.ptr()));
    2475                 aCallback->OnSnapshotTaken (machineId, snapshotId);
     2484                aCallback->OnSnapshotTaken (mid, sid);
    24762485                break;
    24772486
     
    24792488                LogFlow (("OnSnapshotDiscarded: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
    24802489                          machineId.ptr(), snapshotId.ptr()));
    2481                 aCallback->OnSnapshotDiscarded (machineId, snapshotId);
     2490                aCallback->OnSnapshotDiscarded (mid, sid);
    24822491                break;
    24832492
     
    24852494                LogFlow (("OnSnapshotChange: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
    24862495                          machineId.ptr(), snapshotId.ptr()));
    2487                 aCallback->OnSnapshotChange (machineId, snapshotId);
     2496                aCallback->OnSnapshotChange (mid, sid);
    24882497                break;
    24892498        }
     
    25332542        LogFlow (("OnGuestPropertyChange: machineId={%RTuuid}, name='%ls', value='%ls', flags='%ls'\n",
    25342543                  machineId.ptr(), name.raw(), value.raw(), flags.raw()));
    2535         aCallback->OnGuestPropertyChange (machineId, name, value, flags);
     2544        aCallback->OnGuestPropertyChange (machineId.toUtf16(), name, value, flags);
    25362545    }
    25372546
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r19176 r19239  
    10061006        <see>IMachine::state</see>
    10071007      </desc>
    1008       <param name="machineId" type="uuid" dir="in">
     1008      <param name="machineId" type="wstring" dir="in">
    10091009        <desc>ID of the machine this event relates to.</desc>
    10101010      </param>
     
    10181018        Any of the settings of the given machine has changed.
    10191019      </desc>
    1020       <param name="machineId" type="uuid" dir="in">
     1020      <param name="machineId" type="wstring" dir="in">
    10211021        <desc>ID of the machine this event relates to.</desc>
    10221022      </param>
     
    10291029        This gives the chance to veto against changes.
    10301030      </desc>
    1031       <param name="machineId" type="uuid" dir="in">
     1031      <param name="machineId" type="wstring" dir="in">
    10321032        <desc>
    10331033          ID of the machine this event relates to
     
    10641064        has changed.
    10651065      </desc>
    1066       <param name="machineId" type="uuid" dir="in">
     1066      <param name="machineId" type="wstring" dir="in">
    10671067        <desc>
    10681068          ID of the machine this event relates to.
     
    11091109        @a mediaId value.
    11101110      </desc>
    1111       <param name="mediaId" type="uuid" dir="in">
     1111      <param name="mediaId" type="wstring" dir="in">
    11121112        <desc>ID of the media this event relates to.</desc>
    11131113      </param>
     
    11281128        within this VirtualBox installation.
    11291129      </desc>
    1130       <param name="machineId" type="uuid" dir="in">
     1130      <param name="machineId" type="wstring" dir="in">
    11311131        <desc>ID of the machine this event relates to.</desc>
    11321132      </param>
     
    11441144        <see>IMachine::sessionState</see>
    11451145      </desc>
    1146       <param name="machineId" type="uuid" dir="in">
     1146      <param name="machineId" type="wstring" dir="in">
    11471147        <desc>ID of the machine this event relates to.</desc>
    11481148      </param>
     
    11571157        <see>ISnapshot</see>
    11581158      </desc>
    1159       <param name="machineId" type="uuid" dir="in">
     1159      <param name="machineId" type="wstring" dir="in">
    11601160        <desc>ID of the machine this event relates to.</desc>
    11611161      </param>
    1162       <param name="snapshotId" type="uuid" dir="in">
     1162      <param name="snapshotId" type="wstring" dir="in">
    11631163        <desc>ID of the new snapshot.</desc>
    11641164      </param>
     
    11771177        <see>ISnapshot</see>
    11781178      </desc>
    1179       <param name="machineId" type="uuid" dir="in">
     1179      <param name="machineId" type="wstring" dir="in">
    11801180        <desc>ID of the machine this event relates to.</desc>
    11811181      </param>
    1182       <param name="snapshotId" type="uuid" dir="in">
     1182      <param name="snapshotId" type="wstring" dir="in">
    11831183        <desc>
    11841184          ID of the discarded snapshot. <tt>null</tt> means the
     
    11941194        <see>ISnapshot</see>
    11951195      </desc>
    1196       <param name="machineId" type="uuid" dir="in">
     1196      <param name="machineId" type="wstring" dir="in">
    11971197        <desc>ID of the machine this event relates to.</desc>
    11981198      </param>
    1199       <param name="snapshotId" type="uuid" dir="in">
     1199      <param name="snapshotId" type="wstring" dir="in">
    12001200        <desc>ID of the changed snapshot.</desc>
    12011201      </param>
     
    12061206        Notification when a guest property has changed.
    12071207      </desc>
    1208       <param name="machineId" type="uuid" dir="in">
     1208      <param name="machineId" type="wstring" dir="in">
    12091209        <desc>
    12101210          ID of the machine this event relates to.
     
    16261626        <desc>Base machine folder (optional).</desc>
    16271627      </param>
    1628       <param name="id" type="uuid" dir="in">
     1628      <param name="id" type="wstring" dir="in">
    16291629        <desc>Machine UUID (optional).</desc>
    16301630      </param>
     
    16861686        <desc>Name of the machine settings file.</desc>
    16871687      </param>
    1688       <param name="id" type="uuid" dir="in">
     1688      <param name="id" type="wstring" dir="in">
    16891689        <desc>Machine UUID (optional).</desc>
    16901690      </param>
     
    17631763
    17641764      </desc>
    1765       <param name="id" type="uuid" dir="in"/>
     1765      <param name="id" type="wstring" dir="in"/>
    17661766      <param name="machine" type="IMachine" dir="return"/>
    17671767    </method>
     
    18201820
    18211821      </desc>
    1822       <param name="id" type="uuid" dir="in">
     1822      <param name="id" type="wstring" dir="in">
    18231823        <desc>UUID of the machine to unregister.</desc>
    18241824      </param>
     
    19741974
    19751975      </desc>
    1976       <param name="id" type="uuid" dir="in">
     1976      <param name="id" type="wstring" dir="in">
    19771977        <desc>UUID of the hard disk to look for.</desc>
    19781978      </param>
     
    20512051        </desc>
    20522052      </param>
    2053       <param name="id" type="uuid" dir="in">
     2053      <param name="id" type="wstring" dir="in">
    20542054        <desc>
    20552055          UUID to assign to the given image within this VirtualBox installation.
     
    20762076
    20772077      </desc>
    2078       <param name="id" type="uuid" dir="in">
     2078      <param name="id" type="wstring" dir="in">
    20792079        <desc>UUID of the image to look for.</desc>
    20802080      </param>
     
    21512151        </desc>
    21522152      </param>
    2153       <param name="id" type="uuid" dir="in">
     2153      <param name="id" type="wstring" dir="in">
    21542154        <desc>
    21552155          UUID to assign to the given image file within this VirtualBox
     
    21762176
    21772177      </desc>
    2178       <param name="id" type="uuid" dir="in">
     2178      <param name="id" type="wstring" dir="in">
    21792179        <desc>UUID of the image to look for.</desc>
    21802180      </param>
     
    24532453        </desc>
    24542454      </param>
    2455       <param name="machineId" type="uuid" dir="in">
     2455      <param name="machineId" type="wstring" dir="in">
    24562456        <desc>ID of the virtual machine to open a session with.</desc>
    24572457      </param>
     
    25452545        </desc>
    25462546      </param>
    2547       <param name="machineId" type="uuid" dir="in">
     2547      <param name="machineId" type="wstring" dir="in">
    25482548        <desc>ID of the virtual machine to open a session with.</desc>
    25492549      </param>
     
    26112611        </desc>
    26122612      </param>
    2613       <param name="machineId" type="uuid" dir="in">
     2613      <param name="machineId" type="wstring" dir="in">
    26142614        <desc>ID of the virtual machine to open a session with.</desc>
    26152615      </param>
     
    36063606        notification.
    36073607      </desc>
    3608       <param name="id" type="uuid" dir="in"/>
     3608      <param name="id" type="wstring" dir="in"/>
    36093609    </method>
    36103610
     
    36223622        </note>
    36233623      </desc>
    3624       <param name="id" type="uuid" dir="in"/>
     3624      <param name="id" type="wstring" dir="in"/>
    36253625      <param name="done" type="boolean" dir="in"/>
    36263626    </method>
     
    37823782        <desc>The console object that initiated this call.</desc>
    37833783      </param>
    3784       <param name="id" type="uuid" dir="in">
     3784      <param name="id" type="wstring" dir="in">
    37853785        <desc>UUID of the snapshot to discard.</desc>
    37863786      </param>
     
    41564156    </attribute>
    41574157
    4158     <attribute name="id" type="uuid" readonly="yes">
     4158    <attribute name="id" type="wstring" readonly="yes">
    41594159      <desc>UUID of the virtual machine.</desc>
    41604160    </attribute>
     
    46504650
    46514651      </desc>
    4652       <param name="id" type="uuid" dir="in">
     4652      <param name="id" type="wstring" dir="in">
    46534653        <desc>UUID of the hard disk to attach.</desc>
    46544654      </param>
     
    51205120
    51215121      </desc>
    5122       <param name="id" type="uuid" dir="in">
     5122      <param name="id" type="wstring" dir="in">
    51235123        <desc>UUID of the snapshot to get</desc>
    51245124      </param>
     
    51535153        </note>
    51545154      </desc>
    5155       <param name="id" type="uuid" dir="in">
     5155      <param name="id" type="wstring" dir="in">
    51565156        <desc>UUID of the snapshot to set as the current snapshot.</desc>
    51575157      </param>
     
    63706370        </result>
    63716371      </desc>
    6372       <param name="id" type="uuid" dir="in">
     6372      <param name="id" type="wstring" dir="in">
    63736373        <desc>UUID of the host USB device to attach.</desc>
    63746374      </param>
     
    63946394        </result>
    63956395      </desc>
    6396       <param name="id" type="uuid" dir="in">
     6396      <param name="id" type="wstring" dir="in">
    63976397        <desc>UUID of the USB device to detach.</desc>
    63986398      </param>
     
    64336433        <see>IUSBDevice::id</see>
    64346434      </desc>
    6435       <param name="id" type="uuid" dir="in">
     6435      <param name="id" type="wstring" dir="in">
    64366436        <desc>UUID of the USB device to search for.</desc>
    64376437      </param>
     
    66066606        </result>
    66076607      </desc>
    6608       <param name="id" type="uuid" dir="in">
     6608      <param name="id" type="wstring" dir="in">
    66096609        <desc>UUID of the snapshot to discard.</desc>
    66106610      </param>
     
    68806880    </attribute>
    68816881
    6882     <attribute name="id" type="uuid" readonly="yes">
     6882    <attribute name="id" type="wstring" readonly="yes">
    68836883      <desc>Returns the interface UUID.</desc>
    68846884    </attribute>
     
    71357135        </result>
    71367136      </desc>
    7137       <param name="id" type="uuid" dir="in">
     7137      <param name="id" type="wstring" dir="in">
    71387138        <desc>
    71397139          Adapter GUID.
     
    72987298        </note>
    72997299      </desc>
    7300       <param name="id" type="uuid" dir="in">
     7300      <param name="id" type="wstring" dir="in">
    73017301        <desc>GUID of the host network interface to search for.</desc>
    73027302      </param>
     
    73277327        <see>IHostUSBDevice::id</see>
    73287328      </desc>
    7329       <param name="id" type="uuid" dir="in">
     7329      <param name="id" type="wstring" dir="in">
    73307330        <desc>UUID of the USB device to search for.</desc>
    73317331      </param>
     
    78607860    </desc>
    78617861
    7862     <attribute name="id" type="uuid" readonly="yes">
     7862    <attribute name="id" type="wstring" readonly="yes">
    78637863      <desc>ID of the task.</desc>
    78647864    </attribute>
     
    79067906    </attribute>
    79077907
    7908     <attribute name="resultCode" type="result" readonly="yes">
     7908    <attribute name="resultCode" type="long" readonly="yes">
    79097909      <desc>
    79107910        Result code of the progress task.
     
    81478147    </desc>
    81488148
    8149     <attribute name="id" type="uuid" readonly="yes">
     8149    <attribute name="id" type="wstring" readonly="yes">
    81508150      <desc>UUID of the snapshot.</desc>
    81518151    </attribute>
     
    83598359    </desc>
    83608360
    8361     <attribute name="id" type="uuid" readonly="yes">
     8361    <attribute name="id" type="wstring" readonly="yes">
    83628362      <desc>
    83638363        UUID of the medium. For a newly created medium, this value is a randomly
     
    84898489    </attribute>
    84908490
    8491     <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
     8491    <attribute name="machineIds" type="wstring" safearray="yes" readonly="yes">
    84928492      <desc>
    84938493        Array of UUIDs of all machines this medium is attached to.
     
    85228522        the snapshots.
    85238523      </desc>
    8524       <param name="machineId" type="uuid" dir="in">
     8524      <param name="machineId" type="wstring" dir="in">
    85258525        <desc>
    85268526          UUID of the machine to query.
    85278527        </desc>
    85288528      </param>
    8529       <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
     8529      <param name="snapshotIds" type="wstring" safearray="yes" dir="return">
    85308530        <desc>
    85318531          Array of snapshot UUIDs of the given machine using this medium.
     
    95529552        </note>
    95539553      </desc>
    9554       <param name="targetId" type="uuid" dir="in">
     9554      <param name="targetId" type="wstring" dir="in">
    95559555        <desc>UUID of the target ancestor or descendant hard disk.</desc>
    95569556      </param>
     
    99429942
    99439943      </desc>
    9944       <param name="imageId" type="uuid" dir="in"/>
     9944      <param name="imageId" type="wstring" dir="in"/>
    99459945    </method>
    99469946
     
    1000810008
    1000910009      </desc>
    10010       <param name="imageId" type="uuid" dir="in"/>
     10010      <param name="imageId" type="wstring" dir="in"/>
    1001110011    </method>
    1001210012
     
    1152511525    </desc>
    1152611526
    11527     <attribute name="id" type="uuid" readonly="yes">
     11527    <attribute name="id" type="wstring" readonly="yes">
    1152811528      <desc>
    1152911529        Unique USB device ID. This ID is built from #vendorId,
     
    1244312443
    1244412444      </desc>
    12445       <param name="id" type="uuid" dir="in"/>
     12445      <param name="id" type="wstring" dir="in"/>
    1244612446      <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
    1244712447    </method>
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r19134 r19239  
    5252        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    5353        COM_INTERFACE_ENTRY(IAppliance)
     54        COM_INTERFACE_ENTRY(IDispatch)
    5455    END_COM_MAP()
    5556
  • trunk/src/VBox/Main/include/AudioAdapterImpl.h

    r19134 r19239  
    6363        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    6464        COM_INTERFACE_ENTRY(IAudioAdapter)
     65        COM_INTERFACE_ENTRY(IDispatch)
    6566    END_COM_MAP()
    6667
  • trunk/src/VBox/Main/include/BIOSSettingsImpl.h

    r19134 r19239  
    8484        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    8585        COM_INTERFACE_ENTRY(IBIOSSettings)
     86        COM_INTERFACE_ENTRY(IDispatch)
    8687    END_COM_MAP()
    8788
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r19134 r19239  
    9393        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    9494        COM_INTERFACE_ENTRY(IConsole)
     95        COM_INTERFACE_ENTRY(IDispatch)
    9596    END_COM_MAP()
    9697
     
    137138    STDMETHOD(GetDeviceActivity) (DeviceType_T aDeviceType,
    138139                                 DeviceActivity_T *aDeviceActivity);
    139     STDMETHOD(AttachUSBDevice) (IN_GUID aId);
    140     STDMETHOD(DetachUSBDevice) (IN_GUID aId, IUSBDevice **aDevice);
     140    STDMETHOD(AttachUSBDevice) (IN_BSTR aId);
     141    STDMETHOD(DetachUSBDevice) (IN_BSTR aId, IUSBDevice **aDevice);
    141142    STDMETHOD(FindUSBDeviceByAddress) (IN_BSTR aAddress, IUSBDevice **aDevice);
    142     STDMETHOD(FindUSBDeviceById) (IN_GUID aId, IUSBDevice **aDevice);
     143    STDMETHOD(FindUSBDeviceById) (IN_BSTR aId, IUSBDevice **aDevice);
    143144    STDMETHOD(CreateSharedFolder) (IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable);
    144145    STDMETHOD(RemoveSharedFolder) (IN_BSTR aName);
    145146    STDMETHOD(TakeSnapshot) (IN_BSTR aName, IN_BSTR aDescription,
    146147                             IProgress **aProgress);
    147     STDMETHOD(DiscardSnapshot) (IN_GUID aId, IProgress **aProgress);
     148    STDMETHOD(DiscardSnapshot) (IN_BSTR aId, IProgress **aProgress);
    148149    STDMETHOD(DiscardCurrentState) (IProgress **aProgress);
    149150    STDMETHOD(DiscardCurrentSnapshotAndState) (IProgress **aProgress);
     
    184185    HRESULT onSharedFolderChange (BOOL aGlobal);
    185186    HRESULT onUSBDeviceAttach (IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs);
    186     HRESULT onUSBDeviceDetach (IN_GUID aId, IVirtualBoxErrorInfo *aError);
     187    HRESULT onUSBDeviceDetach (IN_BSTR aId, IVirtualBoxErrorInfo *aError);
    187188    HRESULT getGuestProperty (IN_BSTR aKey, BSTR *aValue, ULONG64 *aTimestamp, BSTR *aFlags);
    188189    HRESULT setGuestProperty (IN_BSTR aKey, IN_BSTR aValue, IN_BSTR aFlags);
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r19134 r19239  
    249249        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    250250        COM_INTERFACE_ENTRY(IRemoteDisplayInfo)
     251        COM_INTERFACE_ENTRY(IDispatch)
    251252    END_COM_MAP()
    252253
  • trunk/src/VBox/Main/include/DHCPServerImpl.h

    r19134 r19239  
    5151        COM_INTERFACE_ENTRY (ISupportErrorInfo)
    5252        COM_INTERFACE_ENTRY (IDHCPServer)
     53        COM_INTERFACE_ENTRY (IDispatch)
    5354    END_COM_MAP()
    5455
  • trunk/src/VBox/Main/include/DVDDriveImpl.h

    r19134 r19239  
    7070        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    7171        COM_INTERFACE_ENTRY(IDVDDrive)
     72        COM_INTERFACE_ENTRY(IDispatch)
    7273    END_COM_MAP()
    7374
     
    9192
    9293    // IDVDDrive methods
    93     STDMETHOD(MountImage) (IN_GUID aImageId);
     94    STDMETHOD(MountImage) (IN_BSTR aImageId);
    9495    STDMETHOD(CaptureHostDrive) (IHostDVDDrive *aHostDVDDrive);
    9596    STDMETHOD(Unmount)();
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r19134 r19239  
    101101        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    102102        COM_INTERFACE_ENTRY(IDisplay)
     103        COM_INTERFACE_ENTRY2(IDispatch,IDisplay)
    103104    END_COM_MAP()
    104105
  • trunk/src/VBox/Main/include/FloppyDriveImpl.h

    r19134 r19239  
    7070        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    7171        COM_INTERFACE_ENTRY(IFloppyDrive)
     72        COM_INTERFACE_ENTRY(IDispatch)
    7273    END_COM_MAP()
    7374
     
    9192
    9293    // IFloppyDrive methods
    93     STDMETHOD(MountImage) (IN_GUID aImageId);
     94    STDMETHOD(MountImage) (IN_BSTR aImageId);
    9495    STDMETHOD(CaptureHostDrive) (IHostFloppyDrive *aHostFloppyDrive);
    9596    STDMETHOD(Unmount)();
  • trunk/src/VBox/Main/include/FramebufferImpl.h

    r19134 r19239  
    4040    BEGIN_COM_MAP(InternalFramebuffer)
    4141        COM_INTERFACE_ENTRY(IFramebuffer)
     42        COM_INTERFACE_ENTRY(IDispatch)
    4243    END_COM_MAP()
    4344
  • trunk/src/VBox/Main/include/GuestImpl.h

    r19134 r19239  
    4545        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    4646        COM_INTERFACE_ENTRY(IGuest)
     47        COM_INTERFACE_ENTRY(IDispatch)
    4748    END_COM_MAP()
    4849
  • trunk/src/VBox/Main/include/GuestOSTypeImpl.h

    r19134 r19239  
    4545        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    4646        COM_INTERFACE_ENTRY(IGuestOSType)
     47        COM_INTERFACE_ENTRY(IDispatch)
    4748    END_COM_MAP()
    4849
  • trunk/src/VBox/Main/include/HardDiskAttachmentImpl.h

    r19134 r19239  
    7474        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    7575        COM_INTERFACE_ENTRY(IHardDiskAttachment)
     76        COM_INTERFACE_ENTRY(IDispatch)
    7677    END_COM_MAP()
    7778
  • trunk/src/VBox/Main/include/HardDiskFormatImpl.h

    r19134 r19239  
    8282        COM_INTERFACE_ENTRY (ISupportErrorInfo)
    8383        COM_INTERFACE_ENTRY (IHardDiskFormat)
     84        COM_INTERFACE_ENTRY (IDispatch)
    8485    END_COM_MAP()
    8586
  • trunk/src/VBox/Main/include/HardDiskImpl.h

    r19134 r19239  
    6565
    6666    BEGIN_COM_MAP (HardDisk)
    67         COM_INTERFACE_ENTRY (ISupportErrorInfo)
     67        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    6868        COM_INTERFACE_ENTRY2 (IMedium, MediumBase)
    69         COM_INTERFACE_ENTRY (IHardDisk)
     69        COM_INTERFACE_ENTRY  (IHardDisk)
     70        COM_INTERFACE_ENTRY2 (IDispatch, IHardDisk)
     71        COM_INTERFACE_ENTRY2 (IDispatch, MediumBase)
    7072    END_COM_MAP()
    7173
     
    124126                                  HardDiskVariant_T aVariant,
    125127                                  IProgress **aProgress);
    126     STDMETHOD(MergeTo) (IN_GUID aTargetId, IProgress **aProgress);
     128    STDMETHOD(MergeTo) (IN_BSTR aTargetId, IProgress **aProgress);
    127129    STDMETHOD(CloneTo) (IHardDisk *aTarget, HardDiskVariant_T aVariant,
    128130                        IHardDisk *aParent, IProgress **aProgress);
  • trunk/src/VBox/Main/include/HostDVDDriveImpl.h

    r19134 r19239  
    4242        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    4343        COM_INTERFACE_ENTRY(IHostDVDDrive)
     44        COM_INTERFACE_ENTRY(IDispatch)
    4445    END_COM_MAP()
    4546
  • trunk/src/VBox/Main/include/HostFloppyDriveImpl.h

    r19134 r19239  
    4242        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    4343        COM_INTERFACE_ENTRY(IHostFloppyDrive)
     44        COM_INTERFACE_ENTRY(IDispatch)
    4445    END_COM_MAP()
    4546
  • trunk/src/VBox/Main/include/HostImpl.h

    r19134 r19239  
    6565        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    6666        COM_INTERFACE_ENTRY(IHost)
     67        COM_INTERFACE_ENTRY(IDispatch)
    6768    END_COM_MAP()
    6869
     
    9697    STDMETHOD(CreateHostOnlyNetworkInterface) (IHostNetworkInterface **aHostNetworkInterface,
    9798                                           IProgress **aProgress);
    98     STDMETHOD(RemoveHostOnlyNetworkInterface) (IN_GUID aId,
     99    STDMETHOD(RemoveHostOnlyNetworkInterface) (IN_BSTR aId,
    99100                                           IHostNetworkInterface **aHostNetworkInterface,
    100101                                           IProgress **aProgress);
     
    106107    STDMETHOD(FindHostFloppyDrive) (IN_BSTR aName, IHostFloppyDrive **aDrive);
    107108    STDMETHOD(FindHostNetworkInterfaceByName) (IN_BSTR aName, IHostNetworkInterface **networkInterface);
    108     STDMETHOD(FindHostNetworkInterfaceById) (IN_GUID id, IHostNetworkInterface **networkInterface);
     109    STDMETHOD(FindHostNetworkInterfaceById) (IN_BSTR id, IHostNetworkInterface **networkInterface);
    109110    STDMETHOD(FindHostNetworkInterfacesOfType) (HostNetworkInterfaceType_T type, ComSafeArrayOut (IHostNetworkInterface *, aNetworkInterfaces));
    110111    STDMETHOD(FindUSBDeviceByAddress) (IN_BSTR aAddress, IHostUSBDevice **aDevice);
    111     STDMETHOD(FindUSBDeviceById) (IN_GUID aId, IHostUSBDevice **aDevice);
     112    STDMETHOD(FindUSBDeviceById) (IN_BSTR aId, IHostUSBDevice **aDevice);
    112113
    113114    // public methods only for internal purposes
  • trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h

    r19134 r19239  
    5151        COM_INTERFACE_ENTRY (ISupportErrorInfo)
    5252        COM_INTERFACE_ENTRY (IHostNetworkInterface)
     53        COM_INTERFACE_ENTRY (IDispatch)
    5354    END_COM_MAP()
    5455
     
    6970    // IHostNetworkInterface properties
    7071    STDMETHOD(COMGETTER(Name)) (BSTR *aInterfaceName);
    71     STDMETHOD(COMGETTER(Id)) (OUT_GUID aGuid);
     72    STDMETHOD(COMGETTER(Id)) (BSTR *aGuid);
    7273    STDMETHOD(COMGETTER(DhcpEnabled)) (BOOL *aDhcpEnabled);
    7374    STDMETHOD(COMGETTER(IPAddress)) (BSTR *aIPAddress);
  • trunk/src/VBox/Main/include/KeyboardImpl.h

    r19134 r19239  
    6565        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    6666        COM_INTERFACE_ENTRY(IKeyboard)
     67        COM_INTERFACE_ENTRY(IDispatch)
    6768    END_COM_MAP()
    6869
  • trunk/src/VBox/Main/include/MachineDebuggerImpl.h

    r19134 r19239  
    4646        COM_INTERFACE_ENTRY (ISupportErrorInfo)
    4747        COM_INTERFACE_ENTRY (IMachineDebugger)
     48        COM_INTERFACE_ENTRY (IDispatch)
    4849    END_COM_MAP()
    4950
  • trunk/src/VBox/Main/include/MachineImpl.h

    r19236 r19239  
    456456        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    457457        COM_INTERFACE_ENTRY(IMachine)
     458        COM_INTERFACE_ENTRY(IDispatch)
    458459    END_COM_MAP()
    459460
     
    482483    STDMETHOD(COMGETTER(Description))(BSTR *aDescription);
    483484    STDMETHOD(COMSETTER(Description))(IN_BSTR aDescription);
    484     STDMETHOD(COMGETTER(Id))(OUT_GUID aId);
     485    STDMETHOD(COMGETTER(Id))(BSTR *aId);
    485486    STDMETHOD(COMGETTER(OSTypeId)) (BSTR *aOSTypeId);
    486487    STDMETHOD(COMSETTER(OSTypeId)) (IN_BSTR aOSTypeId);
     
    541542    STDMETHOD(SetBootOrder)(ULONG aPosition, DeviceType_T aDevice);
    542543    STDMETHOD(GetBootOrder)(ULONG aPosition, DeviceType_T *aDevice);
    543     STDMETHOD(AttachHardDisk)(IN_GUID aId, IN_BSTR aControllerName,
     544    STDMETHOD(AttachHardDisk)(IN_BSTR aId, IN_BSTR aControllerName,
    544545                              LONG aControllerPort, LONG aDevice);
    545546    STDMETHOD(GetHardDisk)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice,
     
    557558    STDMETHOD(DeleteSettings)();
    558559    STDMETHOD(Export)(IAppliance *aAppliance, IVirtualSystemDescription **aDescription);
    559     STDMETHOD(GetSnapshot) (IN_GUID aId, ISnapshot **aSnapshot);
     560    STDMETHOD(GetSnapshot) (IN_BSTR aId, ISnapshot **aSnapshot);
    560561    STDMETHOD(FindSnapshot) (IN_BSTR aName, ISnapshot **aSnapshot);
    561     STDMETHOD(SetCurrentSnapshot) (IN_GUID aId);
     562    STDMETHOD(SetCurrentSnapshot) (IN_BSTR aId);
    562563    STDMETHOD(CreateSharedFolder) (IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable);
    563564    STDMETHOD(RemoveSharedFolder) (IN_BSTR aName);
     
    906907    STDMETHOD(GetIPCId)(BSTR *id);
    907908    STDMETHOD(RunUSBDeviceFilters) (IUSBDevice *aUSBDevice, BOOL *aMatched, ULONG *aMaskedIfs);
    908     STDMETHOD(CaptureUSBDevice) (IN_GUID aId);
    909     STDMETHOD(DetachUSBDevice) (IN_GUID aId, BOOL aDone);
     909    STDMETHOD(CaptureUSBDevice) (IN_BSTR aId);
     910    STDMETHOD(DetachUSBDevice) (IN_BSTR aId, BOOL aDone);
    910911    STDMETHOD(AutoCaptureUSBDevices)();
    911912    STDMETHOD(DetachAllUSBDevices)(BOOL aDone);
     
    919920                                    IProgress **aServerProgress);
    920921    STDMETHOD(EndTakingSnapshot) (BOOL aSuccess);
    921     STDMETHOD(DiscardSnapshot) (IConsole *aInitiator, IN_GUID aId,
     922    STDMETHOD(DiscardSnapshot) (IConsole *aInitiator, IN_BSTR aId,
    922923                               MachineState_T *aMachineState, IProgress **aProgress);
    923924    STDMETHOD(DiscardCurrentState) (
     
    948949                               IVirtualBoxErrorInfo *aError,
    949950                               ULONG aMaskedIfs);
    950     HRESULT onUSBDeviceDetach (IN_GUID aId,
     951    HRESULT onUSBDeviceDetach (IN_BSTR aId,
    951952                               IVirtualBoxErrorInfo *aError);
    952953    HRESULT onSharedFolderChange();
  • trunk/src/VBox/Main/include/MediumImpl.h

    r19134 r19239  
    9292
    9393    // IMedium properties
    94     STDMETHOD(COMGETTER(Id)) (OUT_GUID aId);
     94    STDMETHOD(COMGETTER(Id)) (BSTR *aId);
    9595    STDMETHOD(COMGETTER(Description)) (BSTR *aDescription);
    9696    STDMETHOD(COMSETTER(Description)) (IN_BSTR aDescription);
     
    101101    STDMETHOD(COMGETTER(Size)) (ULONG64 *aSize);
    102102    STDMETHOD(COMGETTER(LastAccessError)) (BSTR *aLastAccessError);
    103     STDMETHOD(COMGETTER(MachineIds)) (ComSafeGUIDArrayOut (aMachineIds));
     103    STDMETHOD(COMGETTER(MachineIds)) (ComSafeArrayOut (BSTR, aMachineIds));
    104104
    105105    // IMedium methods
    106     STDMETHOD(GetSnapshotIds) (IN_GUID aMachineId,
    107                                ComSafeGUIDArrayOut (aSnapshotIds));
     106    STDMETHOD(GetSnapshotIds) (IN_BSTR aMachineId,
     107                               ComSafeArrayOut (BSTR, aSnapshotIds));
    108108    STDMETHOD(LockRead) (MediaState_T *aState);
    109109    STDMETHOD(UnlockRead) (MediaState_T *aState);
     
    254254
    255255    BEGIN_COM_MAP (DVDImage)
    256         COM_INTERFACE_ENTRY (ISupportErrorInfo)
     256        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    257257        COM_INTERFACE_ENTRY2 (IMedium, ImageMediumBase)
    258         COM_INTERFACE_ENTRY (IDVDImage)
     258        COM_INTERFACE_ENTRY  (IDVDImage)
     259        COM_INTERFACE_ENTRY2 (IDispatch, IDVDImage)
    259260    END_COM_MAP()
    260261
     
    307308
    308309    BEGIN_COM_MAP (FloppyImage)
    309         COM_INTERFACE_ENTRY (ISupportErrorInfo)
     310        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
    310311        COM_INTERFACE_ENTRY2 (IMedium, ImageMediumBase)
    311         COM_INTERFACE_ENTRY (IFloppyImage)
     312        COM_INTERFACE_ENTRY  (IFloppyImage)
     313        COM_INTERFACE_ENTRY2 (IDispatch, IFloppyImage)
    312314    END_COM_MAP()
    313315
  • trunk/src/VBox/Main/include/MouseImpl.h

    r19134 r19239  
    6464
    6565    BEGIN_COM_MAP(Mouse)
    66         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    67         COM_INTERFACE_ENTRY(IMouse)
     66        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     67        COM_INTERFACE_ENTRY  (IMouse)
     68        COM_INTERFACE_ENTRY2 (IDispatch, IMouse)
    6869    END_COM_MAP()
    6970
  • trunk/src/VBox/Main/include/NetworkAdapterImpl.h

    r19134 r19239  
    8383
    8484    BEGIN_COM_MAP(NetworkAdapter)
    85         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    86         COM_INTERFACE_ENTRY(INetworkAdapter)
     85        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     86        COM_INTERFACE_ENTRY  (INetworkAdapter)
     87        COM_INTERFACE_ENTRY2 (IDispatch, INetworkAdapter)
    8788    END_COM_MAP()
    8889
  • trunk/src/VBox/Main/include/ParallelPortImpl.h

    r19134 r19239  
    6969
    7070    BEGIN_COM_MAP(ParallelPort)
    71         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    72         COM_INTERFACE_ENTRY(IParallelPort)
     71        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     72        COM_INTERFACE_ENTRY  (IParallelPort)
     73        COM_INTERFACE_ENTRY2 (IDispatch, IParallelPort)
    7374    END_COM_MAP()
    7475
  • trunk/src/VBox/Main/include/PerformanceImpl.h

    r19134 r19239  
    6464    BEGIN_COM_MAP (PerformanceMetric)
    6565        COM_INTERFACE_ENTRY (IPerformanceMetric)
     66        COM_INTERFACE_ENTRY (IDispatch)
    6667    END_COM_MAP()
    6768
     
    136137        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    137138        COM_INTERFACE_ENTRY(IPerformanceCollector)
     139        COM_INTERFACE_ENTRY(IDispatch)
    138140    END_COM_MAP()
    139141
  • trunk/src/VBox/Main/include/ProgressImpl.h

    r19134 r19239  
    6666
    6767    // IProgress properties
    68     STDMETHOD(COMGETTER(Id)) (OUT_GUID aId);
     68    STDMETHOD(COMGETTER(Id)) (BSTR *aId);
    6969    STDMETHOD(COMGETTER(Description)) (BSTR *aDescription);
    7070    STDMETHOD(COMGETTER(Initiator)) (IUnknown **aInitiator);
     
    146146
    147147    BEGIN_COM_MAP (Progress)
    148         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    149         COM_INTERFACE_ENTRY (IProgress)
     148        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     149        COM_INTERFACE_ENTRY  (IProgress)
     150        COM_INTERFACE_ENTRY2 (IDispatch, IProgress)
    150151    END_COM_MAP()
    151152
     
    317318
    318319    BEGIN_COM_MAP (CombinedProgress)
    319         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    320         COM_INTERFACE_ENTRY (IProgress)
     320        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     321        COM_INTERFACE_ENTRY  (IProgress)
     322        COM_INTERFACE_ENTRY2 (IDispatch, IProgress)
    321323    END_COM_MAP()
    322324
  • trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h

    r19134 r19239  
    4646
    4747    BEGIN_COM_MAP (RemoteUSBDevice)
    48         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    49         COM_INTERFACE_ENTRY (IHostUSBDevice)
    50         COM_INTERFACE_ENTRY (IUSBDevice)
     48        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     49        COM_INTERFACE_ENTRY  (IHostUSBDevice)
     50        COM_INTERFACE_ENTRY  (IUSBDevice)
     51        COM_INTERFACE_ENTRY2 (IDispatch, IUSBDevice)
    5152    END_COM_MAP()
    5253
     
    6364
    6465    // IUSBDevice properties
    65     STDMETHOD(COMGETTER(Id)) (OUT_GUID aId);
     66    STDMETHOD(COMGETTER(Id)) (BSTR *aId);
    6667    STDMETHOD(COMGETTER(VendorId)) (USHORT *aVendorId);
    6768    STDMETHOD(COMGETTER(ProductId)) (USHORT *aProductId);
  • trunk/src/VBox/Main/include/SerialPortImpl.h

    r19134 r19239  
    7676
    7777    BEGIN_COM_MAP(SerialPort)
    78         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    79         COM_INTERFACE_ENTRY(ISerialPort)
     78        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     79        COM_INTERFACE_ENTRY  (ISerialPort)
     80        COM_INTERFACE_ENTRY2 (IDispatch, ISerialPort)
    8081    END_COM_MAP()
    8182
  • trunk/src/VBox/Main/include/SessionImpl.h

    r19134 r19239  
    4646    public VirtualBoxSupportTranslation <Session>,
    4747#ifdef RT_OS_WINDOWS
    48     public IDispatchImpl<ISession, &IID_ISession, &LIBID_VirtualBox,
    49                          kTypeLibraryMajorVersion, kTypeLibraryMinorVersion>,
    50     public IDispatchImpl<IInternalSessionControl, &IID_IInternalSessionControl, &LIBID_VirtualBox,
    51                          kTypeLibraryMajorVersion, kTypeLibraryMinorVersion>,   
     48    VBOX_SCRIPTABLE_IMPL(ISession),
     49    VBOX_SCRIPTABLE_IMPL(IInternalSessionControl),
    5250    public CComCoClass<Session, &CLSID_Session>
    5351#else
     
    6664
    6765    BEGIN_COM_MAP(Session)
    68         //COM_INTERFACE_ENTRY(IDispatch)
     66        COM_INTERFACE_ENTRY2(IDispatch, ISession)
     67        COM_INTERFACE_ENTRY2(IDispatch, IInternalSessionControl)       
    6968        COM_INTERFACE_ENTRY(IInternalSessionControl)
    7069        COM_INTERFACE_ENTRY(ISupportErrorInfo)
     
    107106    STDMETHOD(OnSharedFolderChange) (BOOL aGlobal);
    108107    STDMETHOD(OnUSBDeviceAttach) (IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs);
    109     STDMETHOD(OnUSBDeviceDetach) (IN_GUID aId, IVirtualBoxErrorInfo *aError);
     108    STDMETHOD(OnUSBDeviceDetach) (IN_BSTR aId, IVirtualBoxErrorInfo *aError);
    110109    STDMETHOD(OnShowWindow) (BOOL aCheck, BOOL *aCanShow, ULONG64 *aWinId);
    111110    STDMETHOD(AccessGuestProperty) (IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags,
  • trunk/src/VBox/Main/include/SharedFolderImpl.h

    r19134 r19239  
    5555
    5656    BEGIN_COM_MAP(SharedFolder)
    57         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    58         COM_INTERFACE_ENTRY(ISharedFolder)
     57        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     58        COM_INTERFACE_ENTRY  (ISharedFolder)
     59        COM_INTERFACE_ENTRY2 (IDispatch, ISharedFolder)
    5960    END_COM_MAP()
    6061
  • trunk/src/VBox/Main/include/SnapshotImpl.h

    r19134 r19239  
    5959
    6060    BEGIN_COM_MAP(Snapshot)
    61         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    62         COM_INTERFACE_ENTRY(ISnapshot)
     61        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     62        COM_INTERFACE_ENTRY  (ISnapshot)
     63        COM_INTERFACE_ENTRY2 (IDispatch, ISnapshot)
    6364    END_COM_MAP()
    6465
     
    7778
    7879    // ISnapshot properties
    79     STDMETHOD(COMGETTER(Id)) (OUT_GUID aId);
     80    STDMETHOD(COMGETTER(Id)) (BSTR *aId);
    8081    STDMETHOD(COMGETTER(Name)) (BSTR *aName);
    8182    STDMETHOD(COMSETTER(Name)) (IN_BSTR aName);
  • trunk/src/VBox/Main/include/StorageControllerImpl.h

    r19134 r19239  
    9090
    9191    BEGIN_COM_MAP(StorageController)
    92         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    93         COM_INTERFACE_ENTRY (IStorageController)
     92        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     93        COM_INTERFACE_ENTRY  (IStorageController)
     94        COM_INTERFACE_ENTRY2 (IDispatch, IStorageController)
    9495    END_COM_MAP()
    9596
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r19134 r19239  
    4949
    5050    BEGIN_COM_MAP(SystemProperties)
    51         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    52         COM_INTERFACE_ENTRY(ISystemProperties)
     51        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     52        COM_INTERFACE_ENTRY  (ISystemProperties)
     53        COM_INTERFACE_ENTRY2 (IDispatch, ISystemProperties)
    5354    END_COM_MAP()
    5455
  • trunk/src/VBox/Main/include/USBControllerImpl.h

    r19134 r19239  
    7676
    7777    BEGIN_COM_MAP(USBController)
    78         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    79         COM_INTERFACE_ENTRY (IUSBController)
     78        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     79        COM_INTERFACE_ENTRY  (IUSBController)
     80        COM_INTERFACE_ENTRY2 (IDispatch, IUSBController)
    8081    END_COM_MAP()
    8182
  • trunk/src/VBox/Main/include/USBDeviceImpl.h

    r19134 r19239  
    4747
    4848    BEGIN_COM_MAP(OUSBDevice)
    49         COM_INTERFACE_ENTRY (ISupportErrorInfo)
    50         COM_INTERFACE_ENTRY (IUSBDevice)
     49        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     50        COM_INTERFACE_ENTRY  (IUSBDevice)
     51        COM_INTERFACE_ENTRY2 (IDispatch, IUSBDevice)
    5152    END_COM_MAP()
    5253
     
    6364
    6465    // IUSBDevice properties
    65     STDMETHOD(COMGETTER(Id))(OUT_GUID aId);
     66    STDMETHOD(COMGETTER(Id))(BSTR *aId);
    6667    STDMETHOD(COMGETTER(VendorId))(USHORT *aVendorId);
    6768    STDMETHOD(COMGETTER(ProductId))(USHORT *aProductId);
  • trunk/src/VBox/Main/include/VRDPServerImpl.h

    r19134 r19239  
    6969
    7070    BEGIN_COM_MAP(VRDPServer)
    71         COM_INTERFACE_ENTRY(ISupportErrorInfo)
    72         COM_INTERFACE_ENTRY(IVRDPServer)
     71        COM_INTERFACE_ENTRY  (ISupportErrorInfo)
     72        COM_INTERFACE_ENTRY  (IVRDPServer)
     73        COM_INTERFACE_ENTRY2 (IDispatch, IVRDPServer)
    7374    END_COM_MAP()
    7475
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r19236 r19239  
    139139
    140140    STDMETHOD(CreateMachine) (IN_BSTR aName, IN_BSTR aOsTypeId, IN_BSTR aBaseFolder,
    141                               IN_GUID aId, IMachine **aMachine);
     141                              IN_BSTR aId, IMachine **aMachine);
    142142    STDMETHOD(CreateLegacyMachine) (IN_BSTR aName, IN_BSTR aOsTypeId, IN_BSTR aSettingsFile,
    143                                     IN_GUID aId, IMachine **aMachine);
     143                                    IN_BSTR aId, IMachine **aMachine);
    144144    STDMETHOD(OpenMachine) (IN_BSTR aSettingsFile, IMachine **aMachine);
    145145    STDMETHOD(RegisterMachine) (IMachine *aMachine);
    146     STDMETHOD(GetMachine) (IN_GUID aId, IMachine **aMachine);
     146    STDMETHOD(GetMachine) (IN_BSTR aId, IMachine **aMachine);
    147147    STDMETHOD(FindMachine) (IN_BSTR aName, IMachine **aMachine);
    148     STDMETHOD(UnregisterMachine) (IN_GUID aId, IMachine **aMachine);
     148    STDMETHOD(UnregisterMachine) (IN_BSTR aId, IMachine **aMachine);
    149149    STDMETHOD(CreateAppliance) (IAppliance **anAppliance);
    150150
     
    152152                               IHardDisk **aHardDisk);
    153153    STDMETHOD(OpenHardDisk) (IN_BSTR aLocation, AccessMode_T accessMode, IHardDisk **aHardDisk);
    154     STDMETHOD(GetHardDisk) (IN_GUID aId, IHardDisk **aHardDisk);
     154    STDMETHOD(GetHardDisk) (IN_BSTR aId, IHardDisk **aHardDisk);
    155155    STDMETHOD(FindHardDisk) (IN_BSTR aLocation, IHardDisk **aHardDisk);
    156156
    157     STDMETHOD(OpenDVDImage) (IN_BSTR aLocation, IN_GUID aId,
     157    STDMETHOD(OpenDVDImage) (IN_BSTR aLocation, IN_BSTR aId,
    158158                             IDVDImage **aDVDImage);
    159     STDMETHOD(GetDVDImage) (IN_GUID aId, IDVDImage **aDVDImage);
     159    STDMETHOD(GetDVDImage) (IN_BSTR aId, IDVDImage **aDVDImage);
    160160    STDMETHOD(FindDVDImage) (IN_BSTR aLocation, IDVDImage **aDVDImage);
    161161
    162     STDMETHOD(OpenFloppyImage) (IN_BSTR aLocation, IN_GUID aId,
     162    STDMETHOD(OpenFloppyImage) (IN_BSTR aLocation, IN_BSTR aId,
    163163                                IFloppyImage **aFloppyImage);
    164     STDMETHOD(GetFloppyImage) (IN_GUID aId, IFloppyImage **aFloppyImage);
     164    STDMETHOD(GetFloppyImage) (IN_BSTR aId, IFloppyImage **aFloppyImage);
    165165    STDMETHOD(FindFloppyImage) (IN_BSTR aLocation, IFloppyImage **aFloppyImage);
    166166
     
    171171    STDMETHOD(GetExtraData) (IN_BSTR aKey, BSTR *aValue);
    172172    STDMETHOD(SetExtraData) (IN_BSTR aKey, IN_BSTR aValue);
    173     STDMETHOD(OpenSession) (ISession *aSession, IN_GUID aMachineId);
    174     STDMETHOD(OpenRemoteSession) (ISession *aSession, IN_GUID aMachineId,
     173    STDMETHOD(OpenSession) (ISession *aSession, IN_BSTR aMachineId);
     174    STDMETHOD(OpenRemoteSession) (ISession *aSession, IN_BSTR aMachineId,
    175175                                  IN_BSTR aType, IN_BSTR aEnvironment,
    176176                                  IProgress **aProgress);
    177     STDMETHOD(OpenExistingSession) (ISession *aSession, IN_GUID aMachineId);
     177    STDMETHOD(OpenExistingSession) (ISession *aSession, IN_BSTR aMachineId);
    178178
    179179    STDMETHOD(RegisterCallback) (IVirtualBoxCallback *aCallback);
  • trunk/src/VBox/Main/testcase/tstAPI.cpp

    r18177 r19239  
    7373
    7474    printf("Getting machine GUID...\n");
    75     Guid guid;
     75    Bstr guid;   
    7676    CHECK_RC (machine->COMGETTER(Id) (guid.asOutParam()));
    7777    if (SUCCEEDED (rc) && !guid.isEmpty()) {
    78         printf ("Guid::toString(): {%s}\n", (const char *) guid.toString());
     78        printf ("Guid::toString(): {%s}\n", Utf8Str(guid).c_str());
    7979    } else {
    8080        printf ("WARNING: there's no GUID!");
  • trunk/src/VBox/Main/win/NetIf-win.cpp

    r19233 r19239  
    10251025    if(hr == S_OK)
    10261026    {
    1027         GUID                IfGuid;
    1028         hr = pIf->COMGETTER(Id)(&IfGuid);
     1027        Bstr                IfGuid;
     1028        hr = pIf->COMGETTER(Id)(IfGuid.asOutParam());
    10291029        Assert(hr == S_OK);
    10301030        if (hr == S_OK)
     
    11561156#else
    11571157    HRESULT rc;
    1158     GUID guid;
    1159     rc = pIf->COMGETTER(Id) (&guid);
     1158    Bstr guid;
     1159    rc = pIf->COMGETTER(Id) (guid.asOutParam());
    11601160    if(SUCCEEDED(rc))
    11611161    {
     
    11851185
    11861186                    d->msgCode = SVCHlpMsg::EnableStaticIpConfig;
    1187                     d->guid = guid;
     1187                    d->guid = Guid(guid);
    11881188                    d->iface = pIf;
    11891189                    d->u.StaticIP.IPAddress = ip;
     
    12181218#else
    12191219    HRESULT rc;
    1220     GUID guid;
    1221     rc = pIf->COMGETTER(Id) (&guid);
     1220    Bstr guid;
     1221    rc = pIf->COMGETTER(Id) (guid.asOutParam());
    12221222    if(SUCCEEDED(rc))
    12231223    {
     
    12801280#else
    12811281    HRESULT rc;
    1282     GUID guid;
    1283     rc = pIf->COMGETTER(Id) (&guid);
     1282    Bstr guid;
     1283    rc = pIf->COMGETTER(Id) (guid.asOutParam());
    12841284    if(SUCCEEDED(rc))
    12851285    {
     
    13401340#else
    13411341    HRESULT rc;
    1342     GUID guid;
    1343     rc = pIf->COMGETTER(Id) (&guid);
     1342    Bstr guid;
     1343    rc = pIf->COMGETTER(Id) (guid.asOutParam());
    13441344    if(SUCCEEDED(rc))
    13451345    {
  • trunk/src/VBox/Main/win/dllmain.cpp

    r8155 r19239  
    2828#include <atlcom.h>
    2929
     30#include <iprt/initterm.h>
     31
    3032CComModule _Module;
    3133
     
    4446        _Module.Init(ObjectMap, hInstance, &LIBID_VirtualBox);
    4547        DisableThreadLibraryCalls(hInstance);
     48
     49        // idempotent, so doesn't harm, and needed for COM embedding scenario
     50        RTR3Init();       
    4651    }
    4752    else if (dwReason == DLL_PROCESS_DETACH)
  • trunk/src/VBox/Main/win/svchlp.cpp

    r18488 r19239  
    248248    int vrc = read (guidStr);
    249249    if (RT_SUCCESS (vrc))
    250         aGuid = Guid (guidStr);
     250        aGuid = Guid (guidStr.c_str());
    251251    return vrc;
    252252}
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