儲存庫 vbox 的更動 16507
- 時間撮記:
- 2009-2-4 上午11:10:19 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/testcase/tstAPI.cpp
r16250 r16507 1302 1302 { 1303 1303 Bstr ovf = argc > 1 ? argv [1] : "someOVF.ovf"; 1304 printf ("Try to open %ls ...\n", ovf.raw());1304 RTPrintf ("Try to open %ls ...\n", ovf.raw()); 1305 1305 1306 1306 ComPtr <IAppliance> appliance; … … 1309 1309 Bstr path; 1310 1310 CHECK_ERROR_BREAK (appliance, COMGETTER (Path)(path.asOutParam())); 1311 printf ("Successfully opened %ls.\n", path.raw());1311 RTPrintf ("Successfully opened %ls.\n", path.raw()); 1312 1312 CHECK_ERROR_BREAK (appliance, 1313 1313 Interpret()); 1314 printf ("Successfully interpreted %ls.\n", path.raw());1315 printf ("Appliance:\n");1314 RTPrintf ("Successfully interpreted %ls.\n", path.raw()); 1315 RTPrintf ("Appliance:\n"); 1316 1316 // Fetch all disks 1317 1317 com::SafeArray<BSTR> retDisks; … … 1320 1320 if (retDisks.size() > 0) 1321 1321 { 1322 printf ("Disks:");1322 RTPrintf ("Disks:"); 1323 1323 for (unsigned i = 0; i < retDisks.size(); i++) 1324 1324 printf (" %ls", Bstr (retDisks [i]).raw()); 1325 printf ("\n");1325 RTPrintf ("\n"); 1326 1326 } 1327 1327 /* Fetch all virtual system descriptions */ … … 1334 1334 { 1335 1335 com::SafeArray<VirtualSystemDescriptionType_T> retTypes; 1336 com::SafeArray<ULONG> retRef s;1336 com::SafeArray<ULONG> retRefValues; 1337 1337 com::SafeArray<BSTR> retOrigValues; 1338 1338 com::SafeArray<BSTR> retAutoValues; … … 1340 1340 CHECK_ERROR_BREAK (retVSD [i], 1341 1341 GetDescription (ComSafeArrayAsOutParam (retTypes), 1342 ComSafeArrayAsOutParam (retRef s),1342 ComSafeArrayAsOutParam (retRefValues), 1343 1343 ComSafeArrayAsOutParam (retOrigValues), 1344 1344 ComSafeArrayAsOutParam (retAutoValues), 1345 1345 ComSafeArrayAsOutParam (retConfiguration))); 1346 1346 1347 printf ("VirtualSystemDescription:\n");1347 RTPrintf ("VirtualSystemDescription:\n"); 1348 1348 for (unsigned a = 0; a < retTypes.size(); ++a) 1349 1349 { 1350 printf (" %d % u %ls %ls %ls\n",1350 printf (" %d %ls %ls %ls\n", 1351 1351 retTypes [a], 1352 retRefs [a],1353 1352 Bstr (retOrigValues [a]).raw(), 1354 1353 Bstr (retAutoValues [a]).raw(), … … 1356 1355 } 1357 1356 } 1358 printf ("\n"); 1359 } 1357 RTPrintf ("\n"); 1358 } 1359 RTPrintf ("Try to import the appliance ...\n"); 1360 ComPtr<IProgress> progress; 1360 1361 CHECK_ERROR_BREAK (appliance, 1361 ImportAppliance()); 1362 ImportAppliance (progress.asOutParam())); 1363 CHECK_ERROR (progress, WaitForCompletion (-1)); 1364 if (SUCCEEDED (rc)) 1365 { 1366 /* Check if the import was sucessfully */ 1367 progress->COMGETTER (ResultCode)(&rc); 1368 if (FAILED (rc)) 1369 { 1370 com::ProgressErrorInfo info (progress); 1371 if (info.isBasicAvailable()) 1372 RTPrintf ("Error: failed to import appliance. Error message: %lS\n", info.getText().raw()); 1373 else 1374 RTPrintf ("Error: failed to import appliance. No error message available!\n"); 1375 }else 1376 RTPrintf ("Successfully imported the appliance.\n"); 1377 } 1378 1362 1379 } 1363 1380 while (FALSE);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器