Changeset 14596 in vbox for trunk/src/VBox/Main/testcase
- Timestamp:
- Nov 25, 2008 8:23:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/testcase/tstAPI.cpp
r14184 r14596 593 593 594 594 #if 0 595 // find a registered hard disk by location 595 // find a registered hard disk by location and get properties 596 596 /////////////////////////////////////////////////////////////////////////// 597 597 do 598 598 { 599 ComPtr <IHardDisk > hd;599 ComPtr <IHardDisk2> hd; 600 600 static const wchar_t *Names[] = 601 601 { 602 602 #ifndef RT_OS_LINUX 603 L"E:/Develop/innotek/images/thinker/freedos.vdi", 604 L"E:/Develop/innotek/images/thinker/fReeDoS.vDI", 605 L"E:/Develop/innotek/images/vmdk/haiku.vmdk", 603 L"freedos.vdi", 604 L"MS-DOS.vmdk", 605 L"iscsi", 606 L"some/path/and/disk.vdi", 606 607 #else 607 L" /mnt/host/common/Develop/innotek/images/maggot/freedos.vdi",608 L" /mnt/host/common/Develop/innotek/images/maggot/fReeDoS.vDI",608 L"xp.vdi", 609 L"Xp.vDI", 609 610 #endif 610 611 }; 612 613 printf ("\n"); 614 611 615 for (size_t i = 0; i < RT_ELEMENTS (Names); ++ i) 612 616 { 613 617 Bstr src = Names [i]; 614 618 printf ("Searching for hard disk '%ls'...\n", src.raw()); 615 rc = virtualBox->FindHardDisk (src, hd.asOutParam());619 rc = virtualBox->FindHardDisk2 (src, hd.asOutParam()); 616 620 if (SUCCEEDED (rc)) 617 621 { … … 622 626 printf ("Found, UUID={%Vuuid}, location='%ls'.\n", 623 627 id.raw(), location.raw()); 628 629 com::SafeArray <BSTR> names; 630 com::SafeArray <BSTR> values; 631 632 CHECK_ERROR_BREAK (hd, GetProperties (NULL, 633 ComSafeArrayAsOutParam (names), 634 ComSafeArrayAsOutParam (values))); 635 636 printf ("Properties:\n"); 637 for (size_t i = 0; i < names.size(); ++ i) 638 printf (" %ls = %ls\n", names [i], values [i]); 639 640 if (names.size() == 0) 641 printf (" <none>\n"); 642 624 643 } 625 644 else 626 645 { 627 PRINT_ERROR_INFO (com::ErrorInfo (virtualBox)); 646 com::ErrorInfo info (virtualBox); 647 PRINT_ERROR_INFO (info); 628 648 } 649 printf ("\n"); 629 650 } 630 651 } … … 1097 1118 #endif 1098 1119 1099 #if def VBOX_WITH_RESOURCE_USAGE_API1120 #if 0 && defined (VBOX_WITH_RESOURCE_USAGE_API) 1100 1121 do { 1101 1122 // Get collector
Note:
See TracChangeset
for help on using the changeset viewer.