Changeset 105917 in vbox
- Timestamp:
- Sep 2, 2024 2:30:09 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r103109 r105917 341 341 { 342 342 HRESULT hrc; 343 HRESULT getSupportedGuestOSTypesRC; 344 /* Get a list of guest OS Type Ids supported by the host. */ 345 ComPtr<ISystemProperties> pSystemProperties; 346 com::SafeIfaceArray<IGuestOSType> supportedGuestOSTypes; 347 348 hrc = mParent->COMGETTER(SystemProperties)(pSystemProperties.asOutParam()); 349 if (SUCCEEDED(hrc)) 350 { 351 ComPtr<IPlatformProperties> pPlatformProperties; 352 hrc = pSystemProperties->COMGETTER(Platform)(pPlatformProperties.asOutParam()); 353 if (SUCCEEDED(hrc)) 354 { 355 getSupportedGuestOSTypesRC = pPlatformProperties->COMGETTER(SupportedGuestOSTypes)(ComSafeArrayAsOutParam(supportedGuestOSTypes)); 356 } 357 } 358 343 359 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 344 360 345 /** @todo once UDF is implemented properly and we've tested this code a lot346 * more, replace E_NOTIMPL with E_FAIL. */361 /** @todo once UDF is implemented properly and we've tested this code a lot 362 * more, replace E_NOTIMPL with E_FAIL. */ 347 363 348 364 /* … … 490 506 } 491 507 508 if (SUCCEEDED(getSupportedGuestOSTypesRC)) 509 { 510 bool fSupported = false; 511 for (size_t i = 0; i < supportedGuestOSTypes.size() && !fSupported; ++i) 512 { 513 ComPtr<IGuestOSType> guestOSType = supportedGuestOSTypes[i]; 514 515 Bstr guestId; 516 guestOSType->COMGETTER(Id)(guestId.asOutParam()); 517 if (guestId == mStrDetectedOSTypeId) 518 fSupported = true; 519 } 520 if (!fSupported) 521 { 522 mStrDetectedOSTypeId.setNull(); 523 mStrDetectedOSVersion.setNull(); 524 mStrDetectedOSFlavor.setNull(); 525 mDetectedOSLanguages.clear(); 526 mStrDetectedOSHints.setNull(); 527 mDetectedImages.clear(); 528 } 529 } 492 530 /** @todo implement actual detection logic. */ 493 531 return hrc;
Note:
See TracChangeset
for help on using the changeset viewer.