diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-04-22 16:56:21 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-04-23 15:40:21 -0500 |
commit | a981e29d7a3df566754356c3fe1eb938a5cac4c1 (patch) | |
tree | 9d2b2abac872ae3c4917003812951e68b72e7163 /src/burn/engine/elevation.cpp | |
parent | 72e20f682c0d64102e86439ba5527dd0d71932ae (diff) | |
download | wix-a981e29d7a3df566754356c3fe1eb938a5cac4c1.tar.gz wix-a981e29d7a3df566754356c3fe1eb938a5cac4c1.tar.bz2 wix-a981e29d7a3df566754356c3fe1eb938a5cac4c1.zip |
Make the estimated size in ARP a little more accurate.
Fixes 4039
Diffstat (limited to 'src/burn/engine/elevation.cpp')
-rw-r--r-- | src/burn/engine/elevation.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index 56a62955..3305cf62 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp | |||
@@ -636,6 +636,7 @@ extern "C" HRESULT ElevationSessionEnd( | |||
636 | __in BURN_RESUME_MODE resumeMode, | 636 | __in BURN_RESUME_MODE resumeMode, |
637 | __in BOOTSTRAPPER_APPLY_RESTART restart, | 637 | __in BOOTSTRAPPER_APPLY_RESTART restart, |
638 | __in BOOL fDetectedForeignProviderKeyBundleId, | 638 | __in BOOL fDetectedForeignProviderKeyBundleId, |
639 | __in DWORD64 qwEstimatedSize, | ||
639 | __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType | 640 | __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType |
640 | ) | 641 | ) |
641 | { | 642 | { |
@@ -654,6 +655,9 @@ extern "C" HRESULT ElevationSessionEnd( | |||
654 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleId); | 655 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleId); |
655 | ExitOnFailure(hr, "Failed to write dependency registration action to message buffer."); | 656 | ExitOnFailure(hr, "Failed to write dependency registration action to message buffer."); |
656 | 657 | ||
658 | hr = BuffWriteNumber64(&pbData, &cbData, qwEstimatedSize); | ||
659 | ExitOnFailure(hr, "Failed to write estimated size to message buffer."); | ||
660 | |||
657 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)registrationType); | 661 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)registrationType); |
658 | ExitOnFailure(hr, "Failed to write registration type to message buffer."); | 662 | ExitOnFailure(hr, "Failed to write registration type to message buffer."); |
659 | 663 | ||
@@ -2580,6 +2584,7 @@ static HRESULT OnSessionEnd( | |||
2580 | SIZE_T iData = 0; | 2584 | SIZE_T iData = 0; |
2581 | DWORD dwResumeMode = 0; | 2585 | DWORD dwResumeMode = 0; |
2582 | DWORD dwRestart = 0; | 2586 | DWORD dwRestart = 0; |
2587 | DWORD64 qwEstimatedSize = 0; | ||
2583 | DWORD dwRegistrationType = 0; | 2588 | DWORD dwRegistrationType = 0; |
2584 | 2589 | ||
2585 | // Deserialize message data. | 2590 | // Deserialize message data. |
@@ -2592,11 +2597,14 @@ static HRESULT OnSessionEnd( | |||
2592 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleId); | 2597 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleId); |
2593 | ExitOnFailure(hr, "Failed to read dependency registration action."); | 2598 | ExitOnFailure(hr, "Failed to read dependency registration action."); |
2594 | 2599 | ||
2600 | hr = BuffReadNumber64(pbData, cbData, &iData, &qwEstimatedSize); | ||
2601 | ExitOnFailure(hr, "Failed to read estimated size."); | ||
2602 | |||
2595 | hr = BuffReadNumber(pbData, cbData, &iData, &dwRegistrationType); | 2603 | hr = BuffReadNumber(pbData, cbData, &iData, &dwRegistrationType); |
2596 | ExitOnFailure(hr, "Failed to read dependency registration action."); | 2604 | ExitOnFailure(hr, "Failed to read dependency registration action."); |
2597 | 2605 | ||
2598 | // suspend session in per-machine process | 2606 | // suspend session in per-machine process |
2599 | hr = RegistrationSessionEnd(pRegistration, pCache, pVariables, pPackages, (BURN_RESUME_MODE)dwResumeMode, (BOOTSTRAPPER_APPLY_RESTART)dwRestart, (BOOTSTRAPPER_REGISTRATION_TYPE)dwRegistrationType); | 2607 | hr = RegistrationSessionEnd(pRegistration, pCache, pVariables, pPackages, (BURN_RESUME_MODE)dwResumeMode, (BOOTSTRAPPER_APPLY_RESTART)dwRestart, qwEstimatedSize, (BOOTSTRAPPER_REGISTRATION_TYPE)dwRegistrationType); |
2600 | ExitOnFailure(hr, "Failed to suspend registration session."); | 2608 | ExitOnFailure(hr, "Failed to suspend registration session."); |
2601 | 2609 | ||
2602 | LExit: | 2610 | LExit: |