Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 17218)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 17238)
@@ -671,8 +671,9 @@
                 ComPtr<IHost> host;
                 CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
-                ComPtr<IHostDVDDriveCollection> hostDVDs;
-                CHECK_ERROR(host, COMGETTER(DVDDrives)(hostDVDs.asOutParam()));
+                com::SafeIfaceArray <IHostDVDDrive> hostDVDs;
+                rc = host->COMGETTER(DVDDrives)(ComSafeArrayAsOutParam(hostDVDs));
+
                 ComPtr<IHostDVDDrive> hostDVDDrive;
-                rc = hostDVDs->FindByName(Bstr(a->argv[2] + 5), hostDVDDrive.asOutParam());
+                rc = host->FindHostDVDDrive(Bstr(a->argv[2] + 5), hostDVDDrive.asOutParam());
                 if (!hostDVDDrive)
                 {
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp	(revision 17218)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp	(revision 17238)
@@ -224,6 +224,6 @@
             {
                 /*
-                * Iterate through the collection.
-                */
+                 * Iterate through the collection.
+                 */
                 for (size_t i = 0; i < coll.size(); ++ i)
                 {
@@ -245,15 +245,11 @@
             ComPtr<IHost> host;
             CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
-            ComPtr<IHostDVDDriveCollection> coll;
-            ComPtr<IHostDVDDriveEnumerator> enumerator;
-            CHECK_ERROR(host, COMGETTER(DVDDrives)(coll.asOutParam()));
-            if (SUCCEEDED(rc) && coll)
-            {
-                CHECK_ERROR(coll, Enumerate(enumerator.asOutParam()));
-                BOOL hasMore;
-                while (SUCCEEDED(enumerator->HasMore(&hasMore)) && hasMore)
-                {
-                    ComPtr<IHostDVDDrive> dvdDrive;
-                    CHECK_ERROR_BREAK(enumerator, GetNext(dvdDrive.asOutParam()));
+            com::SafeIfaceArray <IHostDVDDrive> coll;
+            CHECK_ERROR(host, COMGETTER(DVDDrives)(ComSafeArrayAsOutParam(coll)));
+            if (SUCCEEDED(rc))
+            {
+                for (size_t i = 0; i < coll.size(); ++ i)
+                {
+                    ComPtr<IHostDVDDrive> dvdDrive = coll[i];
                     Bstr name;
                     dvdDrive->COMGETTER(Name)(name.asOutParam());
@@ -779,3 +775,3 @@
 
 #endif /* !VBOX_ONLY_DOCS */
-
+/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 17218)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 17238)
@@ -25,4 +25,5 @@
 #ifndef VBOX_ONLY_DOCS
 #include <VBox/com/com.h>
+#include <VBox/com/array.h>
 #include <VBox/com/ErrorInfo.h>
 #include <VBox/com/errorprint2.h>
@@ -1091,8 +1092,9 @@
                 ComPtr<IHost> host;
                 CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
-                ComPtr<IHostDVDDriveCollection> hostDVDs;
-                CHECK_ERROR(host, COMGETTER(DVDDrives)(hostDVDs.asOutParam()));
+                com::SafeIfaceArray <IHostDVDDrive> hostDVDs;
+                rc = host->COMGETTER(DVDDrives)(ComSafeArrayAsOutParam(hostDVDs));
+
                 ComPtr<IHostDVDDrive> hostDVDDrive;
-                rc = hostDVDs->FindByName(Bstr(dvd + 5), hostDVDDrive.asOutParam());
+                rc = host->FindHostDVDDrive(Bstr(dvd + 5), hostDVDDrive.asOutParam());
                 if (!hostDVDDrive)
                 {
@@ -1105,5 +1107,5 @@
                         break;
                     }
-                    rc = hostDVDs->FindByName(Bstr(szPathReal), hostDVDDrive.asOutParam());
+                    rc = host->FindHostDVDDrive(Bstr(szPathReal), hostDVDDrive.asOutParam());
                     if (!hostDVDDrive)
                     {
Index: trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 17218)
+++ trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 17238)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2007 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2009 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -1772,8 +1772,8 @@
             ComPtr <IHost> host;
             CHECK_ERROR_BREAK (virtualBox, COMGETTER(Host)(host.asOutParam()));
-            ComPtr <IHostDVDDriveCollection> coll;
-            CHECK_ERROR_BREAK (host, COMGETTER(DVDDrives)(coll.asOutParam()));
+            SafeIfaceArray <IHostDVDDrive> coll;
+            CHECK_ERROR_BREAK (host, COMGETTER(DVDDrives)(ComSafeArrayAsOutParam(coll)));
             ComPtr <IHostDVDDrive> hostDrive;
-            rc = coll->FindByName (medium, hostDrive.asOutParam());
+            rc = host->FindHostDVDDrive (medium, hostDrive.asOutParam());
             if (SUCCEEDED (rc))
             {
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 17218)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 17238)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2008 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2009 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -3064,9 +3064,9 @@
 
     hostDVDMap.clear();
-    CHostDVDDriveEnumerator en =
-        vboxGlobal().virtualBox().GetHost().GetDVDDrives().Enumerate();
-    while (en.HasMore())
-    {
-        CHostDVDDrive hostDVD = en.GetNext();
+    CHostDVDDriveVector drvvec =
+        vboxGlobal().virtualBox().GetHost().GetDVDDrives();
+    for (int i = 0; i < drvvec.size(); ++i)
+    {
+        CHostDVDDrive hostDVD = drvvec[i];
         /** @todo set icon */
         QString drvName = hostDVD.GetName();
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMFirstRunWzd.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMFirstRunWzd.cpp	(revision 17218)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMFirstRunWzd.cpp	(revision 17238)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2008 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2009 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -176,12 +176,11 @@
     {
         /* Search for the host dvd-drives */
-        CHostDVDDriveCollection coll =
+        CHostDVDDriveVector coll =
             vboxGlobal().virtualBox().GetHost().GetDVDDrives();
-        mHostDVDs.resize (coll.GetCount());
-        int id = 0;
-        CHostDVDDriveEnumerator en = coll.Enumerate();
-        while (en.HasMore())
-        {
-            CHostDVDDrive hostDVD = en.GetNext();
+        mHostDVDs.resize (coll.size());
+
+        for (int id = 0; id < coll.size(); ++id)
+        {
+            CHostDVDDrive hostDVD = coll[id];
             QString name = hostDVD.GetName();
             QString description = hostDVD.GetDescription();
@@ -190,5 +189,4 @@
             mCbHost->insertItem (id, fullName);
             mHostDVDs [id] = hostDVD;
-            ++ id;
         }
 
@@ -222,5 +220,5 @@
 
     /* Repopulate the media list */
-        mCbImage->repopulate();
+    mCbImage->repopulate();
 
     /* Revalidate updated page */
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsCD.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsCD.cpp	(revision 17218)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsCD.cpp	(revision 17238)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2008 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2009 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -59,13 +59,12 @@
 
     /* Read out the host DVD drive list and prepare the combobox */
-    CHostDVDDriveCollection coll =
+    CHostDVDDriveVector coll =
         vboxGlobal().virtualBox().GetHost().GetDVDDrives();
-    mHostCDs.resize (coll.GetCount());
+    mHostCDs.resize (coll.size());
     mCbHostCD->clear();
-    int id = 0;
-    CHostDVDDriveEnumerator en = coll.Enumerate();
-    while (en.HasMore())
-    {
-        CHostDVDDrive hostDVD = en.GetNext();
+
+    for (int id = 0; id < coll.size(); ++id)
+    {
+        CHostDVDDrive hostDVD = coll[id];
         /// @todo (r=dmik) set icon?
         QString name = hostDVD.GetName();
@@ -75,5 +74,4 @@
         mCbHostCD->insertItem (id, fullName);
         mHostCDs [id] = hostDVD;
-        ++ id;
     }
 
@@ -89,5 +87,5 @@
                 name :
                 QString ("%1 (%2)").arg (description, name);
-            if (coll.FindByName (name).isNull())
+            if (vboxGlobal().virtualBox().GetHost().FindHostDVDDrive (name).isNull())
             {
                 /* If the DVD drive is not currently available,
