VirtualBox

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


Ignore:
Timestamp:
Feb 24, 2015 11:09:17 AM (10 years ago)
Author:
vboxsync
Message:

Main/VirtualBox: eliminate redundant parameter to i_registerMedium, avoiding bugs with registering e.g. floppy images as hard disks.
Main/Medium: switch over to CreateMedium, final API touch-ups, variable name cleanup, typo checking for backend support of fixed image creation, check for backends not supporting a particular device type
Frontends/VBoxManage: cleanup, adapt to new API, generalize all operations which worked on hard disks only to all device types
Frontends/VirtualBox: adapt to new API

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r54266 r54438  
    18201820  <interface
    18211821    name="IVirtualBox" extends="$unknown"
    1822     uuid="5e67bc8a-5f8f-11e4-aa15-123b93f75cba"
     1822    uuid="3afa096e-2cad-4cb0-aba2-47fe3fc62bd8"
    18231823    wsmap="managed"
    18241824    >
     
    23592359        a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
    23602360      </param>
    2361       <param name="forceNewUuid" type="boolean" dir="in">
    2362          <desc>Allows the caller to request a completely new medium UUID for
    2363            the image which is to be opened. Useful if one intends to open an exact
    2364            copy of a previously opened image, as this would normally fail due to
    2365            the duplicate UUID.</desc>
    2366       </param>
    23672361      <param name="aDeviceTypeType" type="DeviceType" dir="in">
    23682362        <desc>
    23692363          Must be one of "HardDisk", "DVD" or "Floppy".
    2370         </desc>
    2371       </param>
    2372       <param name="medium" type="IMedium" dir="return">
    2373         <desc>Created medium object.</desc>
    2374       </param>
    2375     </method>
    2376 
    2377     <method name="createHardDisk">
    2378       <desc>
    2379         Creates a new base medium object that will use the given storage
    2380         format and location for medium data.
    2381 
    2382         The actual storage unit is not created by this method. In order to
    2383         do it, and before you are able to attach the created medium to
    2384         virtual machines, you must call one of the following methods to
    2385         allocate a format-specific storage unit at the specified location:
    2386         <ul>
    2387           <li><link to="IMedium::createBaseStorage"/></li>
    2388           <li><link to="IMedium::createDiffStorage"/></li>
    2389         </ul>
    2390 
    2391         Some medium attributes, such as <link to="IMedium::id"/>, may
    2392         remain uninitialized until the medium storage unit is successfully
    2393         created by one of the above methods.
    2394 
    2395         After the storage unit is successfully created, it will be
    2396         accessible through the <link to="#openMedium"/> method and can
    2397         be found in the <link to="#hardDisks"/> array.
    2398 
    2399         The list of all storage formats supported by this VirtualBox
    2400         installation can be obtained using
    2401         <link to="ISystemProperties::mediumFormats"/>. If the @a format
    2402         attribute is empty or @c null then the default storage format
    2403         specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
    2404         be used for creating a storage unit of the medium.
    2405 
    2406         Note that the format of the location string is storage format specific.
    2407         See <link to="IMedium::location"/> and IMedium for more details.
    2408 
    2409         <result name="VBOX_E_OBJECT_NOT_FOUND">
    2410           @a format identifier is invalid. See
    2411           <link to="ISystemProperties::mediumFormats"/>.
    2412         </result>
    2413         <result name="VBOX_E_FILE_ERROR">
    2414           @a location is a not valid file name (for file-based formats only).
    2415         </result>
    2416       </desc>
    2417       <param name="format" type="wstring" dir="in">
    2418         <desc>
    2419           Identifier of the storage format to use for the new medium.
    2420         </desc>
    2421       </param>
    2422       <param name="location" type="wstring" dir="in">
    2423         <desc>
    2424           Location of the storage unit for the new medium.
    24252364        </desc>
    24262365      </param>
     
    92029141        Keep in mind that the medium format identifier
    92039142        (<link to="IMediumFormat::id"/>) used in other API calls like
    9204         <link to="IVirtualBox::createHardDisk"/> to refer to a particular
     9143        <link to="IVirtualBox::createMedium"/> to refer to a particular
    92059144        medium format is a case-insensitive string. This means that, for
    92069145        example, all of the following strings:
     
    92259164        The medium format set by this attribute is used by VirtualBox
    92269165        when the medium format was not specified explicitly. One example is
    9227         <link to="IVirtualBox::createHardDisk"/> with the empty
     9166        <link to="IVirtualBox::createMedium"/> with the empty
    92289167        format argument. A more complex example is implicit creation of
    92299168        differencing media when taking a snapshot of a virtual machine:
     
    92499188          <link to="#mediumFormats"/>,
    92509189          <link to="IMediumFormat::id"/>,
    9251           <link to="IVirtualBox::createHardDisk"/>
     9190          <link to="IVirtualBox::createMedium"/>
    92529191        </see>
    92539192      </desc>
     
    1351813457      Existing media are opened using <link to="IVirtualBox::openMedium"/>;
    1351913458      new hard disk media can be created with the VirtualBox API using the
    13520       <link to="IVirtualBox::createHardDisk"/> method. Differencing hard
     13459      <link to="IVirtualBox::createMedium"/> method. Differencing hard
    1352113460      disks (see below) are usually implicitly created by VirtualBox as
    1352213461      needed, but may also be created explicitly using <link to="#createDiffStorage"/>.
     
    1484614785        Each medium format is identified by a string represented by the
    1484714786        <link to="#id"/> attribute. This string is used in calls like
    14848         <link to="IVirtualBox::createHardDisk"/> to specify the desired
     14787        <link to="IVirtualBox::createMedium"/> to specify the desired
    1484914788        format.
    1485014789
     
    1487014809        This string is used in methods of other interfaces where it is necessary
    1487114810        to specify a medium format, such as
    14872         <link to="IVirtualBox::createHardDisk"/>.
     14811        <link to="IVirtualBox::createMedium"/>.
    1487314812      </desc>
    1487414813    </attribute>
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r53354 r54438  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    217217    int i_calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult);
    218218    void i_copyPathRelativeToConfig(const Utf8Str &strSource, Utf8Str &strTarget);
    219     HRESULT i_registerMedium(const ComObjPtr<Medium> &pMedium, ComObjPtr<Medium> *ppMedium, DeviceType_T argType,
     219    HRESULT i_registerMedium(const ComObjPtr<Medium> &pMedium, ComObjPtr<Medium> *ppMedium,
    220220                             AutoWriteLock &mediaTreeLock);
    221221    HRESULT i_unregisterMedium(Medium *pMedium);
     
    295295                             std::vector<MachineState_T> &aStates);
    296296    HRESULT createAppliance(ComPtr<IAppliance> &aAppliance);
    297     HRESULT createHardDisk(const com::Utf8Str &aFormat,
    298                            const com::Utf8Str &aLocation,
    299                            ComPtr<IMedium> &aMedium);
    300297    HRESULT createMedium(const com::Utf8Str &aFormat,
    301298                         const com::Utf8Str &aLocation,
    302299                         AccessMode_T aAccessMode,
    303                          BOOL aForceNewUuid,
    304300                         DeviceType_T aDeviceType,
    305301                         ComPtr<IMedium> &aMedium);
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r53354 r54438  
    55
    66/*
    7  * Copyright (C) 2008-2014 Oracle Corporation
     7 * Copyright (C) 2008-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    25212521
    25222522                /* Now create an empty hard disk. */
    2523                 rc = mVirtualBox->CreateHardDisk(Bstr(strTrgFormat).raw(),
    2524                                                  Bstr(*strTargetPath).raw(),
    2525                                                  ComPtr<IMedium>(pTargetHD).asOutParam());
     2523                rc = mVirtualBox->CreateMedium(Bstr(strTrgFormat).raw(),
     2524                                               Bstr(*strTargetPath).raw(),
     2525                                               AccessMode_ReadWrite, DeviceType_HardDisk,
     2526                                               ComPtr<IMedium>(pTargetHD).asOutParam());
    25262527                if (FAILED(rc)) throw rc;
    25272528
  • trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp

    r53354 r54438  
    55
    66/*
    7  * Copyright (C) 2011-2014 Oracle Corporation
     7 * Copyright (C) 2011-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    12521252                            AutoWriteLock tlock(p->mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
    12531253                            rc = p->mParent->i_registerMedium(pTarget, &pTarget,
    1254                                                             DeviceType_HardDisk,
    12551254                                                            tlock);
    12561255                            if (FAILED(rc)) throw rc;
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r53739 r54438  
    55
    66/*
    7  * Copyright (C) 2008-2014 Oracle Corporation
     7 * Copyright (C) 2008-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    883883 * storage unit.
    884884 *
    885  * This gets called by VirtualBox::CreateHardDisk() in which case uuidMachineRegistry
     885 * This gets called by VirtualBox::CreateMedium() in which case uuidMachineRegistry
    886886 * is empty since starting with VirtualBox 4.0, we no longer add opened media to a
    887887 * registry automatically (this is deferred until the medium is attached to a machine).
     
    975975        }
    976976
    977         rc = m->pVirtualBox->i_registerMedium(this, &pMedium, aDeviceType, treeLock);
     977        rc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);
    978978        Assert(this == pMedium || FAILED(rc));
    979979    }
     
    12801280        const settings::Medium &med = *it;
    12811281
    1282         ComObjPtr<Medium> pHD;
    1283         pHD.createObject();
    1284         rc = pHD->init(aVirtualBox,
    1285                        this,            // parent
    1286                        aDeviceType,
    1287                        uuidMachineRegistry,
    1288                        med,               // child data
    1289                        strMachineFolder);
     1282        ComObjPtr<Medium> pMedium;
     1283        pMedium.createObject();
     1284        rc = pMedium->init(aVirtualBox,
     1285                           this,            // parent
     1286                           aDeviceType,
     1287                           uuidMachineRegistry,
     1288                           med,               // child data
     1289                           strMachineFolder);
    12901290        if (FAILED(rc)) break;
    12911291
    12921292        AutoWriteLock treeLock(aVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
    12931293
    1294         rc = m->pVirtualBox->i_registerMedium(pHD, &pHD, DeviceType_HardDisk, treeLock);
     1294        rc = m->pVirtualBox->i_registerMedium(pMedium, &pMedium, treeLock);
    12951295        if (FAILED(rc)) break;
    12961296    }
     
    23802380
    23812381        if (    (mediumVariantFlags & MediumVariant_Fixed)
    2382             &&  !(m->formatObj->i_getCapabilities() & MediumFormatCapabilities_CreateDynamic))
     2382            &&  !(m->formatObj->i_getCapabilities() & MediumFormatCapabilities_CreateFixed))
    23832383            throw setError(VBOX_E_NOT_SUPPORTED,
    23842384                           tr("Medium format '%s' does not support fixed storage creation"),
     
    59425942{
    59435943    /* Note that we need to de-associate ourselves from the parent to let
    5944      * unregisterMedium() properly save the registry */
     5944     * VirtualBox::i_unregisterMedium() properly save the registry */
    59455945
    59465946    /* we modify mParent and access children */
     
    66956695        {
    66966696            id.create();
    6697             /* VirtualBox::registerMedium() will need UUID */
     6697            /* VirtualBox::i_registerMedium() will need UUID */
    66986698            unconst(m->id) = id;
    66996699        }
     
    67386738                               task.mVDOperationIfaces);
    67396739            if (RT_FAILURE(vrc))
    6740                 throw setError(VBOX_E_FILE_ERROR,
    6741                                tr("Could not create the medium storage unit '%s'%s"),
    6742                                location.c_str(), i_vdError(vrc).c_str());
     6740            {
     6741                if (vrc == VERR_VD_INVALID_TYPE)
     6742                    throw setError(VBOX_E_FILE_ERROR,
     6743                                   tr("Parameters for creating the medium storage unit '%s' are invalid%s"),
     6744                                   location.c_str(), i_vdError(vrc).c_str());
     6745                else
     6746                    throw setError(VBOX_E_FILE_ERROR,
     6747                                   tr("Could not create the medium storage unit '%s'%s"),
     6748                                   location.c_str(), i_vdError(vrc).c_str());
     6749            }
    67436750
    67446751            size = VDGetFileSize(hdd, 0);
     
    67626769        AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
    67636770        ComObjPtr<Medium> pMedium;
    6764         rc = m->pVirtualBox->i_registerMedium(this, &pMedium, DeviceType_HardDisk, treeLock);
     6771        rc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);
    67656772        Assert(this == pMedium);
    67666773    }
     
    68336840        {
    68346841            targetId.create();
    6835             /* VirtualBox::registerMedium() will need UUID */
     6842            /* VirtualBox::i_registerMedium() will need UUID */
    68366843            unconst(pTarget->m->id) = targetId;
    68376844        }
     
    69116918                               task.mVDOperationIfaces);
    69126919            if (RT_FAILURE(vrc))
    6913                 throw setError(VBOX_E_FILE_ERROR,
    6914                                 tr("Could not create the differencing medium storage unit '%s'%s"),
    6915                                 targetLocation.c_str(), i_vdError(vrc).c_str());
     6920            {
     6921                if (vrc == VERR_VD_INVALID_TYPE)
     6922                    throw setError(VBOX_E_FILE_ERROR,
     6923                                   tr("Parameters for creating the differencing medium storage unit '%s' are invalid%s"),
     6924                                   targetLocation.c_str(), i_vdError(vrc).c_str());
     6925                else
     6926                    throw setError(VBOX_E_FILE_ERROR,
     6927                                   tr("Could not create the differencing medium storage unit '%s'%s"),
     6928                                   targetLocation.c_str(), i_vdError(vrc).c_str());
     6929            }
    69166930
    69176931            size = VDGetFileSize(hdd, VD_LAST_IMAGE);
     
    69496963         * better than breaking media registry consistency) */
    69506964        ComObjPtr<Medium> pMedium;
    6951         mrc = m->pVirtualBox->i_registerMedium(pTarget, &pMedium, DeviceType_HardDisk, treeLock);
     6965        mrc = m->pVirtualBox->i_registerMedium(pTarget, &pMedium, treeLock);
    69526966        Assert(pTarget == pMedium);
    69536967
     
    71847198            ComObjPtr<Medium> pMedium;
    71857199            rc2 = m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
    7186                                                    DeviceType_HardDisk,
    71877200                                                   treeLock);
    71887201            AssertComRC(rc2);
     
    75347547            ComObjPtr<Medium> pMedium;
    75357548            mrc = pParent->m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
    7536                                                             DeviceType_HardDisk,
    75377549                                                            treeLock);
    75387550            Assert(   FAILED(mrc)
     
    75507562            ComObjPtr<Medium> pMedium;
    75517563            mrc = m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
    7552                                                    DeviceType_HardDisk,
    75537564                                                   treeLock);
    75547565            Assert(   FAILED(mrc)
     
    77817792                               task.mVDOperationIfaces);
    77827793            if (RT_FAILURE(vrc))
    7783                 throw setError(VBOX_E_FILE_ERROR,
    7784                                tr("Could not create the differencing medium storage unit '%s'%s"),
    7785                                location.c_str(), i_vdError(vrc).c_str());
     7794            {
     7795                if (vrc == VERR_VD_INVALID_TYPE)
     7796                    throw setError(VBOX_E_FILE_ERROR,
     7797                                   tr("Parameters for creating the differencing medium storage unit '%s' are invalid%s"),
     7798                                   location.c_str(), i_vdError(vrc).c_str());
     7799                else
     7800                    throw setError(VBOX_E_FILE_ERROR,
     7801                                   tr("Could not create the differencing medium storage unit '%s'%s"),
     7802                                   location.c_str(), i_vdError(vrc).c_str());
     7803            }
    77867804
    77877805            size = VDGetFileSize(hdd, VD_LAST_IMAGE);
     
    83248342            ComObjPtr<Medium> pMedium;
    83258343            mrc = pParent->m->pVirtualBox->i_registerMedium(this, &pMedium,
    8326                                                             DeviceType_HardDisk,
    83278344                                                            treeLock);
    83288345            Assert(this == pMedium);
     
    83388355            eik.restore();
    83398356            ComObjPtr<Medium> pMedium;
    8340             mrc = m->pVirtualBox->i_registerMedium(this, &pMedium, DeviceType_HardDisk, treeLock);
     8357            mrc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);
    83418358            Assert(this == pMedium);
    83428359            eik.fetch();
  • trunk/src/VBox/Main/src-server/SnapshotImpl.cpp

    r52615 r54438  
    66
    77/*
    8  * Copyright (C) 2006-2014 Oracle Corporation
     8 * Copyright (C) 2006-2015 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    34453445
    34463446        // then, register again
    3447         rc = mParent->i_registerMedium(pDeleteRec->mpTarget, &pDeleteRec->mpTarget, DeviceType_HardDisk, treeLock);
     3447        rc = mParent->i_registerMedium(pDeleteRec->mpTarget, &pDeleteRec->mpTarget, treeLock);
    34483448        AssertComRC(rc);
    34493449    }
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r54276 r54438  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    677677        if (FAILED(rc)) return rc;
    678678
    679         rc = i_registerMedium(pHardDisk, &pHardDisk, DeviceType_HardDisk, treeLock);
     679        rc = i_registerMedium(pHardDisk, &pHardDisk, treeLock);
    680680        if (FAILED(rc)) return rc;
    681681    }
     
    697697        if (FAILED(rc)) return rc;
    698698
    699         rc = i_registerMedium(pImage, &pImage, DeviceType_DVD, treeLock);
     699        rc = i_registerMedium(pImage, &pImage, treeLock);
    700700        if (FAILED(rc)) return rc;
    701701    }
     
    717717        if (FAILED(rc)) return rc;
    718718
    719         rc = i_registerMedium(pImage, &pImage, DeviceType_Floppy, treeLock);
     719        rc = i_registerMedium(pImage, &pImage, treeLock);
    720720        if (FAILED(rc)) return rc;
    721721    }
     
    17351735}
    17361736
    1737 HRESULT VirtualBox::createHardDisk(const com::Utf8Str &aFormat,
    1738                                    const com::Utf8Str &aLocation,
    1739                                    ComPtr<IMedium> &aMedium)
    1740 {
    1741     /* we don't access non-const data members so no need to lock */
    1742     HRESULT rc = createMedium(aFormat, aLocation, AccessMode_ReadWrite, TRUE, DeviceType_HardDisk, aMedium);
    1743 
    1744     return rc;
    1745 }
    1746 
    17471737HRESULT VirtualBox::createMedium(const com::Utf8Str &aFormat,
    17481738                                 const com::Utf8Str &aLocation,
    17491739                                 AccessMode_T aAccessMode,
    1750                                  BOOL aForceNewUuid,
    17511740                                 DeviceType_T aDeviceType,
    17521741                                 ComPtr<IMedium> &aMedium)
    17531742{
    1754     NOREF(aForceNewUuid);
    1755     NOREF(aAccessMode);
     1743    NOREF(aAccessMode); /**< @todo r=klaus make use of access mode */
    17561744
    17571745    HRESULT rc = S_OK;
     
    18671855        if (SUCCEEDED(rc))
    18681856        {
    1869             rc = i_registerMedium(pMedium, &pMedium, aDeviceType, treeLock);
     1857            rc = i_registerMedium(pMedium, &pMedium, treeLock);
    18701858
    18711859            treeLock.release();
     
    42064194 *                  to an unavoidable race there was a duplicate Medium object
    42074195 *                  created.
    4208  * @param argType   Either DeviceType_HardDisk, DeviceType_DVD or DeviceType_Floppy.
    42094196 * @param mediaTreeLock Reference to the AutoWriteLock holding the media tree
    42104197 *                  lock, necessary to release it in the right spot.
     
    42134200HRESULT VirtualBox::i_registerMedium(const ComObjPtr<Medium> &pMedium,
    42144201                                     ComObjPtr<Medium> *ppMedium,
    4215                                      DeviceType_T argType,
    42164202                                     AutoWriteLock &mediaTreeLock)
    42174203{
     
    42304216    const char *pszDevType = NULL;
    42314217    ObjectsList<Medium> *pall = NULL;
    4232     switch (argType)
     4218    DeviceType_T devType;
     4219    {
     4220        AutoReadLock mediumLock(pMedium COMMA_LOCKVAL_SRC_POS);
     4221        devType = pMedium->i_getDeviceType();
     4222    }
     4223    switch (devType)
    42334224    {
    42344225        case DeviceType_HardDisk:
     
    42454236            break;
    42464237        default:
    4247             AssertMsgFailedReturn(("invalid device type %d", argType), E_INVALIDARG);
     4238            AssertMsgFailedReturn(("invalid device type %d", devType), E_INVALIDARG);
    42484239    }
    42494240
     
    42844275
    42854276        // store all hard disks (even differencing images) in the map
    4286         if (argType == DeviceType_HardDisk)
     4277        if (devType == DeviceType_HardDisk)
    42874278            m->mapHardDisks[id] = pMedium;
    42884279
  • trunk/src/VBox/Main/testcase/tstMediumLock.cpp

    r48955 r54438  
    77
    88/*
    9  * Copyright (C) 2013 Oracle Corporation
     9 * Copyright (C) 2013-2015 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    108108    {
    109109        RTTestSub(hTest, "Creating temp hard disk medium");
    110         TEST_COM_SUCCESS(hTest, pVirtualBox->CreateHardDisk(Bstr("VDI").raw(), Bstr(szPathTemp).raw(), pMedium.asOutParam()), "create medium");
     110        TEST_COM_SUCCESS(hTest, pVirtualBox->CreateMedium(Bstr("VDI").raw(), Bstr(szPathTemp).raw(), AccessMode_ReadWrite, DeviceType_HardDisk, pMedium.asOutParam()), "create medium");
    111111        if (!pMedium.isNull())
    112112        {
  • trunk/src/VBox/Main/testcase/tstVBoxAPIXPCOM.cpp

    r50339 r54438  
    88
    99/*
    10  * Copyright (C) 2006-2014 Oracle Corporation
     10 * Copyright (C) 2006-2015 Oracle Corporation
    1111 *
    1212 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    291291     */
    292292    nsCOMPtr<IMedium> hardDisk = 0;
    293     rc = virtualBox->CreateHardDisk(NS_LITERAL_STRING("VDI").get(),
    294                                     NS_LITERAL_STRING("/tmp/TestHardDisk.vdi").get(),
    295                                     getter_AddRefs(hardDisk));
     293    rc = virtualBox->CreateMedium(NS_LITERAL_STRING("VDI").get(),
     294                                  NS_LITERAL_STRING("/tmp/TestHardDisk.vdi").get(),
     295                                  AccessMode_ReadWrite, DeviceType_HardDisk,
     296                                  getter_AddRefs(hardDisk));
    296297    if (NS_FAILED(rc))
    297298    {
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