diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-12-02 22:38:23 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-12-03 10:58:32 -0600 |
commit | ca5d60d267051b4b75e22763ad8eda06f0501451 (patch) | |
tree | ba125ede0d1e756b8afbddeb4dc75d7ffa82b59c /src/balutil | |
parent | fa97c540035df80723a60e870f90bbeeab02bb3b (diff) | |
download | wix-ca5d60d267051b4b75e22763ad8eda06f0501451.tar.gz wix-ca5d60d267051b4b75e22763ad8eda06f0501451.tar.bz2 wix-ca5d60d267051b4b75e22763ad8eda06f0501451.zip |
WIXFEAT:4626,5386 - Add more BA events.
OnBeginMsiTransactionBegin, OnBeginMsiTransactionComplete, OnCommitMsiTransactionBegin, OnCommitMsiTransactionComplete, OnRollbackMsiTransactionBegin, OnRollbackMsiTransactionComplete, OnPauseAutomaticUpdatesBegin, OnPauseAutomaticUpdatesComplete, OnSystemRestorePointBegin, OnSystemRestorePointComplete
Diffstat (limited to 'src/balutil')
-rw-r--r-- | src/balutil/balutil.vcxproj | 8 | ||||
-rw-r--r-- | src/balutil/inc/BAFunctions.h | 10 | ||||
-rw-r--r-- | src/balutil/inc/BalBaseBAFunctions.h | 73 | ||||
-rw-r--r-- | src/balutil/inc/BalBaseBAFunctionsProc.h | 10 | ||||
-rw-r--r-- | src/balutil/inc/BalBaseBootstrapperApplication.h | 75 | ||||
-rw-r--r-- | src/balutil/inc/BalBaseBootstrapperApplicationProc.h | 119 | ||||
-rw-r--r-- | src/balutil/inc/IBootstrapperApplication.h | 43 | ||||
-rw-r--r-- | src/balutil/packages.config | 4 |
8 files changed, 336 insertions, 6 deletions
diff --git a/src/balutil/balutil.vcxproj b/src/balutil/balutil.vcxproj index d35a7a77..4793770a 100644 --- a/src/balutil/balutil.vcxproj +++ b/src/balutil/balutil.vcxproj | |||
@@ -2,8 +2,8 @@ | |||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | ||
4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.38\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.38\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.54\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.54\build\WixToolset.BootstrapperCore.Native.props')" /> |
6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.55\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.55\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props')" /> |
7 | 7 | ||
8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
9 | <ProjectConfiguration Include="Debug|ARM64"> | 9 | <ProjectConfiguration Include="Debug|ARM64"> |
@@ -98,8 +98,8 @@ | |||
98 | <PropertyGroup> | 98 | <PropertyGroup> |
99 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 99 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
100 | </PropertyGroup> | 100 | </PropertyGroup> |
101 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.38\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.38\build\WixToolset.BootstrapperCore.Native.props'))" /> | 101 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.54\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.54\build\WixToolset.BootstrapperCore.Native.props'))" /> |
102 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.55\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.55\build\WixToolset.DUtil.props'))" /> | 102 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props'))" /> |
103 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> | 103 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> |
104 | </Target> | 104 | </Target> |
105 | </Project> | 105 | </Project> |
diff --git a/src/balutil/inc/BAFunctions.h b/src/balutil/inc/BAFunctions.h index 8101afdb..a95b7a03 100644 --- a/src/balutil/inc/BAFunctions.h +++ b/src/balutil/inc/BAFunctions.h | |||
@@ -65,6 +65,16 @@ enum BA_FUNCTIONS_MESSAGE | |||
65 | BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, | 65 | BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, |
66 | BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, | 66 | BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, |
67 | BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, | 67 | BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, |
68 | BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, | ||
69 | BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, | ||
70 | BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, | ||
71 | BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, | ||
72 | BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, | ||
73 | BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, | ||
74 | BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, | ||
75 | BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, | ||
76 | BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, | ||
77 | BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, | ||
68 | 78 | ||
69 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, | 79 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, |
70 | BA_FUNCTIONS_MESSAGE_WNDPROC, | 80 | BA_FUNCTIONS_MESSAGE_WNDPROC, |
diff --git a/src/balutil/inc/BalBaseBAFunctions.h b/src/balutil/inc/BalBaseBAFunctions.h index 72edadd5..39934128 100644 --- a/src/balutil/inc/BalBaseBAFunctions.h +++ b/src/balutil/inc/BalBaseBAFunctions.h | |||
@@ -612,6 +612,79 @@ public: // IBootstrapperApplication | |||
612 | return S_OK; | 612 | return S_OK; |
613 | } | 613 | } |
614 | 614 | ||
615 | virtual STDMETHODIMP OnBeginMsiTransactionBegin( | ||
616 | __in_z LPCWSTR /*wzTransactionId*/, | ||
617 | __inout BOOL* /*pfCancel*/ | ||
618 | ) | ||
619 | { | ||
620 | return S_OK; | ||
621 | } | ||
622 | |||
623 | virtual STDMETHODIMP OnBeginMsiTransactionComplete( | ||
624 | __in_z LPCWSTR /*wzTransactionId*/, | ||
625 | __in HRESULT /*hrStatus*/ | ||
626 | ) | ||
627 | { | ||
628 | return S_OK; | ||
629 | } | ||
630 | |||
631 | virtual STDMETHODIMP OnCommitMsiTransactionBegin( | ||
632 | __in_z LPCWSTR /*wzTransactionId*/, | ||
633 | __inout BOOL* /*pfCancel*/ | ||
634 | ) | ||
635 | { | ||
636 | return S_OK; | ||
637 | } | ||
638 | |||
639 | virtual STDMETHODIMP OnCommitMsiTransactionComplete( | ||
640 | __in_z LPCWSTR /*wzTransactionId*/, | ||
641 | __in HRESULT /*hrStatus*/ | ||
642 | ) | ||
643 | { | ||
644 | return S_OK; | ||
645 | } | ||
646 | |||
647 | virtual STDMETHODIMP OnRollbackMsiTransactionBegin( | ||
648 | __in_z LPCWSTR /*wzTransactionId*/ | ||
649 | ) | ||
650 | { | ||
651 | return S_OK; | ||
652 | } | ||
653 | |||
654 | virtual STDMETHODIMP OnRollbackMsiTransactionComplete( | ||
655 | __in_z LPCWSTR /*wzTransactionId*/, | ||
656 | __in HRESULT /*hrStatus*/ | ||
657 | ) | ||
658 | { | ||
659 | return S_OK; | ||
660 | } | ||
661 | |||
662 | virtual STDMETHODIMP OnPauseAutomaticUpdatesBegin( | ||
663 | ) | ||
664 | { | ||
665 | return S_OK; | ||
666 | } | ||
667 | |||
668 | virtual STDMETHODIMP OnPauseAutomaticUpdatesComplete( | ||
669 | __in HRESULT /*hrStatus*/ | ||
670 | ) | ||
671 | { | ||
672 | return S_OK; | ||
673 | } | ||
674 | |||
675 | virtual STDMETHODIMP OnSystemRestorePointBegin( | ||
676 | ) | ||
677 | { | ||
678 | return S_OK; | ||
679 | } | ||
680 | |||
681 | virtual STDMETHODIMP OnSystemRestorePointComplete( | ||
682 | __in HRESULT /*hrStatus*/ | ||
683 | ) | ||
684 | { | ||
685 | return S_OK; | ||
686 | } | ||
687 | |||
615 | virtual STDMETHODIMP_(HRESULT) BAProc( | 688 | virtual STDMETHODIMP_(HRESULT) BAProc( |
616 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, | 689 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, |
617 | __in const LPVOID /*pvArgs*/, | 690 | __in const LPVOID /*pvArgs*/, |
diff --git a/src/balutil/inc/BalBaseBAFunctionsProc.h b/src/balutil/inc/BalBaseBAFunctionsProc.h index f6ebd9f6..69843301 100644 --- a/src/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/balutil/inc/BalBaseBAFunctionsProc.h | |||
@@ -100,6 +100,16 @@ static HRESULT WINAPI BalBaseBAFunctionsProc( | |||
100 | case BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN: | 100 | case BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN: |
101 | case BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE: | 101 | case BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE: |
102 | case BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE: | 102 | case BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE: |
103 | case BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONBEGIN: | ||
104 | case BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE: | ||
105 | case BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN: | ||
106 | case BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE: | ||
107 | case BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN: | ||
108 | case BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE: | ||
109 | case BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN: | ||
110 | case BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE: | ||
111 | case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN: | ||
112 | case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE: | ||
103 | hr = BalBaseBootstrapperApplicationProc((BOOTSTRAPPER_APPLICATION_MESSAGE)message, pvArgs, pvResults, pvContext); | 113 | hr = BalBaseBootstrapperApplicationProc((BOOTSTRAPPER_APPLICATION_MESSAGE)message, pvArgs, pvResults, pvContext); |
104 | break; | 114 | break; |
105 | case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: | 115 | case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: |
diff --git a/src/balutil/inc/BalBaseBootstrapperApplication.h b/src/balutil/inc/BalBaseBootstrapperApplication.h index 612faf54..ad0c60e5 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplication.h +++ b/src/balutil/inc/BalBaseBootstrapperApplication.h | |||
@@ -798,6 +798,81 @@ public: // IBootstrapperApplication | |||
798 | return S_OK; | 798 | return S_OK; |
799 | } | 799 | } |
800 | 800 | ||
801 | virtual STDMETHODIMP OnBeginMsiTransactionBegin( | ||
802 | __in_z LPCWSTR /*wzTransactionId*/, | ||
803 | __inout BOOL* pfCancel | ||
804 | ) | ||
805 | { | ||
806 | *pfCancel |= CheckCanceled(); | ||
807 | return S_OK; | ||
808 | } | ||
809 | |||
810 | virtual STDMETHODIMP OnBeginMsiTransactionComplete( | ||
811 | __in_z LPCWSTR /*wzTransactionId*/, | ||
812 | __in HRESULT /*hrStatus*/ | ||
813 | ) | ||
814 | { | ||
815 | return S_OK; | ||
816 | } | ||
817 | |||
818 | virtual STDMETHODIMP OnCommitMsiTransactionBegin( | ||
819 | __in_z LPCWSTR /*wzTransactionId*/, | ||
820 | __inout BOOL* pfCancel | ||
821 | ) | ||
822 | { | ||
823 | *pfCancel |= CheckCanceled(); | ||
824 | return S_OK; | ||
825 | } | ||
826 | |||
827 | virtual STDMETHODIMP OnCommitMsiTransactionComplete( | ||
828 | __in_z LPCWSTR /*wzTransactionId*/, | ||
829 | __in HRESULT /*hrStatus*/ | ||
830 | ) | ||
831 | { | ||
832 | return S_OK; | ||
833 | } | ||
834 | |||
835 | virtual STDMETHODIMP OnRollbackMsiTransactionBegin( | ||
836 | __in_z LPCWSTR /*wzTransactionId*/ | ||
837 | ) | ||
838 | { | ||
839 | return S_OK; | ||
840 | } | ||
841 | |||
842 | virtual STDMETHODIMP OnRollbackMsiTransactionComplete( | ||
843 | __in_z LPCWSTR /*wzTransactionId*/, | ||
844 | __in HRESULT /*hrStatus*/ | ||
845 | ) | ||
846 | { | ||
847 | return S_OK; | ||
848 | } | ||
849 | |||
850 | virtual STDMETHODIMP OnPauseAutomaticUpdatesBegin( | ||
851 | ) | ||
852 | { | ||
853 | return S_OK; | ||
854 | } | ||
855 | |||
856 | virtual STDMETHODIMP OnPauseAutomaticUpdatesComplete( | ||
857 | __in HRESULT /*hrStatus*/ | ||
858 | ) | ||
859 | { | ||
860 | return S_OK; | ||
861 | } | ||
862 | |||
863 | virtual STDMETHODIMP OnSystemRestorePointBegin( | ||
864 | ) | ||
865 | { | ||
866 | return S_OK; | ||
867 | } | ||
868 | |||
869 | virtual STDMETHODIMP OnSystemRestorePointComplete( | ||
870 | __in HRESULT /*hrStatus*/ | ||
871 | ) | ||
872 | { | ||
873 | return S_OK; | ||
874 | } | ||
875 | |||
801 | virtual STDMETHODIMP_(HRESULT) BAProc( | 876 | virtual STDMETHODIMP_(HRESULT) BAProc( |
802 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, | 877 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, |
803 | __in const LPVOID /*pvArgs*/, | 878 | __in const LPVOID /*pvArgs*/, |
diff --git a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h index 7d5de8e4..648252b5 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h +++ b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h | |||
@@ -513,6 +513,96 @@ static HRESULT BalBaseBAProcOnPlanMsiPackage( | |||
513 | return pBA->OnPlanMsiPackage(pArgs->wzPackageId, pArgs->fExecute, pArgs->action, &pResults->fCancel, &pResults->actionMsiProperty, &pResults->uiLevel, &pResults->fDisableExternalUiHandler); | 513 | return pBA->OnPlanMsiPackage(pArgs->wzPackageId, pArgs->fExecute, pArgs->action, &pResults->fCancel, &pResults->actionMsiProperty, &pResults->uiLevel, &pResults->fDisableExternalUiHandler); |
514 | } | 514 | } |
515 | 515 | ||
516 | static HRESULT BalBaseBAProcOnBeginMsiTransactionBegin( | ||
517 | __in IBootstrapperApplication* pBA, | ||
518 | __in BA_ONBEGINMSITRANSACTIONBEGIN_ARGS* pArgs, | ||
519 | __inout BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS* pResults | ||
520 | ) | ||
521 | { | ||
522 | return pBA->OnBeginMsiTransactionBegin(pArgs->wzTransactionId, &pResults->fCancel); | ||
523 | } | ||
524 | |||
525 | static HRESULT BalBaseBAProcOnBeginMsiTransactionComplete( | ||
526 | __in IBootstrapperApplication* pBA, | ||
527 | __in BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS* pArgs, | ||
528 | __inout BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS* /*pResults*/ | ||
529 | ) | ||
530 | { | ||
531 | return pBA->OnBeginMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus); | ||
532 | } | ||
533 | |||
534 | static HRESULT BalBaseBAProcOnCommitMsiTransactionBegin( | ||
535 | __in IBootstrapperApplication* pBA, | ||
536 | __in BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS* pArgs, | ||
537 | __inout BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS* pResults | ||
538 | ) | ||
539 | { | ||
540 | return pBA->OnCommitMsiTransactionBegin(pArgs->wzTransactionId, &pResults->fCancel); | ||
541 | } | ||
542 | |||
543 | static HRESULT BalBaseBAProcOnCommitMsiTransactionComplete( | ||
544 | __in IBootstrapperApplication* pBA, | ||
545 | __in BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS* pArgs, | ||
546 | __inout BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS* /*pResults*/ | ||
547 | ) | ||
548 | { | ||
549 | return pBA->OnCommitMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus); | ||
550 | } | ||
551 | |||
552 | static HRESULT BalBaseBAProcOnRollbackMsiTransactionBegin( | ||
553 | __in IBootstrapperApplication* pBA, | ||
554 | __in BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS* pArgs, | ||
555 | __inout BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS* /*pResults*/ | ||
556 | ) | ||
557 | { | ||
558 | return pBA->OnRollbackMsiTransactionBegin(pArgs->wzTransactionId); | ||
559 | } | ||
560 | |||
561 | static HRESULT BalBaseBAProcOnRollbackMsiTransactionComplete( | ||
562 | __in IBootstrapperApplication* pBA, | ||
563 | __in BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS* pArgs, | ||
564 | __inout BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS* /*pResults*/ | ||
565 | ) | ||
566 | { | ||
567 | return pBA->OnRollbackMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus); | ||
568 | } | ||
569 | |||
570 | static HRESULT BalBaseBAProcOnPauseAutomaticUpdatesBegin( | ||
571 | __in IBootstrapperApplication* pBA, | ||
572 | __in BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS* /*pArgs*/, | ||
573 | __inout BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS* /*pResults*/ | ||
574 | ) | ||
575 | { | ||
576 | return pBA->OnPauseAutomaticUpdatesBegin(); | ||
577 | } | ||
578 | |||
579 | static HRESULT BalBaseBAProcOnPauseAutomaticUpdatesComplete( | ||
580 | __in IBootstrapperApplication* pBA, | ||
581 | __in BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS* pArgs, | ||
582 | __inout BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS* /*pResults*/ | ||
583 | ) | ||
584 | { | ||
585 | return pBA->OnPauseAutomaticUpdatesComplete(pArgs->hrStatus); | ||
586 | } | ||
587 | |||
588 | static HRESULT BalBaseBAProcOnSystemRestorePointBegin( | ||
589 | __in IBootstrapperApplication* pBA, | ||
590 | __in BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS* /*pArgs*/, | ||
591 | __inout BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS* /*pResults*/ | ||
592 | ) | ||
593 | { | ||
594 | return pBA->OnSystemRestorePointBegin(); | ||
595 | } | ||
596 | |||
597 | static HRESULT BalBaseBAProcOnSystemRestorePointComplete( | ||
598 | __in IBootstrapperApplication* pBA, | ||
599 | __in BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS* pArgs, | ||
600 | __inout BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS* /*pResults*/ | ||
601 | ) | ||
602 | { | ||
603 | return pBA->OnSystemRestorePointComplete(pArgs->hrStatus); | ||
604 | } | ||
605 | |||
516 | /******************************************************************* | 606 | /******************************************************************* |
517 | BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication. | 607 | BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication. |
518 | Provides a default mapping between the new message based BA interface and | 608 | Provides a default mapping between the new message based BA interface and |
@@ -701,6 +791,35 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc( | |||
701 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE: | 791 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE: |
702 | hr = BalBaseBAProcOnPlanMsiPackage(pBA, reinterpret_cast<BA_ONPLANMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANMSIPACKAGE_RESULTS*>(pvResults)); | 792 | hr = BalBaseBAProcOnPlanMsiPackage(pBA, reinterpret_cast<BA_ONPLANMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANMSIPACKAGE_RESULTS*>(pvResults)); |
703 | break; | 793 | break; |
794 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN: | ||
795 | hr = BalBaseBAProcOnBeginMsiTransactionBegin(pBA, reinterpret_cast<BA_ONBEGINMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS*>(pvResults)); | ||
796 | break; | ||
797 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE: | ||
798 | hr = BalBaseBAProcOnBeginMsiTransactionComplete(pBA, reinterpret_cast<BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults)); | ||
799 | break; | ||
800 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN: | ||
801 | hr = BalBaseBAProcOnCommitMsiTransactionBegin(pBA, reinterpret_cast<BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS*>(pvResults)); | ||
802 | break; | ||
803 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE: | ||
804 | hr = BalBaseBAProcOnCommitMsiTransactionComplete(pBA, reinterpret_cast<BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults)); | ||
805 | break; | ||
806 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN: | ||
807 | hr = BalBaseBAProcOnRollbackMsiTransactionBegin(pBA, reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS*>(pvResults)); | ||
808 | break; | ||
809 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE: | ||
810 | hr = BalBaseBAProcOnRollbackMsiTransactionComplete(pBA, reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults)); | ||
811 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN: | ||
812 | hr = BalBaseBAProcOnPauseAutomaticUpdatesBegin(pBA, reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS*>(pvResults)); | ||
813 | break; | ||
814 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE: | ||
815 | hr = BalBaseBAProcOnPauseAutomaticUpdatesComplete(pBA, reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS*>(pvResults)); | ||
816 | break; | ||
817 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN: | ||
818 | hr = BalBaseBAProcOnSystemRestorePointBegin(pBA, reinterpret_cast<BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS*>(pvResults)); | ||
819 | break; | ||
820 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE: | ||
821 | hr = BalBaseBAProcOnSystemRestorePointComplete(pBA, reinterpret_cast<BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS*>(pvResults)); | ||
822 | break; | ||
704 | } | 823 | } |
705 | } | 824 | } |
706 | 825 | ||
diff --git a/src/balutil/inc/IBootstrapperApplication.h b/src/balutil/inc/IBootstrapperApplication.h index 75ea7bc9..dd8f8024 100644 --- a/src/balutil/inc/IBootstrapperApplication.h +++ b/src/balutil/inc/IBootstrapperApplication.h | |||
@@ -518,6 +518,49 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
518 | __in DWORD dwProcessId | 518 | __in DWORD dwProcessId |
519 | ) = 0; | 519 | ) = 0; |
520 | 520 | ||
521 | STDMETHOD(OnBeginMsiTransactionBegin)( | ||
522 | __in_z LPCWSTR wzTransactionId, | ||
523 | __inout BOOL* pfCancel | ||
524 | ) = 0; | ||
525 | |||
526 | STDMETHOD(OnBeginMsiTransactionComplete)( | ||
527 | __in_z LPCWSTR wzTransactionId, | ||
528 | __in HRESULT hrStatus | ||
529 | ) = 0; | ||
530 | |||
531 | STDMETHOD(OnCommitMsiTransactionBegin)( | ||
532 | __in_z LPCWSTR wzTransactionId, | ||
533 | __inout BOOL* pfCancel | ||
534 | ) = 0; | ||
535 | |||
536 | STDMETHOD(OnCommitMsiTransactionComplete)( | ||
537 | __in_z LPCWSTR wzTransactionId, | ||
538 | __in HRESULT hrStatus | ||
539 | ) = 0; | ||
540 | |||
541 | STDMETHOD(OnRollbackMsiTransactionBegin)( | ||
542 | __in_z LPCWSTR wzTransactionId | ||
543 | ) = 0; | ||
544 | |||
545 | STDMETHOD(OnRollbackMsiTransactionComplete)( | ||
546 | __in_z LPCWSTR wzTransactionId, | ||
547 | __in HRESULT hrStatus | ||
548 | ) = 0; | ||
549 | |||
550 | STDMETHOD(OnPauseAutomaticUpdatesBegin)( | ||
551 | ) = 0; | ||
552 | |||
553 | STDMETHOD(OnPauseAutomaticUpdatesComplete)( | ||
554 | __in HRESULT hrStatus | ||
555 | ) = 0; | ||
556 | |||
557 | STDMETHOD(OnSystemRestorePointBegin)( | ||
558 | ) = 0; | ||
559 | |||
560 | STDMETHOD(OnSystemRestorePointComplete)( | ||
561 | __in HRESULT hrStatus | ||
562 | ) = 0; | ||
563 | |||
521 | // BAProc - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method to give the BA raw access to the callback from the engine. | 564 | // BAProc - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method to give the BA raw access to the callback from the engine. |
522 | // This might be used to help the BA support more than one version of the engine. | 565 | // This might be used to help the BA support more than one version of the engine. |
523 | STDMETHOD(BAProc)( | 566 | STDMETHOD(BAProc)( |
diff --git a/src/balutil/packages.config b/src/balutil/packages.config index dbc4eb18..e6716363 100644 --- a/src/balutil/packages.config +++ b/src/balutil/packages.config | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <packages> | 2 | <packages> |
3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> |
4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.38" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.54" targetFramework="native" /> |
5 | <package id="WixToolset.DUtil" version="4.0.55" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.56" targetFramework="native" /> |
6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |