Changeset 13580 in vbox for trunk/src/VBox/Frontends/VBoxSDL
- Timestamp:
- Oct 27, 2008 2:04:18 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38479
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r13130 r13580 1690 1690 */ 1691 1691 Bstr hdaFileBstr = hdaFile; 1692 ComPtr<IHardDisk > hardDisk;1693 virtualBox->FindHardDisk (hdaFileBstr, hardDisk.asOutParam());1692 ComPtr<IHardDisk2> hardDisk; 1693 virtualBox->FindHardDisk2(hdaFileBstr, hardDisk.asOutParam()); 1694 1694 if (!hardDisk) 1695 1695 { 1696 1696 /* 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()); 1701 1699 } 1702 1700 /* do we have the right image now? */ … … 1708 1706 Guid uuid; 1709 1707 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); 1712 1710 /// @todo why is this attachment saved? 1713 1711 } … … 1737 1735 } 1738 1736 1739 Bstr medi a= fdaFile;1737 Bstr medium = fdaFile; 1740 1738 bool done = false; 1741 1739 … … 1747 1745 CHECK_ERROR_BREAK (host, COMGETTER(FloppyDrives)(coll.asOutParam())); 1748 1746 ComPtr <IHostFloppyDrive> hostDrive; 1749 rc = coll->FindByName (medi a, hostDrive.asOutParam());1747 rc = coll->FindByName (medium, hostDrive.asOutParam()); 1750 1748 if (SUCCEEDED (rc)) 1751 1749 { … … 1759 1757 { 1760 1758 /* try to find an existing one */ 1761 ComPtr <IFloppyImage > image;1762 rc = virtualBox->FindFloppyImage (medi a, image.asOutParam());1759 ComPtr <IFloppyImage2> image; 1760 rc = virtualBox->FindFloppyImage (medium, image.asOutParam()); 1763 1761 if (FAILED (rc)) 1764 1762 { 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); 1767 1765 Guid uuid; 1768 CHECK_ERROR_BREAK (virtualBox, OpenFloppyImage (medi a, uuid,1766 CHECK_ERROR_BREAK (virtualBox, OpenFloppyImage (medium, uuid, 1769 1767 image.asOutParam())); 1770 CHECK_ERROR_BREAK (virtualBox, RegisterFloppyImage (image));1771 1768 } 1772 1769 … … 1799 1796 } 1800 1797 1801 Bstr medi a= cdromFile;1798 Bstr medium = cdromFile; 1802 1799 bool done = false; 1803 1800 … … 1809 1806 CHECK_ERROR_BREAK (host, COMGETTER(DVDDrives)(coll.asOutParam())); 1810 1807 ComPtr <IHostDVDDrive> hostDrive; 1811 rc = coll->FindByName (medi a, hostDrive.asOutParam());1808 rc = coll->FindByName (medium, hostDrive.asOutParam()); 1812 1809 if (SUCCEEDED (rc)) 1813 1810 { … … 1821 1818 { 1822 1819 /* try to find an existing one */ 1823 ComPtr <IDVDImage > image;1824 rc = virtualBox->FindDVDImage (medi a, image.asOutParam());1820 ComPtr <IDVDImage2> image; 1821 rc = virtualBox->FindDVDImage (medium, image.asOutParam()); 1825 1822 if (FAILED (rc)) 1826 1823 { 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); 1829 1826 Guid uuid; 1830 CHECK_ERROR_BREAK (virtualBox, OpenDVDImage (medi a, uuid,1827 CHECK_ERROR_BREAK (virtualBox, OpenDVDImage (medium, uuid, 1831 1828 image.asOutParam())); 1832 CHECK_ERROR_BREAK (virtualBox, RegisterDVDImage (image));1833 1829 } 1834 1830
Note:
See TracChangeset
for help on using the changeset viewer.