- Timestamp:
- Jan 31, 2025 2:05:57 PM (3 months ago)
- svn:sync-xref-src-repo-rev:
- 167275
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r107982 r108003 486 486 487 487 /* complete the line. */ 488 LONG iRc = E_FAIL;488 LONG iRc = (LONG)E_FAIL; 489 489 hrc = progress->COMGETTER(ResultCode)(&iRc); 490 490 if (SUCCEEDED(hrc)) … … 510 510 RTStrmPrintf(g_pStdErr, "%Rhrc\n", iRc); 511 511 } 512 hrc = iRc;512 hrc = (HRESULT)iRc; 513 513 } 514 514 else -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
r107198 r108003 106 106 const char *pszComma = strchr(psz, ','); 107 107 if (pszComma) 108 len = pszComma - psz;108 len = (size_t)(pszComma - psz); 109 109 else 110 110 len = strlen(psz); … … 1464 1464 const char *pszComma = strchr(psz, ','); 1465 1465 if (pszComma) 1466 len = pszComma - psz;1466 len = (size_t)(pszComma - psz); 1467 1467 else 1468 1468 len = strlen(psz); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r107606 r108003 1557 1557 1558 1558 aChangeOrigin = TRUE; 1559 aOriginX = RTStrToUInt32(argv[2]);1560 aOriginY = RTStrToUInt32(argv[3]);1559 aOriginX = (LONG)RTStrToUInt32(argv[2]);/* Explicit conversion */ 1560 aOriginY = (LONG)RTStrToUInt32(argv[3]);/* Explicit conversion */ 1561 1561 aWidth = RTStrToUInt32(argv[4]); 1562 1562 aHeight = RTStrToUInt32(argv[5]); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
r106061 r108003 462 462 try 463 463 { 464 com::Bstr bstrName(ValueUnion.psz, pszEqual - ValueUnion.psz);464 com::Bstr bstrName(ValueUnion.psz, (size_t)(pszEqual - ValueUnion.psz)); 465 465 com::Bstr bstrValue(pszEqual + 1); 466 466 if ( !aBstrNames.push_back(bstrName.raw()) … … 851 851 ComPtr<IProgress> ptrProgress; 852 852 com::Bstr bstrFilename(pszFilename); 853 CHECK_ERROR2I_RET(pDebugger, TakeGuestSample(bstrFilename.raw(), cSampleIntervalUs, cSampleTimeUs, ptrProgress.asOutParam()), RTEXITCODE_FAILURE);853 CHECK_ERROR2I_RET(pDebugger, TakeGuestSample(bstrFilename.raw(), cSampleIntervalUs, (LONG64)cSampleTimeUs, ptrProgress.asOutParam()), RTEXITCODE_FAILURE); 854 854 showProgress(ptrProgress); 855 855 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r107757 r108003 84 84 const char *pszComma = strchr(psz, ','); 85 85 if (pszComma) 86 len = pszComma - psz;86 len = (size_t)(pszComma - psz); 87 87 else 88 88 len = strlen(psz); … … 622 622 623 623 if (fBase) 624 CHECK_ERROR(pMedium, CreateBaseStorage( size, ComSafeArrayAsInParam(l_variants), pProgress.asOutParam()));624 CHECK_ERROR(pMedium, CreateBaseStorage((LONG64)size, ComSafeArrayAsInParam(l_variants), pProgress.asOutParam())); 625 625 else 626 626 CHECK_ERROR(pParentMedium, CreateDiffStorage(pMedium, ComSafeArrayAsInParam(l_variants), pProgress.asOutParam())); … … 929 929 { 930 930 ComPtr<IProgress> pProgress; 931 CHECK_ERROR(pMedium, Resize( cbResize, pProgress.asOutParam()));931 CHECK_ERROR(pMedium, Resize((LONG64)cbResize, pProgress.asOutParam())); 932 932 if (SUCCEEDED(hrc)) 933 933 hrc = showProgress(pProgress); … … 1197 1197 if (fNeedResize) 1198 1198 { 1199 CHECK_ERROR_BREAK(pSrcMedium, ResizeAndCloneTo(pDstMedium, cbResize, ComSafeArrayAsInParam(l_variants), NULL, pProgress.asOutParam()));1199 CHECK_ERROR_BREAK(pSrcMedium, ResizeAndCloneTo(pDstMedium, (LONG64)cbResize, ComSafeArrayAsInParam(l_variants), NULL, pProgress.asOutParam())); 1200 1200 } 1201 1201 else … … 2289 2289 LONG64 cbLogical = 0; 2290 2290 CHECK_ERROR2I_STMT(ptrMedium, COMGETTER(LogicalSize)(&cbLogical), hrc = hrcCheck); 2291 *pcbMedium = cbLogical;2291 *pcbMedium = (uint64_t)cbLogical; 2292 2292 if (!SUCCEEDED(hrc)) 2293 2293 rPtrMediumIO.setNull(); … … 2457 2457 uint32_t const cbToRead = (uint32_t)RT_MIN(cb, _128K); 2458 2458 SafeArray<BYTE> SafeArrayBuf; 2459 HRESULT hrc = ptrMediumIO->Read( off, cbToRead, ComSafeArrayAsOutParam(SafeArrayBuf));2459 HRESULT hrc = ptrMediumIO->Read((LONG64)off, cbToRead, ComSafeArrayAsOutParam(SafeArrayBuf)); 2460 2460 if (FAILED(hrc)) 2461 2461 { … … 2514 2514 { 2515 2515 uint8_t const u8 = pbBuf[i]; 2516 szLine[cch++] = u8 < 127 && u8 >= 32 ? u8 : '.';2516 szLine[cch++] = u8 < 127 && u8 >= 32 ? (char)u8 : '.'; 2517 2517 } 2518 2518 szLine[cch++] = '\n'; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r107755 r108003 1566 1566 lExitCode, procStatus, gctlProcessStatusToText(procStatus)); 1567 1567 1568 rcExit = gctlRunCalculateExitCode(procStatus, lExitCode, true /*fReturnExitCodes*/);1568 rcExit = gctlRunCalculateExitCode(procStatus, (ULONG)lExitCode, true /*fReturnExitCodes*/); 1569 1569 } 1570 1570 else if ( procStatus == ProcessStatus_TimedOutKilled … … 1704 1704 1705 1705 char **papszSources = RTGetOptNonOptionArrayPtr(&GetState); 1706 size_t cSources = &argv[argc] - papszSources;1706 size_t cSources = (size_t)(&argv[argc] - papszSources); 1707 1707 1708 1708 if (!cSources) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r106061 r108003 512 512 513 513 ComPtr<IEvent> ev; 514 hrc = es->GetEvent(listener, cMsWait, ev.asOutParam());514 hrc = es->GetEvent(listener, (LONG)cMsWait, ev.asOutParam()); 515 515 if (ev) /** @todo r=andy Why not using SUCCEEDED(hrc) here? */ 516 516 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r107930 r108003 339 339 RTTimeExplode(&t, &ts); 340 340 341 RTStrPrintf(s, cb, "%04d/%02d/%02d %02d:%02d:%02d UTC",341 RTStrPrintf(s, (size_t)cb, "%04d/%02d/%02d %02d:%02d:%02d UTC", 342 342 t.i32Year, t.u8Month, t.u8MonthDay, 343 343 t.u8Hour, t.u8Minute, t.u8Second); … … 487 487 break; 488 488 } 489 RTStrmWrite(g_pStdOut, psz, pszNext - psz);489 RTStrmWrite(g_pStdOut, psz, (size_t)(pszNext - psz)); 490 490 char const szTmp[2] = { '\\', *pszNext }; 491 491 RTStrmWrite(g_pStdOut, szTmp, sizeof(szTmp)); … … 910 910 { 911 911 ComPtr<IMediumAttachment> mediumAttach; 912 HRESULT hrc = machine->GetMediumAttachment(bstrStorageCtlName.raw(), i,k, mediumAttach.asOutParam());912 HRESULT hrc = machine->GetMediumAttachment(bstrStorageCtlName.raw(), (LONG)i, (LONG)k, mediumAttach.asOutParam()); 913 913 if (!SUCCEEDED(hrc) && hrc != VBOX_E_OBJECT_NOT_FOUND) 914 914 { … … 934 934 935 935 ComPtr<IMedium> medium; 936 hrc = machine->GetMedium(bstrStorageCtlName.raw(), i,k, medium.asOutParam());936 hrc = machine->GetMedium(bstrStorageCtlName.raw(), (LONG)i, (LONG)k, medium.asOutParam()); 937 937 if (SUCCEEDED(hrc) && medium) 938 938 { … … 3277 3277 aLogData.setNull(); 3278 3278 /* Fetch a chunk of the log file */ 3279 CHECK_ERROR_BREAK(machine, ReadLog(uLogIdx, uOffset, _1M,3279 CHECK_ERROR_BREAK(machine, ReadLog(uLogIdx, (LONG64)uOffset, _1M, 3280 3280 ComSafeArrayAsOutParam(aLogData))); 3281 3281 cbLogData = aLogData.size(); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r107930 r108003 1026 1026 RTPrintf(List::tr("Maximum guest CPU count: %u\n"), ulValue); 1027 1027 systemProperties->COMGETTER(InfoVDSize)(&i64Value); 1028 RTPrintf(List::tr("Virtual disk limit (info): %lld Bytes\n", "" , i64Value), i64Value);1028 RTPrintf(List::tr("Virtual disk limit (info): %lld Bytes\n", "" , (size_t)i64Value), i64Value); 1029 1029 1030 1030 #if 0 … … 1565 1565 { 1566 1566 uint32_t u32Format = (uint32_t)formats[i]; 1567 char szFormat[5];1567 unsigned char szFormat[5]; 1568 1568 szFormat[0] = RT_BYTE1(u32Format); 1569 1569 szFormat[1] = RT_BYTE2(u32Format); … … 1980 1980 hrc = pHostDrive->COMGETTER(Size)(&cbSize); 1981 1981 if (SUCCEEDED(hrc) && fOptLong) 1982 RTPrintf(List::tr("Size: %llu bytes (%Rhcb)\n", "", cbSize), cbSize, cbSize);1982 RTPrintf(List::tr("Size: %llu bytes (%Rhcb)\n", "", (size_t)cbSize), cbSize, cbSize); 1983 1983 else if (SUCCEEDED(hrc)) 1984 1984 RTPrintf(List::tr("Size: %Rhcb\n"), cbSize); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp
r106061 r108003 411 411 bool isDetached = false, listMatches = false; 412 412 int i; 413 414 413 setCurrentSubcommand(HELP_SCOPE_METRICS_COLLECT); 415 414 … … 460 459 ComPtr<IUnknown> objectFiltered; 461 460 Bstr metricNameFiltered; 462 for (i = 0; i < (int)metricInfo.size(); i++) 463 { 464 CHECK_ERROR(metricInfo[i], COMGETTER(Object)(objectFiltered.asOutParam())); 465 CHECK_ERROR(metricInfo[i], COMGETTER(MetricName)(metricNameFiltered.asOutParam())); 461 462 for (size_t j = 0; j < metricInfo.size(); j++) 463 { 464 CHECK_ERROR(metricInfo[j], COMGETTER(Object)(objectFiltered.asOutParam())); 465 CHECK_ERROR(metricInfo[j], COMGETTER(MetricName)(metricNameFiltered.asOutParam())); 466 466 Utf8Str baseMetricName(metricNameFiltered); 467 467 baseMetrics.insert(std::make_pair(objectFiltered, toBaseName(baseMetricName))); … … 470 470 com::SafeIfaceArray<IUnknown> objectsFiltered(baseMetrics.size()); 471 471 std::set<std::pair<ComPtr<IUnknown>,Bstr> >::iterator it; 472 i = 0; 472 473 size_t n = 0; 473 474 for (it = baseMetrics.begin(); it != baseMetrics.end(); ++it) 474 475 { 475 it->first.queryInterfaceTo(&objectsFiltered[ i]);476 Bstr(it->second).detachTo(&baseMetricsFiltered[ i++]);476 it->first.queryInterfaceTo(&objectsFiltered[n]); 477 Bstr(it->second).detachTo(&baseMetricsFiltered[n++]); 477 478 } 478 479 com::SafeIfaceArray<IPerformanceMetric> affectedMetrics; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r107886 r108003 595 595 const char *pszComma = strchr(psz, ','); 596 596 if (pszComma) 597 len = pszComma - psz;597 len = (size_t)(pszComma - psz); 598 598 else 599 599 len = strlen(psz); … … 943 943 com::GluePrintErrorInfo(info); 944 944 } 945 hrc = iRc;945 hrc = (HRESULT)iRc; 946 946 } 947 947 } … … 2708 2708 com::GluePrintErrorInfo(info); 2709 2709 } 2710 hrc = iRc;2710 hrc = (HRESULT)iRc; 2711 2711 } 2712 2712 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r107930 r108003 603 603 if (pComma) 604 604 { 605 Bstr(pcszGroups, pComma - pcszGroups).detachTo(pGroups->appendedRaw());605 Bstr(pcszGroups, (size_t)(pComma - pcszGroups)).detachTo(pGroups->appendedRaw()); 606 606 pcszGroups = pComma + 1; 607 607 } … … 656 656 if ( uIndex >= 1 657 657 && uIndex <= cMaxIndex) 658 return uIndex;658 return (int)uIndex; 659 659 errorArgument(ModifyVM::tr("Invalid %s number %u"), pszName, uIndex); 660 660 return 0; … … 1308 1308 if (!RTStrICmp(ValueUnion.psz, "none")) 1309 1309 { 1310 sessionMachine->DetachDevice(bstrController.raw(), u1,u2);1310 sessionMachine->DetachDevice(bstrController.raw(), (LONG)u1, (LONG)u2); 1311 1311 } 1312 1312 else … … 1322 1322 { 1323 1323 CHECK_ERROR(sessionMachine, AttachDevice(bstrController.raw(), 1324 u1,u2,1324 (LONG)u1, (LONG)u2, 1325 1325 DeviceType_HardDisk, 1326 1326 hardDisk)); … … 1391 1391 { 1392 1392 hrc = sessionMachine->DetachDevice(Bstr("LsiLogic").raw(), 1393 GetOptState.uIndex, 0);1393 (LONG)GetOptState.uIndex, 0); 1394 1394 if (FAILED(hrc)) 1395 1395 CHECK_ERROR(sessionMachine, DetachDevice(Bstr("BusLogic").raw(), 1396 GetOptState.uIndex, 0));1396 (LONG)GetOptState.uIndex, 0)); 1397 1397 } 1398 1398 else … … 1408 1408 { 1409 1409 hrc = sessionMachine->AttachDevice(Bstr("LsiLogic").raw(), 1410 GetOptState.uIndex, 0,1410 (LONG)GetOptState.uIndex, 0, 1411 1411 DeviceType_HardDisk, 1412 1412 hardDisk); … … 1414 1414 CHECK_ERROR(sessionMachine, 1415 1415 AttachDevice(Bstr("BusLogic").raw(), 1416 GetOptState.uIndex, 0,1416 (LONG)GetOptState.uIndex, 0, 1417 1417 DeviceType_HardDisk, 1418 1418 hardDisk));
Note:
See TracChangeset
for help on using the changeset viewer.