diff options
author | Rob Mensching <rob@firegiant.com> | 2024-01-11 18:26:20 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2024-03-06 18:03:38 -0800 |
commit | 0d3d54992104288e9ee0c834d0b96e8502fd2d42 (patch) | |
tree | 9efa49c4983cd2ba1becab64bd1f2faccac88acf /src/api/burn/balutil/inc/BalBaseBAFunctions.h | |
parent | 2824298d9dd817a47527c920363556b54ead5d5d (diff) | |
download | wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.gz wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.bz2 wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.zip |
Move the BootstrapperApplication out of proc
Diffstat (limited to 'src/api/burn/balutil/inc/BalBaseBAFunctions.h')
-rw-r--r-- | src/api/burn/balutil/inc/BalBaseBAFunctions.h | 66 |
1 files changed, 27 insertions, 39 deletions
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h index 6ad109c3..33b71324 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h | |||
@@ -1,16 +1,12 @@ | |||
1 | #pragma once | 1 | #pragma once |
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 | |||
5 | #include <windows.h> | 4 | #include <windows.h> |
6 | #include <msiquery.h> | 5 | #include <msiquery.h> |
7 | 6 | ||
8 | #include "BAFunctions.h" | 7 | #include <batypes.h> |
8 | |||
9 | #include "IBAFunctions.h" | 9 | #include "IBAFunctions.h" |
10 | #include "BootstrapperEngine.h" | ||
11 | #include "BootstrapperApplication.h" | ||
12 | #include "IBootstrapperEngine.h" | ||
13 | #include "IBootstrapperApplication.h" | ||
14 | 10 | ||
15 | class CBalBaseBAFunctions : public IBAFunctions | 11 | class CBalBaseBAFunctions : public IBAFunctions |
16 | { | 12 | { |
@@ -69,8 +65,7 @@ public: // IBootstrapperApplication | |||
69 | virtual STDMETHODIMP_(HRESULT) BAProc( | 65 | virtual STDMETHODIMP_(HRESULT) BAProc( |
70 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, | 66 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, |
71 | __in const LPVOID /*pvArgs*/, | 67 | __in const LPVOID /*pvArgs*/, |
72 | __inout LPVOID /*pvResults*/, | 68 | __inout LPVOID /*pvResults*/ |
73 | __in_opt LPVOID /*pvContext*/ | ||
74 | ) | 69 | ) |
75 | { | 70 | { |
76 | return E_NOTIMPL; | 71 | return E_NOTIMPL; |
@@ -80,12 +75,31 @@ public: // IBootstrapperApplication | |||
80 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, | 75 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, |
81 | __in const LPVOID /*pvArgs*/, | 76 | __in const LPVOID /*pvArgs*/, |
82 | __inout LPVOID /*pvResults*/, | 77 | __inout LPVOID /*pvResults*/, |
83 | __inout HRESULT* /*phr*/, | 78 | __inout HRESULT* /*phr*/ |
84 | __in_opt LPVOID /*pvContext*/ | ||
85 | ) | 79 | ) |
86 | { | 80 | { |
87 | } | 81 | } |
88 | 82 | ||
83 | virtual STDMETHODIMP OnCreate( | ||
84 | __in IBootstrapperEngine* pEngine, | ||
85 | __in BOOTSTRAPPER_COMMAND* /*pCommand*/ | ||
86 | ) | ||
87 | { | ||
88 | HRESULT hr = S_OK; | ||
89 | |||
90 | pEngine->AddRef(); | ||
91 | m_pEngine = pEngine; | ||
92 | |||
93 | return hr; | ||
94 | } | ||
95 | |||
96 | virtual STDMETHODIMP OnDestroy( | ||
97 | __in BOOL /*fReload*/ | ||
98 | ) | ||
99 | { | ||
100 | return S_OK; | ||
101 | } | ||
102 | |||
89 | virtual STDMETHODIMP OnStartup() | 103 | virtual STDMETHODIMP OnStartup() |
90 | { | 104 | { |
91 | return S_OK; | 105 | return S_OK; |
@@ -837,20 +851,6 @@ public: // IBootstrapperApplication | |||
837 | return S_OK; | 851 | return S_OK; |
838 | } | 852 | } |
839 | 853 | ||
840 | virtual STDMETHODIMP OnSetUpdateBegin() | ||
841 | { | ||
842 | return S_OK; | ||
843 | } | ||
844 | |||
845 | virtual STDMETHODIMP OnSetUpdateComplete( | ||
846 | __in HRESULT /*hrStatus*/, | ||
847 | __in_z_opt LPCWSTR /*wzPreviousPackageId*/, | ||
848 | __in_z_opt LPCWSTR /*wzNewPackageId*/ | ||
849 | ) | ||
850 | { | ||
851 | return S_OK; | ||
852 | } | ||
853 | |||
854 | virtual STDMETHODIMP OnPlanRestoreRelatedBundle( | 854 | virtual STDMETHODIMP OnPlanRestoreRelatedBundle( |
855 | __in_z LPCWSTR /*wzBundleId*/, | 855 | __in_z LPCWSTR /*wzBundleId*/, |
856 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, | 856 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, |
@@ -996,22 +996,13 @@ public: // IBAFunctions | |||
996 | } | 996 | } |
997 | 997 | ||
998 | protected: | 998 | protected: |
999 | CBalBaseBAFunctions( | 999 | CBalBaseBAFunctions(HMODULE hModule) |
1000 | __in HMODULE hModule, | ||
1001 | __in IBootstrapperEngine* pEngine, | ||
1002 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs | ||
1003 | ) | ||
1004 | { | 1000 | { |
1005 | m_cReferences = 1; | 1001 | m_cReferences = 1; |
1006 | m_hModule = hModule; | 1002 | m_hModule = hModule; |
1007 | pEngine->AddRef(); | ||
1008 | m_pEngine = pEngine; | ||
1009 | 1003 | ||
1010 | memcpy_s(&m_command, sizeof(m_command), pArgs->pBootstrapperCreateArgs->pCommand, sizeof(BOOTSTRAPPER_COMMAND)); | 1004 | m_hwndParent = NULL; |
1011 | memcpy_s(&m_baCreateArgs, sizeof(m_baCreateArgs), pArgs->pBootstrapperCreateArgs, sizeof(BOOTSTRAPPER_CREATE_ARGS)); | 1005 | m_pEngine = NULL; |
1012 | memcpy_s(&m_bafCreateArgs, sizeof(m_bafCreateArgs), pArgs, sizeof(BA_FUNCTIONS_CREATE_ARGS)); | ||
1013 | m_baCreateArgs.pCommand = &m_command; | ||
1014 | m_bafCreateArgs.pBootstrapperCreateArgs = &m_baCreateArgs; | ||
1015 | } | 1006 | } |
1016 | 1007 | ||
1017 | virtual ~CBalBaseBAFunctions() | 1008 | virtual ~CBalBaseBAFunctions() |
@@ -1025,8 +1016,5 @@ private: | |||
1025 | protected: | 1016 | protected: |
1026 | IBootstrapperEngine* m_pEngine; | 1017 | IBootstrapperEngine* m_pEngine; |
1027 | HMODULE m_hModule; | 1018 | HMODULE m_hModule; |
1028 | BA_FUNCTIONS_CREATE_ARGS m_bafCreateArgs; | ||
1029 | BOOTSTRAPPER_CREATE_ARGS m_baCreateArgs; | ||
1030 | BOOTSTRAPPER_COMMAND m_command; | ||
1031 | HWND m_hwndParent; | 1019 | HWND m_hwndParent; |
1032 | }; | 1020 | }; |