VirtualBox

Changeset 13580 in vbox for trunk/src/VBox/Frontends/VBoxSDL


Ignore:
Timestamp:
Oct 27, 2008 2:04:18 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38479
Message:

Ported s2 branch (r37120:38456).

File:
1 edited

Legend:

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

    r13130 r13580  
    16901690         */
    16911691        Bstr hdaFileBstr = hdaFile;
    1692         ComPtr<IHardDisk> hardDisk;
    1693         virtualBox->FindHardDisk(hdaFileBstr, hardDisk.asOutParam());
     1692        ComPtr<IHardDisk2> hardDisk;
     1693        virtualBox->FindHardDisk2(hdaFileBstr, hardDisk.asOutParam());
    16941694        if (!hardDisk)
    16951695        {
    16961696            /* we've not found the image */
    1697             RTPrintf("Registering hard disk image '%S'...\n", hdaFile);
    1698             virtualBox->OpenHardDisk (hdaFileBstr, hardDisk.asOutParam());
    1699             if (hardDisk)
    1700                 virtualBox->RegisterHardDisk (hardDisk);
     1697            RTPrintf("Adding hard disk '%S'...\n", hdaFile);
     1698            virtualBox->OpenHardDisk2 (hdaFileBstr, hardDisk.asOutParam());
    17011699        }
    17021700        /* do we have the right image now? */
     
    17081706            Guid uuid;
    17091707            hardDisk->COMGETTER(Id)(uuid.asOutParam());
    1710             gMachine->DetachHardDisk(StorageBus_IDE, 0, 0);
    1711             gMachine->AttachHardDisk(uuid, StorageBus_IDE, 0, 0);
     1708            gMachine->DetachHardDisk2(StorageBus_IDE, 0, 0);
     1709            gMachine->AttachHardDisk2(uuid, StorageBus_IDE, 0, 0);
    17121710            /// @todo why is this attachment saved?
    17131711        }
     
    17371735        }
    17381736
    1739         Bstr media = fdaFile;
     1737        Bstr medium = fdaFile;
    17401738        bool done = false;
    17411739
     
    17471745            CHECK_ERROR_BREAK (host, COMGETTER(FloppyDrives)(coll.asOutParam()));
    17481746            ComPtr <IHostFloppyDrive> hostDrive;
    1749             rc = coll->FindByName (media, hostDrive.asOutParam());
     1747            rc = coll->FindByName (medium, hostDrive.asOutParam());
    17501748            if (SUCCEEDED (rc))
    17511749            {
     
    17591757        {
    17601758            /* try to find an existing one */
    1761             ComPtr <IFloppyImage> image;
    1762             rc = virtualBox->FindFloppyImage (media, image.asOutParam());
     1759            ComPtr <IFloppyImage2> image;
     1760            rc = virtualBox->FindFloppyImage (medium, image.asOutParam());
    17631761            if (FAILED (rc))
    17641762            {
    1765                 /* try to register */
    1766                 RTPrintf ("Registering floppy image '%S'...\n", fdaFile);
     1763                /* try to add to the list */
     1764                RTPrintf ("Adding floppy image '%S'...\n", fdaFile);
    17671765                Guid uuid;
    1768                 CHECK_ERROR_BREAK (virtualBox, OpenFloppyImage (media, uuid,
     1766                CHECK_ERROR_BREAK (virtualBox, OpenFloppyImage (medium, uuid,
    17691767                                                                image.asOutParam()));
    1770                 CHECK_ERROR_BREAK (virtualBox, RegisterFloppyImage (image));
    17711768            }
    17721769
     
    17991796        }
    18001797
    1801         Bstr media = cdromFile;
     1798        Bstr medium = cdromFile;
    18021799        bool done = false;
    18031800
     
    18091806            CHECK_ERROR_BREAK (host, COMGETTER(DVDDrives)(coll.asOutParam()));
    18101807            ComPtr <IHostDVDDrive> hostDrive;
    1811             rc = coll->FindByName (media, hostDrive.asOutParam());
     1808            rc = coll->FindByName (medium, hostDrive.asOutParam());
    18121809            if (SUCCEEDED (rc))
    18131810            {
     
    18211818        {
    18221819            /* try to find an existing one */
    1823             ComPtr <IDVDImage> image;
    1824             rc = virtualBox->FindDVDImage (media, image.asOutParam());
     1820            ComPtr <IDVDImage2> image;
     1821            rc = virtualBox->FindDVDImage (medium, image.asOutParam());
    18251822            if (FAILED (rc))
    18261823            {
    1827                 /* try to register */
    1828                 RTPrintf ("Registering ISO image '%S'...\n", cdromFile);
     1824                /* try to add to the list */
     1825                RTPrintf ("Adding ISO image '%S'...\n", cdromFile);
    18291826                Guid uuid;
    1830                 CHECK_ERROR_BREAK (virtualBox, OpenDVDImage (media, uuid,
     1827                CHECK_ERROR_BREAK (virtualBox, OpenDVDImage (medium, uuid,
    18311828                                                             image.asOutParam()));
    1832                 CHECK_ERROR_BREAK (virtualBox, RegisterDVDImage (image));
    18331829            }
    18341830
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