VirtualBox

Changeset 19239 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Apr 28, 2009 1:19:14 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46627
Message:

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

Location:
trunk/src/VBox/Main
Files:
60 edited

Legend:

Unmodified
Added
Removed
  • 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.

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