VirtualBox

Changeset 50380 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Feb 10, 2014 10:31:35 AM (11 years ago)
Author:
vboxsync
Message:

Main: fixed attribute type of IVirtualBox::getGuestOSType(). It's a string, not a Guid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r50356 r50380  
    18421842
    18431843/** @note Locks this object for reading. */
    1844 HRESULT VirtualBox::getGuestOSType(const com::Guid &aId,
     1844HRESULT VirtualBox::getGuestOSType(const com::Utf8Str &aId,
    18451845                                   ComPtr<IGuestOSType> &aType)
    18461846{
    18471847    aType = NULL;
    18481848    AutoReadLock alock(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS);
    1849     IN_BSTR strId = Bstr(aId.toUtf16()).raw();
    18501849
    18511850    HRESULT rc = S_OK;
     
    18561855        const Bstr &typeId = (*it)->i_id();
    18571856        AssertMsg(!typeId.isEmpty(), ("ID must not be NULL"));
    1858         if (com::Guid(typeId) == aId)
     1857        if (typeId == aId)
    18591858        {
    18601859            (*it).queryInterfaceTo(aType.asOutParam());
     
    18641863    return (aType) ? S_OK :
    18651864        setError(E_INVALIDARG,
    1866                  tr("'%ls' is not a valid Guest OS type"),
    1867                  strId);
     1865                 tr("'%s' is not a valid Guest OS type"),
     1866                 aId.c_str());
    18681867    return rc;
    18691868}
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