aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/registration.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-03-13 23:45:32 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-03-14 14:53:29 -0500
commit4cd1c4e06145434ca940ac828772dc47b9d9738e (patch)
treea754d685039173c63303dc6d0d8b1a2bf3ab506b /src/burn/engine/registration.cpp
parent89adb2e3cc232b11b28e5bdeccb0c522c8124a29 (diff)
downloadwix-4cd1c4e06145434ca940ac828772dc47b9d9738e.tar.gz
wix-4cd1c4e06145434ca940ac828772dc47b9d9738e.tar.bz2
wix-4cd1c4e06145434ca940ac828772dc47b9d9738e.zip
Allow the BA to override the bundle relation type during plan.
Diffstat (limited to 'src/burn/engine/registration.cpp')
-rw-r--r--src/burn/engine/registration.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp
index 545c390b..6bae2e7b 100644
--- a/src/burn/engine/registration.cpp
+++ b/src/burn/engine/registration.cpp
@@ -614,7 +614,28 @@ extern "C" HRESULT RegistrationDetectRelatedBundles(
614 hr = RelatedBundlesInitializeForScope(FALSE, pRegistration, &pRegistration->relatedBundles); 614 hr = RelatedBundlesInitializeForScope(FALSE, pRegistration, &pRegistration->relatedBundles);
615 ExitOnFailure(hr, "Failed to initialize per-user related bundles."); 615 ExitOnFailure(hr, "Failed to initialize per-user related bundles.");
616 616
617 RelatedBundlesSort(&pRegistration->relatedBundles); 617 RelatedBundlesSortDetect(&pRegistration->relatedBundles);
618
619LExit:
620 return hr;
621}
622
623extern "C" HRESULT RegistrationPlanInitialize(
624 __in BURN_REGISTRATION* pRegistration
625 )
626{
627 HRESULT hr = S_OK;
628
629 if (pRegistration->relatedBundles.cRelatedBundles && !pRegistration->relatedBundles.rgpPlanSortedRelatedBundles)
630 {
631 hr = MemEnsureArraySize(reinterpret_cast<LPVOID*>(&pRegistration->relatedBundles.rgpPlanSortedRelatedBundles), pRegistration->relatedBundles.cRelatedBundles, sizeof(BURN_RELATED_BUNDLE*), 5);
632 ExitOnFailure(hr, "Failed to initialize plan related bundles array.");
633
634 for (DWORD i = 0; i < pRegistration->relatedBundles.cRelatedBundles; ++i)
635 {
636 pRegistration->relatedBundles.rgpPlanSortedRelatedBundles[i] = pRegistration->relatedBundles.rgRelatedBundles + i;
637 }
638 }
618 639
619LExit: 640LExit:
620 return hr; 641 return hr;