VirtualBox

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


Ignore:
Timestamp:
Mar 24, 2010 2:45:55 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59248
Message:

VBoxManage, Main: fixed creating VM, Bstr fixes.

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

Legend:

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

    r27607 r27668  
    10741074        id.create();
    10751075
    1076     GuestOSType *osType;
    1077     rc = findGuestOSType(aOsTypeId, osType);
     1076    GuestOSType *osType = NULL;
     1077    rc = findGuestOSType(Bstr(aOsTypeId), osType);
    10781078    if (FAILED(rc)) return rc;
    10791079
     
    11291129        id.create();
    11301130
    1131     GuestOSType *osType;
    1132     rc = findGuestOSType(aOsTypeId, osType);
     1131    GuestOSType *osType = NULL;
     1132    rc = findGuestOSType(Bstr(aOsTypeId), osType);
    11331133    if (FAILED(rc)) return rc;
    11341134
     
    30353035}
    30363036
    3037 HRESULT VirtualBox::findGuestOSType(CBSTR bstrOSType,
     3037HRESULT VirtualBox::findGuestOSType(const Bstr &bstrOSType,
    30383038                                    GuestOSType*& pGuestOSType)
    30393039{
     
    30423042              ("Guest OS types array must be filled"));
    30433043
    3044     if (bstrOSType == NULL)
     3044    if (bstrOSType.isEmpty())
    30453045    {
    30463046        pGuestOSType = NULL;
     
    30623062    return setError(VBOX_E_OBJECT_NOT_FOUND,
    30633063                    tr("Guest OS type '%ls' is invalid"),
    3064                     bstrOSType);
     3064                    bstrOSType.raw());
    30653065}
    30663066
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r27256 r27668  
    253253                            bool aSetError, ComObjPtr<Medium> *aImage = NULL);
    254254
    255     HRESULT findGuestOSType(CBSTR bstrOSType,
     255    HRESULT findGuestOSType(const Bstr &bstrOSType,
    256256                            GuestOSType*& pGuestOSType);
    257257
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