aboutsummaryrefslogtreecommitdiff
path: root/src/engine/relatedbundle.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/engine/relatedbundle.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/relatedbundle.cpp b/src/engine/relatedbundle.cpp
index 87794177..e6d6516a 100644
--- a/src/engine/relatedbundle.cpp
+++ b/src/engine/relatedbundle.cpp
@@ -396,6 +396,7 @@ static HRESULT LoadRelatedBundleFromKey(
396{ 396{
397 HRESULT hr = S_OK; 397 HRESULT hr = S_OK;
398 DWORD64 qwEngineVersion = 0; 398 DWORD64 qwEngineVersion = 0;
399 LPWSTR sczBundleVersion = NULL;
399 LPWSTR sczCachePath = NULL; 400 LPWSTR sczCachePath = NULL;
400 DWORD64 qwFileSize = 0; 401 DWORD64 qwFileSize = 0;
401 BURN_DEPENDENCY_PROVIDER dependencyProvider = { }; 402 BURN_DEPENDENCY_PROVIDER dependencyProvider = { };
@@ -407,9 +408,12 @@ static HRESULT LoadRelatedBundleFromKey(
407 hr = S_OK; 408 hr = S_OK;
408 } 409 }
409 410
410 hr = RegReadVersion(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &pRelatedBundle->qwVersion); 411 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &sczBundleVersion);
411 ExitOnFailure(hr, "Failed to read version from registry for bundle: %ls", wzRelatedBundleId); 412 ExitOnFailure(hr, "Failed to read version from registry for bundle: %ls", wzRelatedBundleId);
412 413
414 hr = VerParseVersion(sczBundleVersion, 0, FALSE, &pRelatedBundle->pVersion);
415 ExitOnFailure(hr, "Failed to parse pseudo bundle version: %ls", sczBundleVersion);
416
413 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath); 417 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath);
414 ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleId); 418 ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleId);
415 419
@@ -423,7 +427,7 @@ static HRESULT LoadRelatedBundleFromKey(
423 427
424 dependencyProvider.fImported = TRUE; 428 dependencyProvider.fImported = TRUE;
425 429
426 hr = FileVersionToStringEx(pRelatedBundle->qwVersion, &dependencyProvider.sczVersion); 430 hr = StrAllocString(&dependencyProvider.sczVersion, pRelatedBundle->pVersion->sczVersion, 0);
427 ExitOnFailure(hr, "Failed to copy version for bundle: %ls", wzRelatedBundleId); 431 ExitOnFailure(hr, "Failed to copy version for bundle: %ls", wzRelatedBundleId);
428 432
429 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME, &dependencyProvider.sczDisplayName); 433 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME, &dependencyProvider.sczDisplayName);
@@ -452,6 +456,7 @@ static HRESULT LoadRelatedBundleFromKey(
452LExit: 456LExit:
453 DependencyUninitialize(&dependencyProvider); 457 DependencyUninitialize(&dependencyProvider);
454 ReleaseStr(sczCachePath); 458 ReleaseStr(sczCachePath);
459 ReleaseStr(sczBundleVersion);
455 460
456 return hr; 461 return hr;
457} 462}