Changeset 17218 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Feb 27, 2009 6:02:48 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43527
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r17200 r17218 671 671 ComPtr<IHost> host; 672 672 CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam())); 673 com::SafeIfaceArray <IHostDVDDrive> hostDVDs; 674 rc = host->COMGETTER(DVDDrives)(ComSafeArrayAsOutParam(hostDVDs)); 675 673 ComPtr<IHostDVDDriveCollection> hostDVDs; 674 CHECK_ERROR(host, COMGETTER(DVDDrives)(hostDVDs.asOutParam())); 676 675 ComPtr<IHostDVDDrive> hostDVDDrive; 677 rc = host ->FindHostDVDDrive(Bstr(a->argv[2] + 5), hostDVDDrive.asOutParam());676 rc = hostDVDs->FindByName(Bstr(a->argv[2] + 5), hostDVDDrive.asOutParam()); 678 677 if (!hostDVDDrive) 679 678 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r17200 r17218 224 224 { 225 225 /* 226 227 226 * Iterate through the collection. 227 */ 228 228 for (size_t i = 0; i < coll.size(); ++ i) 229 229 { … … 245 245 ComPtr<IHost> host; 246 246 CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam())); 247 com::SafeIfaceArray <IHostDVDDrive> coll; 248 CHECK_ERROR(host, COMGETTER(DVDDrives)(ComSafeArrayAsOutParam(coll))); 249 if (SUCCEEDED(rc)) 250 { 251 for (size_t i = 0; i < coll.size(); ++ i) 252 { 253 ComPtr<IHostDVDDrive> dvdDrive = coll[i]; 247 ComPtr<IHostDVDDriveCollection> coll; 248 ComPtr<IHostDVDDriveEnumerator> enumerator; 249 CHECK_ERROR(host, COMGETTER(DVDDrives)(coll.asOutParam())); 250 if (SUCCEEDED(rc) && coll) 251 { 252 CHECK_ERROR(coll, Enumerate(enumerator.asOutParam())); 253 BOOL hasMore; 254 while (SUCCEEDED(enumerator->HasMore(&hasMore)) && hasMore) 255 { 256 ComPtr<IHostDVDDrive> dvdDrive; 257 CHECK_ERROR_BREAK(enumerator, GetNext(dvdDrive.asOutParam())); 254 258 Bstr name; 255 259 dvdDrive->COMGETTER(Name)(name.asOutParam()); … … 775 779 776 780 #endif /* !VBOX_ONLY_DOCS */ 777 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ 781 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r17200 r17218 25 25 #ifndef VBOX_ONLY_DOCS 26 26 #include <VBox/com/com.h> 27 #include <VBox/com/array.h>28 27 #include <VBox/com/ErrorInfo.h> 29 28 #include <VBox/com/errorprint2.h> … … 1092 1091 ComPtr<IHost> host; 1093 1092 CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam())); 1094 com::SafeIfaceArray <IHostDVDDrive> hostDVDs; 1095 rc = host->COMGETTER(DVDDrives)(ComSafeArrayAsOutParam(hostDVDs)); 1096 1093 ComPtr<IHostDVDDriveCollection> hostDVDs; 1094 CHECK_ERROR(host, COMGETTER(DVDDrives)(hostDVDs.asOutParam())); 1097 1095 ComPtr<IHostDVDDrive> hostDVDDrive; 1098 rc = host ->FindHostDVDDrive(Bstr(dvd + 5), hostDVDDrive.asOutParam());1096 rc = hostDVDs->FindByName(Bstr(dvd + 5), hostDVDDrive.asOutParam()); 1099 1097 if (!hostDVDDrive) 1100 1098 { … … 1107 1105 break; 1108 1106 } 1109 rc = host ->FindHostDVDDrive(Bstr(szPathReal), hostDVDDrive.asOutParam());1107 rc = hostDVDs->FindByName(Bstr(szPathReal), hostDVDDrive.asOutParam()); 1110 1108 if (!hostDVDDrive) 1111 1109 {
Note:
See TracChangeset
for help on using the changeset viewer.