diff options
Diffstat (limited to 'src/ext')
27 files changed, 2924 insertions, 16 deletions
diff --git a/src/ext/Bal/Bal.wixext.sln b/src/ext/Bal/Bal.wixext.sln index 48eb190e..cbd66f76 100644 --- a/src/ext/Bal/Bal.wixext.sln +++ b/src/ext/Bal/Bal.wixext.sln | |||
| @@ -17,6 +17,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixiuiba", "wixiuiba\wixiui | |||
| 17 | EndProject | 17 | EndProject |
| 18 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stdbas", "stdbas\stdbas.vcxproj", "{DBBF5F32-BAEA-46A8-99A0-17277A906456}" | 18 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stdbas", "stdbas\stdbas.vcxproj", "{DBBF5F32-BAEA-46A8-99A0-17277A906456}" |
| 19 | EndProject | 19 | EndProject |
| 20 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WixStdFnUnitTest", "test\WixStdFnUnitTest\WixStdFnUnitTest.vcxproj", "{9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}" | ||
| 21 | EndProject | ||
| 20 | Global | 22 | Global |
| 21 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 23 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| 22 | Debug|Any CPU = Debug|Any CPU | 24 | Debug|Any CPU = Debug|Any CPU |
| @@ -137,6 +139,22 @@ Global | |||
| 137 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x64.Build.0 = Release|x64 | 139 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x64.Build.0 = Release|x64 |
| 138 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x86.ActiveCfg = Release|Win32 | 140 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x86.ActiveCfg = Release|Win32 |
| 139 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x86.Build.0 = Release|Win32 | 141 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x86.Build.0 = Release|Win32 |
| 142 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|Any CPU.ActiveCfg = Debug|Win32 | ||
| 143 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|Any CPU.Build.0 = Debug|Win32 | ||
| 144 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|ARM64.ActiveCfg = Debug|Win32 | ||
| 145 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|ARM64.Build.0 = Debug|Win32 | ||
| 146 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|x64.ActiveCfg = Debug|Win32 | ||
| 147 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|x64.Build.0 = Debug|Win32 | ||
| 148 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| 149 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|x86.Build.0 = Debug|Win32 | ||
| 150 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|Any CPU.ActiveCfg = Release|Win32 | ||
| 151 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|Any CPU.Build.0 = Release|Win32 | ||
| 152 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|ARM64.ActiveCfg = Release|Win32 | ||
| 153 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|ARM64.Build.0 = Release|Win32 | ||
| 154 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|x64.ActiveCfg = Release|Win32 | ||
| 155 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|x64.Build.0 = Release|Win32 | ||
| 156 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|x86.ActiveCfg = Release|Win32 | ||
| 157 | {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|x86.Build.0 = Release|Win32 | ||
| 140 | EndGlobalSection | 158 | EndGlobalSection |
| 141 | GlobalSection(SolutionProperties) = preSolution | 159 | GlobalSection(SolutionProperties) = preSolution |
| 142 | HideSolutionNode = FALSE | 160 | HideSolutionNode = FALSE |
diff --git a/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp b/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp index 14a898e8..a0aa0488 100644 --- a/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp +++ b/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp | |||
| @@ -74,9 +74,6 @@ HRESULT WINAPI CreateBAFunctions( | |||
| 74 | HRESULT hr = S_OK; | 74 | HRESULT hr = S_OK; |
| 75 | CWixSampleBAFunctions* pBAFunctions = NULL; | 75 | CWixSampleBAFunctions* pBAFunctions = NULL; |
| 76 | 76 | ||
| 77 | // This is required to enable logging functions. | ||
| 78 | BalInitialize(pArgs->pEngine); | ||
| 79 | |||
| 80 | pBAFunctions = new CWixSampleBAFunctions(hModule); | 77 | pBAFunctions = new CWixSampleBAFunctions(hModule); |
| 81 | ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CWixSampleBAFunctions object."); | 78 | ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CWixSampleBAFunctions object."); |
| 82 | 79 | ||
diff --git a/src/ext/Bal/Samples/bafunctions/bafunctions.cpp b/src/ext/Bal/Samples/bafunctions/bafunctions.cpp index d26e7cce..72dc1f54 100644 --- a/src/ext/Bal/Samples/bafunctions/bafunctions.cpp +++ b/src/ext/Bal/Samples/bafunctions/bafunctions.cpp | |||
| @@ -26,13 +26,16 @@ extern "C" BOOL WINAPI DllMain( | |||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | extern "C" HRESULT WINAPI BAFunctionsCreate( | 28 | extern "C" HRESULT WINAPI BAFunctionsCreate( |
| 29 | __in const BA_FUNCTIONS_CREATE_ARGS* /*pArgs*/, | 29 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, |
| 30 | __inout BA_FUNCTIONS_CREATE_RESULTS* /*pResults*/ | 30 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults |
| 31 | ) | 31 | ) |
| 32 | { | 32 | { |
| 33 | HRESULT hr = S_OK; | 33 | HRESULT hr = S_OK; |
| 34 | 34 | ||
| 35 | //hr = CreateBAFunctions(vhInstance, pArgs, pResults); | 35 | // This is required to enable logging functions. |
| 36 | BalInitialize(pArgs->pEngine); | ||
| 37 | |||
| 38 | hr = CreateBAFunctions(vhInstance, pArgs, pResults); | ||
| 36 | BalExitOnFailure(hr, "Failed to create BAFunctions interface."); | 39 | BalExitOnFailure(hr, "Failed to create BAFunctions interface."); |
| 37 | 40 | ||
| 38 | LExit: | 41 | LExit: |
diff --git a/src/ext/Bal/bal.cmd b/src/ext/Bal/bal.cmd index 7a48f6fc..df9ceca4 100644 --- a/src/ext/Bal/bal.cmd +++ b/src/ext/Bal/bal.cmd | |||
| @@ -17,34 +17,37 @@ | |||
| 17 | @if "%_INC%"=="" call :clean | 17 | @if "%_INC%"=="" call :clean |
| 18 | @if NOT "%_CLEAN%"=="" goto :end | 18 | @if NOT "%_CLEAN%"=="" goto :end |
| 19 | 19 | ||
| 20 | @echo Building ext\BootstrapperApplications %_C% using %_N% | 20 | @echo Building ext\Bal %_C% using %_N% |
| 21 | 21 | ||
| 22 | :: Restore | 22 | :: Restore |
| 23 | |||
| 24 | :: Build | 23 | :: Build |
| 24 | :: Pack | ||
| 25 | :: Note: This test project must be restored and built directly to get all its support files laid out correctly. | ||
| 26 | :: Everything else is built by the traversal project. | ||
| 25 | msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\WixToolsetTest.BootstrapperApplications\WixToolsetTest.BootstrapperApplications.csproj -bl:%_L%\ext_bal_build.binlog || exit /b | 27 | msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\WixToolsetTest.BootstrapperApplications\WixToolsetTest.BootstrapperApplications.csproj -bl:%_L%\ext_bal_build.binlog || exit /b |
| 26 | 28 | ||
| 27 | msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\examples\examples.proj -bl:%_L%\bal_examples_build.binlog || exit /b | 29 | msbuild bal_t.proj -p:Configuration=%_C% -tl -nologo -warnaserror -bl:%_L%\bal_build.binlog || exit /b |
| 28 | 30 | ||
| 29 | :: Test | 31 | :: Test |
| 30 | dotnet test ^ | 32 | dotnet test ^ |
| 33 | %_B%\x86\WixStdFnUnitTest.dll ^ | ||
| 31 | %_B%\net6.0\WixToolsetTest.BootstrapperApplications.dll ^ | 34 | %_B%\net6.0\WixToolsetTest.BootstrapperApplications.dll ^ |
| 32 | --nologo -l "trx;LogFileName=%_L%\TestResults\bal.wixext.trx" || exit /b | 35 | --nologo -l "trx;LogFileName=%_L%\TestResults\bal.wixext.trx" || exit /b |
| 33 | 36 | ||
| 34 | :: Pack | ||
| 35 | msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true wixext\WixToolset.BootstrapperApplications.wixext.csproj || exit /b | ||
| 36 | msbuild -t:Pack -Restore -p:Configuration=%_C% -tl -nologo -warnaserror wixext-backward-compatible\WixToolset.Bal.wixext.csproj || exit /b | ||
| 37 | |||
| 38 | @goto :end | 37 | @goto :end |
| 39 | 38 | ||
| 40 | :clean | 39 | :clean |
| 41 | @rd /s/q "..\..\..\build\Bal.wixext" 2> nul | 40 | @rd /s/q "..\..\..\build\Bal.wixext" 2> nul |
| 42 | @del "..\..\..\build\artifacts\WixToolset.Bal.wixext.*.nupkg" 2> nul | 41 | @del "..\..\..\build\artifacts\WixToolset.Bal.wixext.*.nupkg" 2> nul |
| 43 | @del "..\..\..\build\artifacts\WixToolset.BootstrapperApplications.wixext.*.nupkg" 2> nul | 42 | @del "..\..\..\build\artifacts\WixToolset.BootstrapperApplications.wixext.*.nupkg" 2> nul |
| 43 | @del "..\..\..\build\artifacts\WixToolset.WixStandardBootstrapperApplicationFunctionApi.*.nupkg" 2> nul | ||
| 44 | @del "%_L%\ext_bal_build.binlog" 2> nul | 44 | @del "%_L%\ext_bal_build.binlog" 2> nul |
| 45 | @del "%_L%\bal_fnsapi_build.binlog" 2> nul | ||
| 46 | @del "%_L%\bal_examples_build.binlog" 2> nul | ||
| 45 | @del "%_L%\TestResults\bal.wixext.trx" 2> nul | 47 | @del "%_L%\TestResults\bal.wixext.trx" 2> nul |
| 46 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bal.wixext" 2> nul | 48 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bal.wixext" 2> nul |
| 47 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrapperapplications.wixext" 2> nul | 49 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrapperapplications.wixext" 2> nul |
| 50 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.wixstandardbootstrapperapplicationfunctionapi" 2> nul | ||
| 48 | @exit /b | 51 | @exit /b |
| 49 | 52 | ||
| 50 | :end | 53 | :end |
diff --git a/src/ext/Bal/bal_t.proj b/src/ext/Bal/bal_t.proj new file mode 100644 index 00000000..a0e66e97 --- /dev/null +++ b/src/ext/Bal/bal_t.proj | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-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. --> | ||
| 3 | |||
| 4 | <Project Sdk="Microsoft.Build.Traversal"> | ||
| 5 | <ItemGroup> | ||
| 6 | <!-- Restore: Explicitly restore the test projects, which need some hand-holding. --> | ||
| 7 | <ProjectReference Include="test\WixStdFnUnitTest\WixStdFnUnitTest.vcxproj" Targets="Restore" BuildInParallel="false" /> | ||
| 8 | <ProjectReference Include="test\examples\examples.proj" Targets="Restore" /> | ||
| 9 | <ProjectReference Include="wixext-backward-compatible\WixToolset.Bal.wixext.csproj" Targets="Restore" /> | ||
| 10 | |||
| 11 | <!-- Build --> | ||
| 12 | |||
| 13 | <!-- C++/CLI projects will try to build their dependent projects in parallel with others, so they must be built first. --> | ||
| 14 | <ProjectReference Include="test\WixStdFnUnitTest\WixStdFnUnitTest.vcxproj" Properties="Platform=x86" BuildInParallel="false" /> | ||
| 15 | |||
| 16 | <!-- wixstdfn x86 is built by WixStdFnUnitTest --> | ||
| 17 | <ProjectReference Include="wixstdfn\wixstdfn.vcxproj" Properties="Platform=x64" /> | ||
| 18 | <ProjectReference Include="wixstdfn\wixstdfn.vcxproj" Properties="Platform=ARM64" /> | ||
| 19 | |||
| 20 | <ProjectReference Include="test\examples\examples.proj" /> | ||
| 21 | |||
| 22 | <!-- Pack --> | ||
| 23 | <ProjectReference Include="wixstdfn\wixstdfn.vcxproj" Properties="NoBuild=true" Targets="PackNative" /> | ||
| 24 | <ProjectReference Include="wixext\WixToolset.BootstrapperApplications.wixext.csproj" Properties="NoBuild=true" Targets="Pack" /> | ||
| 25 | <ProjectReference Include="wixext-backward-compatible\WixToolset.Bal.wixext.csproj" Targets="Pack" /> | ||
| 26 | </ItemGroup> | ||
| 27 | </Project> | ||
diff --git a/src/ext/Bal/stdbas/stdbas.vcxproj b/src/ext/Bal/stdbas/stdbas.vcxproj index c9b1451b..12dbbc61 100644 --- a/src/ext/Bal/stdbas/stdbas.vcxproj +++ b/src/ext/Bal/stdbas/stdbas.vcxproj | |||
| @@ -47,6 +47,10 @@ | |||
| 47 | <ImportGroup Label="Shared"> | 47 | <ImportGroup Label="Shared"> |
| 48 | </ImportGroup> | 48 | </ImportGroup> |
| 49 | 49 | ||
| 50 | <PropertyGroup> | ||
| 51 | <ProjectAdditionalIncludeDirectories>inc;..\wixstdfn\inc</ProjectAdditionalIncludeDirectories> | ||
| 52 | </PropertyGroup> | ||
| 53 | |||
| 50 | <ItemGroup> | 54 | <ItemGroup> |
| 51 | <ClInclude Include="inc\WixInternalUIBootstrapperApplication.h" /> | 55 | <ClInclude Include="inc\WixInternalUIBootstrapperApplication.h" /> |
| 52 | <ClInclude Include="inc\WixStandardBootstrapperApplication.h" /> | 56 | <ClInclude Include="inc\WixStandardBootstrapperApplication.h" /> |
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp b/src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp new file mode 100644 index 00000000..ba04c1bb --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | // 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 | |||
| 3 | #include "precomp.h" | ||
| 4 | |||
| 5 | using namespace System; | ||
| 6 | using namespace Xunit; | ||
| 7 | using namespace WixInternal::TestSupport; | ||
| 8 | using namespace WixInternal::TestSupport::XunitExtensions; | ||
| 9 | |||
| 10 | namespace BalUtilTests | ||
| 11 | { | ||
| 12 | public ref class BAFunctions | ||
| 13 | { | ||
| 14 | public: | ||
| 15 | [Fact(Skip = "Need a mock implementation of IBootstrapperEngine to test BAFunctions.")] | ||
| 16 | void CanCreateTestBAFunctions() | ||
| 17 | { | ||
| 18 | HRESULT hr = S_OK; | ||
| 19 | BA_FUNCTIONS_CREATE_ARGS args = { }; | ||
| 20 | BA_FUNCTIONS_CREATE_RESULTS results = { }; | ||
| 21 | IBootstrapperEngine* pEngine = NULL; | ||
| 22 | BOOTSTRAPPER_COMMAND command = { }; | ||
| 23 | IBAFunctions* pBAFunctions = NULL; | ||
| 24 | |||
| 25 | args.cbSize = sizeof(args); | ||
| 26 | args.pEngine = pEngine; | ||
| 27 | args.pCommand = &command; | ||
| 28 | |||
| 29 | results.cbSize = sizeof(results); | ||
| 30 | |||
| 31 | try | ||
| 32 | { | ||
| 33 | BalInitialize(pEngine); | ||
| 34 | |||
| 35 | hr = CreateBAFunctions(NULL, &args, &results); | ||
| 36 | NativeAssert::Succeeded(hr, "Failed to create BAFunctions."); | ||
| 37 | |||
| 38 | pBAFunctions = reinterpret_cast<IBAFunctions*>(results.pvBAFunctionsProcContext); | ||
| 39 | } | ||
| 40 | finally | ||
| 41 | { | ||
| 42 | ReleaseObject(pEngine); | ||
| 43 | ReleaseObject(pBAFunctions); | ||
| 44 | } | ||
| 45 | } | ||
| 46 | }; | ||
| 47 | } | ||
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp b/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp new file mode 100644 index 00000000..3e850442 --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | // 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 | |||
| 3 | #include "precomp.h" | ||
| 4 | #include "BalBaseBAFunctions.h" | ||
| 5 | #include "BalBaseBAFunctionsProc.h" | ||
| 6 | |||
| 7 | class CTestBAFunctions : public CBalBaseBAFunctions | ||
| 8 | { | ||
| 9 | public: | ||
| 10 | CTestBAFunctions( | ||
| 11 | __in HMODULE hModule | ||
| 12 | ) : CBalBaseBAFunctions(hModule) | ||
| 13 | { | ||
| 14 | } | ||
| 15 | }; | ||
| 16 | |||
| 17 | HRESULT CreateBAFunctions( | ||
| 18 | __in HMODULE hModule, | ||
| 19 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | ||
| 20 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults | ||
| 21 | ) | ||
| 22 | { | ||
| 23 | HRESULT hr = S_OK; | ||
| 24 | CTestBAFunctions* pFunction = NULL; | ||
| 25 | |||
| 26 | pFunction = new CTestBAFunctions(hModule); | ||
| 27 | ExitOnNull(pFunction, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object."); | ||
| 28 | |||
| 29 | hr = pFunction->OnCreate(pArgs->pEngine, pArgs->pCommand); | ||
| 30 | ExitOnFailure(hr, "Failed to initialize new test bafunctions."); | ||
| 31 | |||
| 32 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; | ||
| 33 | pResults->pvBAFunctionsProcContext = pFunction; | ||
| 34 | pFunction = NULL; | ||
| 35 | |||
| 36 | LExit: | ||
| 37 | ReleaseObject(pFunction); | ||
| 38 | return hr; | ||
| 39 | } | ||
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.h b/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.h new file mode 100644 index 00000000..e25e40c3 --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.h | |||
| @@ -0,0 +1,8 @@ | |||
| 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. | ||
| 3 | |||
| 4 | HRESULT CreateBAFunctions( | ||
| 5 | __in HMODULE hModule, | ||
| 6 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | ||
| 7 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults | ||
| 8 | ); | ||
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.cpp b/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.cpp new file mode 100644 index 00000000..b345ab9f --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.cpp | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | // 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 | |||
| 3 | #include "precomp.h" | ||
| 4 | #include "BalBaseBootstrapperApplication.h" | ||
| 5 | |||
| 6 | class CTestBootstrapperApplication : public CBalBaseBootstrapperApplication | ||
| 7 | { | ||
| 8 | public: | ||
| 9 | CTestBootstrapperApplication() : CBalBaseBootstrapperApplication() | ||
| 10 | { | ||
| 11 | } | ||
| 12 | }; | ||
| 13 | |||
| 14 | HRESULT CreateBootstrapperApplication( | ||
| 15 | __out IBootstrapperApplication** ppApplication | ||
| 16 | ) | ||
| 17 | { | ||
| 18 | HRESULT hr = S_OK; | ||
| 19 | CTestBootstrapperApplication* pApplication = NULL; | ||
| 20 | |||
| 21 | pApplication = new CTestBootstrapperApplication(); | ||
| 22 | ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bootstrapper application object."); | ||
| 23 | |||
| 24 | *ppApplication = pApplication; | ||
| 25 | pApplication = NULL; | ||
| 26 | |||
| 27 | LExit: | ||
| 28 | ReleaseObject(pApplication); | ||
| 29 | return hr; | ||
| 30 | } | ||
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.h b/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.h new file mode 100644 index 00000000..313bfede --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.h | |||
| @@ -0,0 +1,6 @@ | |||
| 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. | ||
| 3 | |||
| 4 | HRESULT CreateBootstrapperApplication( | ||
| 5 | __out IBootstrapperApplication** ppApplication | ||
| 6 | ); | ||
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/WixStdFnUnitTest.filters b/src/ext/Bal/test/WixStdFnUnitTest/WixStdFnUnitTest.filters new file mode 100644 index 00000000..0b3b60be --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/WixStdFnUnitTest.filters | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <ItemGroup> | ||
| 4 | <Filter Include="Source Files"> | ||
| 5 | <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> | ||
| 6 | <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> | ||
| 7 | </Filter> | ||
| 8 | <Filter Include="Header Files"> | ||
| 9 | <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> | ||
| 10 | <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> | ||
| 11 | </Filter> | ||
| 12 | <Filter Include="Resource Files"> | ||
| 13 | <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> | ||
| 14 | <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> | ||
| 15 | </Filter> | ||
| 16 | </ItemGroup> | ||
| 17 | <ItemGroup> | ||
| 18 | <ClCompile Include="BAFunctionsTests.cpp"> | ||
| 19 | <Filter>Source Files</Filter> | ||
| 20 | </ClCompile> | ||
| 21 | <ClCompile Include="BootstrapperApplicationTests.cpp"> | ||
| 22 | <Filter>Source Files</Filter> | ||
| 23 | </ClCompile> | ||
| 24 | <ClCompile Include="precomp.cpp"> | ||
| 25 | <Filter>Source Files</Filter> | ||
| 26 | </ClCompile> | ||
| 27 | <ClCompile Include="TestBAFunctions.cpp"> | ||
| 28 | <Filter>Source Files</Filter> | ||
| 29 | </ClCompile> | ||
| 30 | <ClCompile Include="TestBootstrapperApplication.cpp"> | ||
| 31 | <Filter>Source Files</Filter> | ||
| 32 | </ClCompile> | ||
| 33 | </ItemGroup> | ||
| 34 | <ItemGroup> | ||
| 35 | <ClInclude Include="precomp.h"> | ||
| 36 | <Filter>Header Files</Filter> | ||
| 37 | </ClInclude> | ||
| 38 | <ClInclude Include="TestBAFunctions.h"> | ||
| 39 | <Filter>Header Files</Filter> | ||
| 40 | </ClInclude> | ||
| 41 | <ClInclude Include="TestBootstrapperApplication.h"> | ||
| 42 | <Filter>Header Files</Filter> | ||
| 43 | </ClInclude> | ||
| 44 | </ItemGroup> | ||
| 45 | </Project> \ No newline at end of file | ||
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/WixStdFnUnitTest.vcxproj b/src/ext/Bal/test/WixStdFnUnitTest/WixStdFnUnitTest.vcxproj new file mode 100644 index 00000000..c0be8e11 --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/WixStdFnUnitTest.vcxproj | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-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. --> | ||
| 3 | |||
| 4 | |||
| 5 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 6 | <Import Project="..\..\..\..\internal\WixInternal.TestSupport.Native\build\WixInternal.TestSupport.Native.props" /> | ||
| 7 | |||
| 8 | <ItemGroup Label="ProjectConfigurations"> | ||
| 9 | <ProjectConfiguration Include="Debug|Win32"> | ||
| 10 | <Configuration>Debug</Configuration> | ||
| 11 | <Platform>Win32</Platform> | ||
| 12 | </ProjectConfiguration> | ||
| 13 | <ProjectConfiguration Include="Release|Win32"> | ||
| 14 | <Configuration>Release</Configuration> | ||
| 15 | <Platform>Win32</Platform> | ||
| 16 | </ProjectConfiguration> | ||
| 17 | </ItemGroup> | ||
| 18 | |||
| 19 | <PropertyGroup Label="Globals"> | ||
| 20 | <ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes> | ||
| 21 | <ProjectGuid>{9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}</ProjectGuid> | ||
| 22 | <RootNamespace>UnitTest</RootNamespace> | ||
| 23 | <Keyword>ManagedCProj</Keyword> | ||
| 24 | <ConfigurationType>DynamicLibrary</ConfigurationType> | ||
| 25 | <CharacterSet>Unicode</CharacterSet> | ||
| 26 | <CLRSupport>true</CLRSupport> | ||
| 27 | <SignOutput>false</SignOutput> | ||
| 28 | <IsWixTestProject>true</IsWixTestProject> | ||
| 29 | </PropertyGroup> | ||
| 30 | |||
| 31 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| 32 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| 33 | |||
| 34 | <PropertyGroup> | ||
| 35 | <ProjectAdditionalIncludeDirectories>..\..\..\..\api\burn\inc;..\..\..\..\api\burn\balutil\inc;..\..\wixstdfn\inc;..\..\..\..\libs\dutil\WixToolset.Dutil\inc</ProjectAdditionalIncludeDirectories> | ||
| 36 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;$(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib;$(RootBuildFolder)api\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\balutil.lib</ProjectAdditionalLinkLibraries> | ||
| 37 | </PropertyGroup> | ||
| 38 | |||
| 39 | <ItemGroup> | ||
| 40 | <ClCompile Include="BAFunctionsTests.cpp" /> | ||
| 41 | <ClCompile Include="precomp.cpp"> | ||
| 42 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
| 43 | <!-- Warnings from referencing netstandard dlls --> | ||
| 44 | <DisableSpecificWarnings>4564;4691</DisableSpecificWarnings> | ||
| 45 | </ClCompile> | ||
| 46 | <ClCompile Include="TestBAFunctions.cpp" /> | ||
| 47 | </ItemGroup> | ||
| 48 | |||
| 49 | <ItemGroup> | ||
| 50 | <ClInclude Include="precomp.h" /> | ||
| 51 | <ClInclude Include="TestBAFunctions.h" /> | ||
| 52 | </ItemGroup> | ||
| 53 | |||
| 54 | <ItemGroup> | ||
| 55 | <ProjectReference Include="..\..\wixstdfn\wixstdfn.vcxproj"> | ||
| 56 | <Project>{D786C02F-9488-421F-A5A5-D1D31E8E648B}</Project> | ||
| 57 | </ProjectReference> | ||
| 58 | </ItemGroup> | ||
| 59 | |||
| 60 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| 61 | <Import Project="..\..\..\..\internal\WixInternal.TestSupport.Native\build\WixInternal.TestSupport.Native.targets" /> | ||
| 62 | </Project> | ||
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/precomp.cpp b/src/ext/Bal/test/WixStdFnUnitTest/precomp.cpp new file mode 100644 index 00000000..37664a1c --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/precomp.cpp | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | // 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 | |||
| 3 | #include "precomp.h" | ||
diff --git a/src/ext/Bal/test/WixStdFnUnitTest/precomp.h b/src/ext/Bal/test/WixStdFnUnitTest/precomp.h new file mode 100644 index 00000000..4cdd262c --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/precomp.h | |||
| @@ -0,0 +1,27 @@ | |||
| 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. | ||
| 3 | |||
| 4 | |||
| 5 | #include <windows.h> | ||
| 6 | |||
| 7 | #pragma warning(push) | ||
| 8 | #pragma warning(disable:4458) // declaration of 'xxx' hides class member | ||
| 9 | #include <gdiplus.h> | ||
| 10 | #pragma warning(pop) | ||
| 11 | |||
| 12 | #include <msiquery.h> | ||
| 13 | #include <CommCtrl.h> | ||
| 14 | |||
| 15 | #include <dutil.h> | ||
| 16 | #include <dictutil.h> | ||
| 17 | |||
| 18 | #include <IBootstrapperApplication.h> | ||
| 19 | #include <IBAFunctions.h> | ||
| 20 | #include <balutil.h> | ||
| 21 | #include <balretry.h> | ||
| 22 | |||
| 23 | #include "TestBAFunctions.h" | ||
| 24 | #include "TestBootstrapperApplication.h" | ||
| 25 | |||
| 26 | #pragma managed | ||
| 27 | #include <vcclr.h> | ||
diff --git a/src/ext/Bal/wixprqba/wixprqba.vcxproj b/src/ext/Bal/wixprqba/wixprqba.vcxproj index 8c838fb5..237219b3 100644 --- a/src/ext/Bal/wixprqba/wixprqba.vcxproj +++ b/src/ext/Bal/wixprqba/wixprqba.vcxproj | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | </ImportGroup> | 48 | </ImportGroup> |
| 49 | 49 | ||
| 50 | <PropertyGroup> | 50 | <PropertyGroup> |
| 51 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc</ProjectAdditionalIncludeDirectories> | 51 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc;$(ProjectDir)..\wixstdfn\inc</ProjectAdditionalIncludeDirectories> |
| 52 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;stdbas.res</ProjectAdditionalLinkLibraries> | 52 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;stdbas.res</ProjectAdditionalLinkLibraries> |
| 53 | </PropertyGroup> | 53 | </PropertyGroup> |
| 54 | 54 | ||
diff --git a/src/ext/Bal/wixstdba/wixstdba.vcxproj b/src/ext/Bal/wixstdba/wixstdba.vcxproj index 1f961018..6abb3d4c 100644 --- a/src/ext/Bal/wixstdba/wixstdba.vcxproj +++ b/src/ext/Bal/wixstdba/wixstdba.vcxproj | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | </ImportGroup> | 48 | </ImportGroup> |
| 49 | 49 | ||
| 50 | <PropertyGroup> | 50 | <PropertyGroup> |
| 51 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc</ProjectAdditionalIncludeDirectories> | 51 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc;$(ProjectDir)..\wixstdfn\inc</ProjectAdditionalIncludeDirectories> |
| 52 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;stdbas.res</ProjectAdditionalLinkLibraries> | 52 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;stdbas.res</ProjectAdditionalLinkLibraries> |
| 53 | </PropertyGroup> | 53 | </PropertyGroup> |
| 54 | 54 | ||
diff --git a/src/ext/Bal/wixstdfn/BalBaseBAFunctionsProc.cpp b/src/ext/Bal/wixstdfn/BalBaseBAFunctionsProc.cpp new file mode 100644 index 00000000..38ebf65c --- /dev/null +++ b/src/ext/Bal/wixstdfn/BalBaseBAFunctionsProc.cpp | |||
| @@ -0,0 +1,1099 @@ | |||
| 1 | // 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 | |||
| 3 | #include "precomp.h" | ||
| 4 | |||
| 5 | static HRESULT BalBaseBAFunctionsProcOnDestroy( | ||
| 6 | __in IBAFunctions* pBAFunctions, | ||
| 7 | __in BA_ONDESTROY_ARGS* pArgs, | ||
| 8 | __inout BA_ONDESTROY_RESULTS* /*pResults*/ | ||
| 9 | ) | ||
| 10 | { | ||
| 11 | return pBAFunctions->OnDestroy(pArgs->fReload); | ||
| 12 | } | ||
| 13 | |||
| 14 | static HRESULT BalBaseBAFunctionsProcOnDetectBegin( | ||
| 15 | __in IBAFunctions* pBAFunctions, | ||
| 16 | __in BA_ONDETECTBEGIN_ARGS* pArgs, | ||
| 17 | __inout BA_ONDETECTBEGIN_RESULTS* pResults | ||
| 18 | ) | ||
| 19 | { | ||
| 20 | return pBAFunctions->OnDetectBegin(pArgs->fCached, pArgs->registrationType, pArgs->cPackages, &pResults->fCancel); | ||
| 21 | } | ||
| 22 | |||
| 23 | static HRESULT BalBaseBAFunctionsProcOnDetectComplete( | ||
| 24 | __in IBAFunctions* pBAFunctions, | ||
| 25 | __in BA_ONDETECTCOMPLETE_ARGS* pArgs, | ||
| 26 | __inout BA_ONDETECTCOMPLETE_RESULTS* /*pResults*/ | ||
| 27 | ) | ||
| 28 | { | ||
| 29 | return pBAFunctions->OnDetectComplete(pArgs->hrStatus, pArgs->fEligibleForCleanup); | ||
| 30 | } | ||
| 31 | |||
| 32 | static HRESULT BalBaseBAFunctionsProcOnPlanBegin( | ||
| 33 | __in IBAFunctions* pBAFunctions, | ||
| 34 | __in BA_ONPLANBEGIN_ARGS* pArgs, | ||
| 35 | __inout BA_ONPLANBEGIN_RESULTS* pResults | ||
| 36 | ) | ||
| 37 | { | ||
| 38 | return pBAFunctions->OnPlanBegin(pArgs->cPackages, &pResults->fCancel); | ||
| 39 | } | ||
| 40 | |||
| 41 | static HRESULT BalBaseBAFunctionsProcOnPlanComplete( | ||
| 42 | __in IBAFunctions* pBAFunctions, | ||
| 43 | __in BA_ONPLANCOMPLETE_ARGS* pArgs, | ||
| 44 | __inout BA_ONPLANCOMPLETE_RESULTS* /*pResults*/ | ||
| 45 | ) | ||
| 46 | { | ||
| 47 | return pBAFunctions->OnPlanComplete(pArgs->hrStatus); | ||
| 48 | } | ||
| 49 | |||
| 50 | static HRESULT BalBaseBAFunctionsProcOnStartup( | ||
| 51 | __in IBAFunctions* pBAFunctions, | ||
| 52 | __in BA_ONSTARTUP_ARGS* /*pArgs*/, | ||
| 53 | __inout BA_ONSTARTUP_RESULTS* /*pResults*/ | ||
| 54 | ) | ||
| 55 | { | ||
| 56 | return pBAFunctions->OnStartup(); | ||
| 57 | } | ||
| 58 | |||
| 59 | static HRESULT BalBaseBAFunctionsProcOnShutdown( | ||
| 60 | __in IBAFunctions* pBAFunctions, | ||
| 61 | __in BA_ONSHUTDOWN_ARGS* /*pArgs*/, | ||
| 62 | __inout BA_ONSHUTDOWN_RESULTS* pResults | ||
| 63 | ) | ||
| 64 | { | ||
| 65 | return pBAFunctions->OnShutdown(&pResults->action); | ||
| 66 | } | ||
| 67 | |||
| 68 | static HRESULT BalBaseBAFunctionsProcOnDetectForwardCompatibleBundle( | ||
| 69 | __in IBAFunctions* pBAFunctions, | ||
| 70 | __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, | ||
| 71 | __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults | ||
| 72 | ) | ||
| 73 | { | ||
| 74 | return pBAFunctions->OnDetectForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fMissingFromCache, &pResults->fCancel); | ||
| 75 | } | ||
| 76 | |||
| 77 | static HRESULT BalBaseBAFunctionsProcOnDetectUpdateBegin( | ||
| 78 | __in IBAFunctions* pBAFunctions, | ||
| 79 | __in BA_ONDETECTUPDATEBEGIN_ARGS* pArgs, | ||
| 80 | __inout BA_ONDETECTUPDATEBEGIN_RESULTS* pResults | ||
| 81 | ) | ||
| 82 | { | ||
| 83 | return pBAFunctions->OnDetectUpdateBegin(pArgs->wzUpdateLocation, &pResults->fCancel, &pResults->fSkip); | ||
| 84 | } | ||
| 85 | |||
| 86 | static HRESULT BalBaseBAFunctionsProcOnDetectUpdate( | ||
| 87 | __in IBAFunctions* pBAFunctions, | ||
| 88 | __in BA_ONDETECTUPDATE_ARGS* pArgs, | ||
| 89 | __inout BA_ONDETECTUPDATE_RESULTS* pResults | ||
| 90 | ) | ||
| 91 | { | ||
| 92 | return pBAFunctions->OnDetectUpdate(pArgs->wzUpdateLocation, pArgs->dw64Size, pArgs->wzHash, pArgs->hashAlgorithm, pArgs->wzVersion, pArgs->wzTitle, pArgs->wzSummary, pArgs->wzContentType, pArgs->wzContent, &pResults->fCancel, &pResults->fStopProcessingUpdates); | ||
| 93 | } | ||
| 94 | |||
| 95 | static HRESULT BalBaseBAFunctionsProcOnDetectUpdateComplete( | ||
| 96 | __in IBAFunctions* pBAFunctions, | ||
| 97 | __in BA_ONDETECTUPDATECOMPLETE_ARGS* pArgs, | ||
| 98 | __inout BA_ONDETECTUPDATECOMPLETE_RESULTS* pResults | ||
| 99 | ) | ||
| 100 | { | ||
| 101 | return pBAFunctions->OnDetectUpdateComplete(pArgs->hrStatus, &pResults->fIgnoreError); | ||
| 102 | } | ||
| 103 | |||
| 104 | static HRESULT BalBaseBAFunctionsProcOnDetectRelatedBundle( | ||
| 105 | __in IBAFunctions* pBAFunctions, | ||
| 106 | __in BA_ONDETECTRELATEDBUNDLE_ARGS* pArgs, | ||
| 107 | __inout BA_ONDETECTRELATEDBUNDLE_RESULTS* pResults | ||
| 108 | ) | ||
| 109 | { | ||
| 110 | return pBAFunctions->OnDetectRelatedBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fMissingFromCache, &pResults->fCancel); | ||
| 111 | } | ||
| 112 | |||
| 113 | static HRESULT BalBaseBAFunctionsProcOnDetectPackageBegin( | ||
| 114 | __in IBAFunctions* pBAFunctions, | ||
| 115 | __in BA_ONDETECTPACKAGEBEGIN_ARGS* pArgs, | ||
| 116 | __inout BA_ONDETECTPACKAGEBEGIN_RESULTS* pResults | ||
| 117 | ) | ||
| 118 | { | ||
| 119 | return pBAFunctions->OnDetectPackageBegin(pArgs->wzPackageId, &pResults->fCancel); | ||
| 120 | } | ||
| 121 | |||
| 122 | static HRESULT BalBaseBAFunctionsProcOnDetectCompatiblePackage( | ||
| 123 | __in IBAFunctions* pBAFunctions, | ||
| 124 | __in BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS* pArgs, | ||
| 125 | __inout BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS* pResults | ||
| 126 | ) | ||
| 127 | { | ||
| 128 | return pBAFunctions->OnDetectCompatibleMsiPackage(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->wzCompatiblePackageVersion, &pResults->fCancel); | ||
| 129 | } | ||
| 130 | |||
| 131 | static HRESULT BalBaseBAFunctionsProcOnDetectRelatedMsiPackage( | ||
| 132 | __in IBAFunctions* pBAFunctions, | ||
| 133 | __in BA_ONDETECTRELATEDMSIPACKAGE_ARGS* pArgs, | ||
| 134 | __inout BA_ONDETECTRELATEDMSIPACKAGE_RESULTS* pResults | ||
| 135 | ) | ||
| 136 | { | ||
| 137 | return pBAFunctions->OnDetectRelatedMsiPackage(pArgs->wzPackageId, pArgs->wzUpgradeCode, pArgs->wzProductCode, pArgs->fPerMachine, pArgs->wzVersion, pArgs->operation, &pResults->fCancel); | ||
| 138 | } | ||
| 139 | |||
| 140 | static HRESULT BalBaseBAFunctionsProcOnDetectPatchTarget( | ||
| 141 | __in IBAFunctions* pBAFunctions, | ||
| 142 | __in BA_ONDETECTPATCHTARGET_ARGS* pArgs, | ||
| 143 | __inout BA_ONDETECTPATCHTARGET_RESULTS* pResults | ||
| 144 | ) | ||
| 145 | { | ||
| 146 | return pBAFunctions->OnDetectPatchTarget(pArgs->wzPackageId, pArgs->wzProductCode, pArgs->patchState, &pResults->fCancel); | ||
| 147 | } | ||
| 148 | |||
| 149 | static HRESULT BalBaseBAFunctionsProcOnDetectMsiFeature( | ||
| 150 | __in IBAFunctions* pBAFunctions, | ||
| 151 | __in BA_ONDETECTMSIFEATURE_ARGS* pArgs, | ||
| 152 | __inout BA_ONDETECTMSIFEATURE_RESULTS* pResults | ||
| 153 | ) | ||
| 154 | { | ||
| 155 | return pBAFunctions->OnDetectMsiFeature(pArgs->wzPackageId, pArgs->wzFeatureId, pArgs->state, &pResults->fCancel); | ||
| 156 | } | ||
| 157 | |||
| 158 | static HRESULT BalBaseBAFunctionsProcOnDetectPackageComplete( | ||
| 159 | __in IBAFunctions* pBAFunctions, | ||
| 160 | __in BA_ONDETECTPACKAGECOMPLETE_ARGS* pArgs, | ||
| 161 | __inout BA_ONDETECTPACKAGECOMPLETE_RESULTS* /*pResults*/ | ||
| 162 | ) | ||
| 163 | { | ||
| 164 | return pBAFunctions->OnDetectPackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->state, pArgs->fCached); | ||
| 165 | } | ||
| 166 | |||
| 167 | static HRESULT BalBaseBAFunctionsProcOnPlanRelatedBundle( | ||
| 168 | __in IBAFunctions* pBAFunctions, | ||
| 169 | __in BA_ONPLANRELATEDBUNDLE_ARGS* pArgs, | ||
| 170 | __inout BA_ONPLANRELATEDBUNDLE_RESULTS* pResults | ||
| 171 | ) | ||
| 172 | { | ||
| 173 | return pBAFunctions->OnPlanRelatedBundle(pArgs->wzBundleId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); | ||
| 174 | } | ||
| 175 | |||
| 176 | static HRESULT BalBaseBAFunctionsProcOnPlanRollbackBoundary( | ||
| 177 | __in IBAFunctions* pBAFunctions, | ||
| 178 | __in BA_ONPLANROLLBACKBOUNDARY_ARGS* pArgs, | ||
| 179 | __inout BA_ONPLANROLLBACKBOUNDARY_RESULTS* pResults | ||
| 180 | ) | ||
| 181 | { | ||
| 182 | return pBAFunctions->OnPlanRollbackBoundary(pArgs->wzRollbackBoundaryId, pArgs->fRecommendedTransaction, &pResults->fTransaction, &pResults->fCancel); | ||
| 183 | } | ||
| 184 | |||
| 185 | static HRESULT BalBaseBAFunctionsProcOnPlanPackageBegin( | ||
| 186 | __in IBAFunctions* pBAFunctions, | ||
| 187 | __in BA_ONPLANPACKAGEBEGIN_ARGS* pArgs, | ||
| 188 | __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults | ||
| 189 | ) | ||
| 190 | { | ||
| 191 | return pBAFunctions->OnPlanPackageBegin(pArgs->wzPackageId, pArgs->state, pArgs->fCached, pArgs->installCondition, pArgs->repairCondition, pArgs->recommendedState, pArgs->recommendedCacheType, &pResults->requestedState, &pResults->requestedCacheType, &pResults->fCancel); | ||
| 192 | } | ||
| 193 | |||
| 194 | static HRESULT BalBaseBAFunctionsProcOnPlanCompatibleMsiPackageBegin( | ||
| 195 | __in IBAFunctions* pBAFunctions, | ||
| 196 | __in BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS* pArgs, | ||
| 197 | __inout BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS* pResults | ||
| 198 | ) | ||
| 199 | { | ||
| 200 | return pBAFunctions->OnPlanCompatibleMsiPackageBegin(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->wzCompatiblePackageVersion, pArgs->fRecommendedRemove, &pResults->fRequestRemove, &pResults->fCancel); | ||
| 201 | } | ||
| 202 | |||
| 203 | static HRESULT BalBaseBAFunctionsProcOnPlanCompatibleMsiPackageComplete( | ||
| 204 | __in IBAFunctions* pBAFunctions, | ||
| 205 | __in BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS* pArgs, | ||
| 206 | __inout BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS* /*pResults*/ | ||
| 207 | ) | ||
| 208 | { | ||
| 209 | return pBAFunctions->OnPlanCompatibleMsiPackageComplete(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->hrStatus, pArgs->fRequestedRemove); | ||
| 210 | } | ||
| 211 | |||
| 212 | static HRESULT BalBaseBAFunctionsProcOnPlanPatchTarget( | ||
| 213 | __in IBAFunctions* pBAFunctions, | ||
| 214 | __in BA_ONPLANPATCHTARGET_ARGS* pArgs, | ||
| 215 | __inout BA_ONPLANPATCHTARGET_RESULTS* pResults | ||
| 216 | ) | ||
| 217 | { | ||
| 218 | return pBAFunctions->OnPlanPatchTarget(pArgs->wzPackageId, pArgs->wzProductCode, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); | ||
| 219 | } | ||
| 220 | |||
| 221 | static HRESULT BalBaseBAFunctionsProcOnPlanMsiFeature( | ||
| 222 | __in IBAFunctions* pBAFunctions, | ||
| 223 | __in BA_ONPLANMSIFEATURE_ARGS* pArgs, | ||
| 224 | __inout BA_ONPLANMSIFEATURE_RESULTS* pResults | ||
| 225 | ) | ||
| 226 | { | ||
| 227 | return pBAFunctions->OnPlanMsiFeature(pArgs->wzPackageId, pArgs->wzFeatureId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); | ||
| 228 | } | ||
| 229 | |||
| 230 | static HRESULT BalBaseBAFunctionsProcOnPlanPackageComplete( | ||
| 231 | __in IBAFunctions* pBAFunctions, | ||
| 232 | __in BA_ONPLANPACKAGECOMPLETE_ARGS* pArgs, | ||
| 233 | __inout BA_ONPLANPACKAGECOMPLETE_RESULTS* /*pResults*/ | ||
| 234 | ) | ||
| 235 | { | ||
| 236 | return pBAFunctions->OnPlanPackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->requested); | ||
| 237 | } | ||
| 238 | |||
| 239 | static HRESULT BalBaseBAFunctionsProcOnPlannedCompatiblePackage( | ||
| 240 | __in IBAFunctions* pBAFunctions, | ||
| 241 | __in BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS* pArgs, | ||
| 242 | __inout BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS* /*pResults*/ | ||
| 243 | ) | ||
| 244 | { | ||
| 245 | return pBAFunctions->OnPlannedCompatiblePackage(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->fRemove); | ||
| 246 | } | ||
| 247 | |||
| 248 | static HRESULT BalBaseBAFunctionsProcOnPlannedPackage( | ||
| 249 | __in IBAFunctions* pBAFunctions, | ||
| 250 | __in BA_ONPLANNEDPACKAGE_ARGS* pArgs, | ||
| 251 | __inout BA_ONPLANNEDPACKAGE_RESULTS* /*pResults*/ | ||
| 252 | ) | ||
| 253 | { | ||
| 254 | return pBAFunctions->OnPlannedPackage(pArgs->wzPackageId, pArgs->execute, pArgs->rollback, pArgs->fPlannedCache, pArgs->fPlannedUncache); | ||
| 255 | } | ||
| 256 | |||
| 257 | static HRESULT BalBaseBAFunctionsProcOnApplyBegin( | ||
| 258 | __in IBAFunctions* pBAFunctions, | ||
| 259 | __in BA_ONAPPLYBEGIN_ARGS* pArgs, | ||
| 260 | __inout BA_ONAPPLYBEGIN_RESULTS* pResults | ||
| 261 | ) | ||
| 262 | { | ||
| 263 | return pBAFunctions->OnApplyBegin(pArgs->dwPhaseCount, &pResults->fCancel); | ||
| 264 | } | ||
| 265 | |||
| 266 | static HRESULT BalBaseBAFunctionsProcOnElevateBegin( | ||
| 267 | __in IBAFunctions* pBAFunctions, | ||
| 268 | __in BA_ONELEVATEBEGIN_ARGS* /*pArgs*/, | ||
| 269 | __inout BA_ONELEVATEBEGIN_RESULTS* pResults | ||
| 270 | ) | ||
| 271 | { | ||
| 272 | return pBAFunctions->OnElevateBegin(&pResults->fCancel); | ||
| 273 | } | ||
| 274 | |||
| 275 | static HRESULT BalBaseBAFunctionsProcOnElevateComplete( | ||
| 276 | __in IBAFunctions* pBAFunctions, | ||
| 277 | __in BA_ONELEVATECOMPLETE_ARGS* pArgs, | ||
| 278 | __inout BA_ONELEVATECOMPLETE_RESULTS* /*pResults*/ | ||
| 279 | ) | ||
| 280 | { | ||
| 281 | return pBAFunctions->OnElevateComplete(pArgs->hrStatus); | ||
| 282 | } | ||
| 283 | |||
| 284 | static HRESULT BalBaseBAFunctionsProcOnProgress( | ||
| 285 | __in IBAFunctions* pBAFunctions, | ||
| 286 | __in BA_ONPROGRESS_ARGS* pArgs, | ||
| 287 | __inout BA_ONPROGRESS_RESULTS* pResults | ||
| 288 | ) | ||
| 289 | { | ||
| 290 | return pBAFunctions->OnProgress(pArgs->dwProgressPercentage, pArgs->dwOverallPercentage, &pResults->fCancel); | ||
| 291 | } | ||
| 292 | |||
| 293 | static HRESULT BalBaseBAFunctionsProcOnError( | ||
| 294 | __in IBAFunctions* pBAFunctions, | ||
| 295 | __in BA_ONERROR_ARGS* pArgs, | ||
| 296 | __inout BA_ONERROR_RESULTS* pResults | ||
| 297 | ) | ||
| 298 | { | ||
| 299 | return pBAFunctions->OnError(pArgs->errorType, pArgs->wzPackageId, pArgs->dwCode, pArgs->wzError, pArgs->dwUIHint, pArgs->cData, pArgs->rgwzData, pArgs->nRecommendation, &pResults->nResult); | ||
| 300 | } | ||
| 301 | |||
| 302 | static HRESULT BalBaseBAFunctionsProcOnRegisterBegin( | ||
| 303 | __in IBAFunctions* pBAFunctions, | ||
| 304 | __in BA_ONREGISTERBEGIN_ARGS* pArgs, | ||
| 305 | __inout BA_ONREGISTERBEGIN_RESULTS* pResults | ||
| 306 | ) | ||
| 307 | { | ||
| 308 | return pBAFunctions->OnRegisterBegin(pArgs->recommendedRegistrationType, &pResults->fCancel, &pResults->registrationType); | ||
| 309 | } | ||
| 310 | |||
| 311 | static HRESULT BalBaseBAFunctionsProcOnRegisterComplete( | ||
| 312 | __in IBAFunctions* pBAFunctions, | ||
| 313 | __in BA_ONREGISTERCOMPLETE_ARGS* pArgs, | ||
| 314 | __inout BA_ONREGISTERCOMPLETE_RESULTS* /*pResults*/ | ||
| 315 | ) | ||
| 316 | { | ||
| 317 | return pBAFunctions->OnRegisterComplete(pArgs->hrStatus); | ||
| 318 | } | ||
| 319 | |||
| 320 | static HRESULT BalBaseBAFunctionsProcOnCacheBegin( | ||
| 321 | __in IBAFunctions* pBAFunctions, | ||
| 322 | __in BA_ONCACHEBEGIN_ARGS* /*pArgs*/, | ||
| 323 | __inout BA_ONCACHEBEGIN_RESULTS* pResults | ||
| 324 | ) | ||
| 325 | { | ||
| 326 | return pBAFunctions->OnCacheBegin(&pResults->fCancel); | ||
| 327 | } | ||
| 328 | |||
| 329 | static HRESULT BalBaseBAFunctionsProcOnCachePackageBegin( | ||
| 330 | __in IBAFunctions* pBAFunctions, | ||
| 331 | __in BA_ONCACHEPACKAGEBEGIN_ARGS* pArgs, | ||
| 332 | __inout BA_ONCACHEPACKAGEBEGIN_RESULTS* pResults | ||
| 333 | ) | ||
| 334 | { | ||
| 335 | return pBAFunctions->OnCachePackageBegin(pArgs->wzPackageId, pArgs->cCachePayloads, pArgs->dw64PackageCacheSize, pArgs->fVital, &pResults->fCancel); | ||
| 336 | } | ||
| 337 | |||
| 338 | static HRESULT BalBaseBAFunctionsProcOnCacheAcquireBegin( | ||
| 339 | __in IBAFunctions* pBAFunctions, | ||
| 340 | __in BA_ONCACHEACQUIREBEGIN_ARGS* pArgs, | ||
| 341 | __inout BA_ONCACHEACQUIREBEGIN_RESULTS* pResults | ||
| 342 | ) | ||
| 343 | { | ||
| 344 | return pBAFunctions->OnCacheAcquireBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->wzSource, pArgs->wzDownloadUrl, pArgs->wzPayloadContainerId, pArgs->recommendation, &pResults->action, &pResults->fCancel); | ||
| 345 | } | ||
| 346 | |||
| 347 | static HRESULT BalBaseBAFunctionsProcOnCacheAcquireProgress( | ||
| 348 | __in IBAFunctions* pBAFunctions, | ||
| 349 | __in BA_ONCACHEACQUIREPROGRESS_ARGS* pArgs, | ||
| 350 | __inout BA_ONCACHEACQUIREPROGRESS_RESULTS* pResults | ||
| 351 | ) | ||
| 352 | { | ||
| 353 | return pBAFunctions->OnCacheAcquireProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); | ||
| 354 | } | ||
| 355 | |||
| 356 | static HRESULT BalBaseBAFunctionsProcOnCacheAcquireResolving( | ||
| 357 | __in IBAFunctions* pBAFunctions, | ||
| 358 | __in BA_ONCACHEACQUIRERESOLVING_ARGS* pArgs, | ||
| 359 | __inout BA_ONCACHEACQUIRERESOLVING_RESULTS* pResults | ||
| 360 | ) | ||
| 361 | { | ||
| 362 | return pBAFunctions->OnCacheAcquireResolving(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->rgSearchPaths, pArgs->cSearchPaths, pArgs->fFoundLocal, pArgs->dwRecommendedSearchPath, pArgs->wzDownloadUrl, pArgs->wzPayloadContainerId, pArgs->recommendation, &pResults->dwChosenSearchPath, &pResults->action, &pResults->fCancel); | ||
| 363 | } | ||
| 364 | |||
| 365 | static HRESULT BalBaseBAFunctionsProcOnCacheAcquireComplete( | ||
| 366 | __in IBAFunctions* pBAFunctions, | ||
| 367 | __in BA_ONCACHEACQUIRECOMPLETE_ARGS* pArgs, | ||
| 368 | __inout BA_ONCACHEACQUIRECOMPLETE_RESULTS* pResults | ||
| 369 | ) | ||
| 370 | { | ||
| 371 | return pBAFunctions->OnCacheAcquireComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); | ||
| 372 | } | ||
| 373 | |||
| 374 | static HRESULT BalBaseBAFunctionsProcOnCacheVerifyBegin( | ||
| 375 | __in IBAFunctions* pBAFunctions, | ||
| 376 | __in BA_ONCACHEVERIFYBEGIN_ARGS* pArgs, | ||
| 377 | __inout BA_ONCACHEVERIFYBEGIN_RESULTS* pResults | ||
| 378 | ) | ||
| 379 | { | ||
| 380 | return pBAFunctions->OnCacheVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel); | ||
| 381 | } | ||
| 382 | |||
| 383 | static HRESULT BalBaseBAFunctionsProcOnCacheVerifyProgress( | ||
| 384 | __in IBAFunctions* pBAFunctions, | ||
| 385 | __in BA_ONCACHEVERIFYPROGRESS_ARGS* pArgs, | ||
| 386 | __inout BA_ONCACHEVERIFYPROGRESS_RESULTS* pResults | ||
| 387 | ) | ||
| 388 | { | ||
| 389 | return pBAFunctions->OnCacheVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, pArgs->verifyStep, &pResults->fCancel); | ||
| 390 | } | ||
| 391 | |||
| 392 | static HRESULT BalBaseBAFunctionsProcOnCacheVerifyComplete( | ||
| 393 | __in IBAFunctions* pBAFunctions, | ||
| 394 | __in BA_ONCACHEVERIFYCOMPLETE_ARGS* pArgs, | ||
| 395 | __inout BA_ONCACHEVERIFYCOMPLETE_RESULTS* pResults | ||
| 396 | ) | ||
| 397 | { | ||
| 398 | return pBAFunctions->OnCacheVerifyComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); | ||
| 399 | } | ||
| 400 | |||
| 401 | static HRESULT BalBaseBAFunctionsProcOnCachePackageComplete( | ||
| 402 | __in IBAFunctions* pBAFunctions, | ||
| 403 | __in BA_ONCACHEPACKAGECOMPLETE_ARGS* pArgs, | ||
| 404 | __inout BA_ONCACHEPACKAGECOMPLETE_RESULTS* pResults | ||
| 405 | ) | ||
| 406 | { | ||
| 407 | return pBAFunctions->OnCachePackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); | ||
| 408 | } | ||
| 409 | |||
| 410 | static HRESULT BalBaseBAFunctionsProcOnCacheComplete( | ||
| 411 | __in IBAFunctions* pBAFunctions, | ||
| 412 | __in BA_ONCACHECOMPLETE_ARGS* pArgs, | ||
| 413 | __inout BA_ONCACHECOMPLETE_RESULTS* /*pResults*/ | ||
| 414 | ) | ||
| 415 | { | ||
| 416 | return pBAFunctions->OnCacheComplete(pArgs->hrStatus); | ||
| 417 | } | ||
| 418 | |||
| 419 | static HRESULT BalBaseBAFunctionsProcOnExecuteBegin( | ||
| 420 | __in IBAFunctions* pBAFunctions, | ||
| 421 | __in BA_ONEXECUTEBEGIN_ARGS* pArgs, | ||
| 422 | __inout BA_ONEXECUTEBEGIN_RESULTS* pResults | ||
| 423 | ) | ||
| 424 | { | ||
| 425 | return pBAFunctions->OnExecuteBegin(pArgs->cExecutingPackages, &pResults->fCancel); | ||
| 426 | } | ||
| 427 | |||
| 428 | static HRESULT BalBaseBAFunctionsProcOnExecutePackageBegin( | ||
| 429 | __in IBAFunctions* pBAFunctions, | ||
| 430 | __in BA_ONEXECUTEPACKAGEBEGIN_ARGS* pArgs, | ||
| 431 | __inout BA_ONEXECUTEPACKAGEBEGIN_RESULTS* pResults | ||
| 432 | ) | ||
| 433 | { | ||
| 434 | return pBAFunctions->OnExecutePackageBegin(pArgs->wzPackageId, pArgs->fExecute, pArgs->action, pArgs->uiLevel, pArgs->fDisableExternalUiHandler, &pResults->fCancel); | ||
| 435 | } | ||
| 436 | |||
| 437 | static HRESULT BalBaseBAFunctionsProcOnExecutePatchTarget( | ||
| 438 | __in IBAFunctions* pBAFunctions, | ||
| 439 | __in BA_ONEXECUTEPATCHTARGET_ARGS* pArgs, | ||
| 440 | __inout BA_ONEXECUTEPATCHTARGET_RESULTS* pResults | ||
| 441 | ) | ||
| 442 | { | ||
| 443 | return pBAFunctions->OnExecutePatchTarget(pArgs->wzPackageId, pArgs->wzTargetProductCode, &pResults->fCancel); | ||
| 444 | } | ||
| 445 | |||
| 446 | static HRESULT BalBaseBAFunctionsProcOnExecuteProgress( | ||
| 447 | __in IBAFunctions* pBAFunctions, | ||
| 448 | __in BA_ONEXECUTEPROGRESS_ARGS* pArgs, | ||
| 449 | __inout BA_ONEXECUTEPROGRESS_RESULTS* pResults | ||
| 450 | ) | ||
| 451 | { | ||
| 452 | return pBAFunctions->OnExecuteProgress(pArgs->wzPackageId, pArgs->dwProgressPercentage, pArgs->dwOverallPercentage, &pResults->fCancel); | ||
| 453 | } | ||
| 454 | |||
| 455 | static HRESULT BalBaseBAFunctionsProcOnExecuteMsiMessage( | ||
| 456 | __in IBAFunctions* pBAFunctions, | ||
| 457 | __in BA_ONEXECUTEMSIMESSAGE_ARGS* pArgs, | ||
| 458 | __inout BA_ONEXECUTEMSIMESSAGE_RESULTS* pResults | ||
| 459 | ) | ||
| 460 | { | ||
| 461 | return pBAFunctions->OnExecuteMsiMessage(pArgs->wzPackageId, pArgs->messageType, pArgs->dwUIHint, pArgs->wzMessage, pArgs->cData, pArgs->rgwzData, pArgs->nRecommendation, &pResults->nResult); | ||
| 462 | } | ||
| 463 | |||
| 464 | static HRESULT BalBaseBAFunctionsProcOnExecuteFilesInUse( | ||
| 465 | __in IBAFunctions* pBAFunctions, | ||
| 466 | __in BA_ONEXECUTEFILESINUSE_ARGS* pArgs, | ||
| 467 | __inout BA_ONEXECUTEFILESINUSE_RESULTS* pResults | ||
| 468 | ) | ||
| 469 | { | ||
| 470 | return pBAFunctions->OnExecuteFilesInUse(pArgs->wzPackageId, pArgs->cFiles, pArgs->rgwzFiles, pArgs->nRecommendation, pArgs->source, &pResults->nResult); | ||
| 471 | } | ||
| 472 | |||
| 473 | static HRESULT BalBaseBAFunctionsProcOnExecutePackageComplete( | ||
| 474 | __in IBAFunctions* pBAFunctions, | ||
| 475 | __in BA_ONEXECUTEPACKAGECOMPLETE_ARGS* pArgs, | ||
| 476 | __inout BA_ONEXECUTEPACKAGECOMPLETE_RESULTS* pResults | ||
| 477 | ) | ||
| 478 | { | ||
| 479 | return pBAFunctions->OnExecutePackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); | ||
| 480 | } | ||
| 481 | |||
| 482 | static HRESULT BalBaseBAFunctionsProcOnExecuteProcessCancel( | ||
| 483 | __in IBAFunctions* pBAFunctions, | ||
| 484 | __in BA_ONEXECUTEPROCESSCANCEL_ARGS* pArgs, | ||
| 485 | __inout BA_ONEXECUTEPROCESSCANCEL_RESULTS* pResults | ||
| 486 | ) | ||
| 487 | { | ||
| 488 | return pBAFunctions->OnExecuteProcessCancel(pArgs->wzPackageId, pArgs->dwProcessId, pArgs->recommendation, &pResults->action); | ||
| 489 | } | ||
| 490 | |||
| 491 | static HRESULT BalBaseBAFunctionsProcOnExecuteComplete( | ||
| 492 | __in IBAFunctions* pBAFunctions, | ||
| 493 | __in BA_ONEXECUTECOMPLETE_ARGS* pArgs, | ||
| 494 | __inout BA_ONEXECUTECOMPLETE_RESULTS* /*pResults*/ | ||
| 495 | ) | ||
| 496 | { | ||
| 497 | return pBAFunctions->OnExecuteComplete(pArgs->hrStatus); | ||
| 498 | } | ||
| 499 | |||
| 500 | static HRESULT BalBaseBAFunctionsProcOnUnregisterBegin( | ||
| 501 | __in IBAFunctions* pBAFunctions, | ||
| 502 | __in BA_ONUNREGISTERBEGIN_ARGS* pArgs, | ||
| 503 | __inout BA_ONUNREGISTERBEGIN_RESULTS* pResults | ||
| 504 | ) | ||
| 505 | { | ||
| 506 | return pBAFunctions->OnUnregisterBegin(pArgs->recommendedRegistrationType, &pResults->registrationType); | ||
| 507 | } | ||
| 508 | |||
| 509 | static HRESULT BalBaseBAFunctionsProcOnUnregisterComplete( | ||
| 510 | __in IBAFunctions* pBAFunctions, | ||
| 511 | __in BA_ONUNREGISTERCOMPLETE_ARGS* pArgs, | ||
| 512 | __inout BA_ONUNREGISTERCOMPLETE_RESULTS* /*pResults*/ | ||
| 513 | ) | ||
| 514 | { | ||
| 515 | return pBAFunctions->OnUnregisterComplete(pArgs->hrStatus); | ||
| 516 | } | ||
| 517 | |||
| 518 | static HRESULT BalBaseBAFunctionsProcOnApplyComplete( | ||
| 519 | __in IBAFunctions* pBAFunctions, | ||
| 520 | __in BA_ONAPPLYCOMPLETE_ARGS* pArgs, | ||
| 521 | __inout BA_ONAPPLYCOMPLETE_RESULTS* pResults | ||
| 522 | ) | ||
| 523 | { | ||
| 524 | return pBAFunctions->OnApplyComplete(pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); | ||
| 525 | } | ||
| 526 | |||
| 527 | static HRESULT BalBaseBAFunctionsProcOnLaunchApprovedExeBegin( | ||
| 528 | __in IBAFunctions* pBAFunctions, | ||
| 529 | __in BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS* /*pArgs*/, | ||
| 530 | __inout BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS* pResults | ||
| 531 | ) | ||
| 532 | { | ||
| 533 | return pBAFunctions->OnLaunchApprovedExeBegin(&pResults->fCancel); | ||
| 534 | } | ||
| 535 | |||
| 536 | static HRESULT BalBaseBAFunctionsProcOnLaunchApprovedExeComplete( | ||
| 537 | __in IBAFunctions* pBAFunctions, | ||
| 538 | __in BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS* pArgs, | ||
| 539 | __inout BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS* /*pResults*/ | ||
| 540 | ) | ||
| 541 | { | ||
| 542 | return pBAFunctions->OnLaunchApprovedExeComplete(pArgs->hrStatus, pArgs->dwProcessId); | ||
| 543 | } | ||
| 544 | |||
| 545 | static HRESULT BalBaseBAFunctionsProcOnPlanMsiPackage( | ||
| 546 | __in IBAFunctions* pBAFunctions, | ||
| 547 | __in BA_ONPLANMSIPACKAGE_ARGS* pArgs, | ||
| 548 | __inout BA_ONPLANMSIPACKAGE_RESULTS* pResults | ||
| 549 | ) | ||
| 550 | { | ||
| 551 | return pBAFunctions->OnPlanMsiPackage(pArgs->wzPackageId, pArgs->fExecute, pArgs->action, pArgs->recommendedFileVersioning, &pResults->fCancel, &pResults->actionMsiProperty, &pResults->uiLevel, &pResults->fDisableExternalUiHandler, &pResults->fileVersioning); | ||
| 552 | } | ||
| 553 | |||
| 554 | static HRESULT BalBaseBAFunctionsProcOnBeginMsiTransactionBegin( | ||
| 555 | __in IBAFunctions* pBAFunctions, | ||
| 556 | __in BA_ONBEGINMSITRANSACTIONBEGIN_ARGS* pArgs, | ||
| 557 | __inout BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS* pResults | ||
| 558 | ) | ||
| 559 | { | ||
| 560 | return pBAFunctions->OnBeginMsiTransactionBegin(pArgs->wzTransactionId, &pResults->fCancel); | ||
| 561 | } | ||
| 562 | |||
| 563 | static HRESULT BalBaseBAFunctionsProcOnBeginMsiTransactionComplete( | ||
| 564 | __in IBAFunctions* pBAFunctions, | ||
| 565 | __in BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS* pArgs, | ||
| 566 | __inout BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS* /*pResults*/ | ||
| 567 | ) | ||
| 568 | { | ||
| 569 | return pBAFunctions->OnBeginMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus); | ||
| 570 | } | ||
| 571 | |||
| 572 | static HRESULT BalBaseBAFunctionsProcOnCommitMsiTransactionBegin( | ||
| 573 | __in IBAFunctions* pBAFunctions, | ||
| 574 | __in BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS* pArgs, | ||
| 575 | __inout BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS* pResults | ||
| 576 | ) | ||
| 577 | { | ||
| 578 | return pBAFunctions->OnCommitMsiTransactionBegin(pArgs->wzTransactionId, &pResults->fCancel); | ||
| 579 | } | ||
| 580 | |||
| 581 | static HRESULT BalBaseBAFunctionsProcOnCommitMsiTransactionComplete( | ||
| 582 | __in IBAFunctions* pBAFunctions, | ||
| 583 | __in BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS* pArgs, | ||
| 584 | __inout BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS* pResults | ||
| 585 | ) | ||
| 586 | { | ||
| 587 | return pBAFunctions->OnCommitMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); | ||
| 588 | } | ||
| 589 | |||
| 590 | static HRESULT BalBaseBAFunctionsProcOnRollbackMsiTransactionBegin( | ||
| 591 | __in IBAFunctions* pBAFunctions, | ||
| 592 | __in BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS* pArgs, | ||
| 593 | __inout BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS* /*pResults*/ | ||
| 594 | ) | ||
| 595 | { | ||
| 596 | return pBAFunctions->OnRollbackMsiTransactionBegin(pArgs->wzTransactionId); | ||
| 597 | } | ||
| 598 | |||
| 599 | static HRESULT BalBaseBAFunctionsProcOnRollbackMsiTransactionComplete( | ||
| 600 | __in IBAFunctions* pBAFunctions, | ||
| 601 | __in BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS* pArgs, | ||
| 602 | __inout BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS* pResults | ||
| 603 | ) | ||
| 604 | { | ||
| 605 | return pBAFunctions->OnRollbackMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); | ||
| 606 | } | ||
| 607 | |||
| 608 | static HRESULT BalBaseBAFunctionsProcOnPauseAutomaticUpdatesBegin( | ||
| 609 | __in IBAFunctions* pBAFunctions, | ||
| 610 | __in BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS* /*pArgs*/, | ||
| 611 | __inout BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS* /*pResults*/ | ||
| 612 | ) | ||
| 613 | { | ||
| 614 | return pBAFunctions->OnPauseAutomaticUpdatesBegin(); | ||
| 615 | } | ||
| 616 | |||
| 617 | static HRESULT BalBaseBAFunctionsProcOnPauseAutomaticUpdatesComplete( | ||
| 618 | __in IBAFunctions* pBAFunctions, | ||
| 619 | __in BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS* pArgs, | ||
| 620 | __inout BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS* /*pResults*/ | ||
| 621 | ) | ||
| 622 | { | ||
| 623 | return pBAFunctions->OnPauseAutomaticUpdatesComplete(pArgs->hrStatus); | ||
| 624 | } | ||
| 625 | |||
| 626 | static HRESULT BalBaseBAFunctionsProcOnSystemRestorePointBegin( | ||
| 627 | __in IBAFunctions* pBAFunctions, | ||
| 628 | __in BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS* /*pArgs*/, | ||
| 629 | __inout BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS* /*pResults*/ | ||
| 630 | ) | ||
| 631 | { | ||
| 632 | return pBAFunctions->OnSystemRestorePointBegin(); | ||
| 633 | } | ||
| 634 | |||
| 635 | static HRESULT BalBaseBAFunctionsProcOnSystemRestorePointComplete( | ||
| 636 | __in IBAFunctions* pBAFunctions, | ||
| 637 | __in BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS* pArgs, | ||
| 638 | __inout BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS* /*pResults*/ | ||
| 639 | ) | ||
| 640 | { | ||
| 641 | return pBAFunctions->OnSystemRestorePointComplete(pArgs->hrStatus); | ||
| 642 | } | ||
| 643 | |||
| 644 | static HRESULT BalBaseBAFunctionsProcOnPlanForwardCompatibleBundle( | ||
| 645 | __in IBAFunctions* pBAFunctions, | ||
| 646 | __in BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, | ||
| 647 | __inout BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults | ||
| 648 | ) | ||
| 649 | { | ||
| 650 | return pBAFunctions->OnPlanForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fRecommendedIgnoreBundle, &pResults->fCancel, &pResults->fIgnoreBundle); | ||
| 651 | } | ||
| 652 | |||
| 653 | static HRESULT BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyBegin( | ||
| 654 | __in IBAFunctions* pBAFunctions, | ||
| 655 | __in BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS* pArgs, | ||
| 656 | __inout BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS* pResults | ||
| 657 | ) | ||
| 658 | { | ||
| 659 | return pBAFunctions->OnCacheContainerOrPayloadVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel); | ||
| 660 | } | ||
| 661 | |||
| 662 | static HRESULT BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyProgress( | ||
| 663 | __in IBAFunctions* pBAFunctions, | ||
| 664 | __in BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS* pArgs, | ||
| 665 | __inout BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS* pResults | ||
| 666 | ) | ||
| 667 | { | ||
| 668 | return pBAFunctions->OnCacheContainerOrPayloadVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); | ||
| 669 | } | ||
| 670 | |||
| 671 | static HRESULT BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyComplete( | ||
| 672 | __in IBAFunctions* pBAFunctions, | ||
| 673 | __in BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS* pArgs, | ||
| 674 | __inout BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS* /*pResults*/ | ||
| 675 | ) | ||
| 676 | { | ||
| 677 | return pBAFunctions->OnCacheContainerOrPayloadVerifyComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus); | ||
| 678 | } | ||
| 679 | |||
| 680 | static HRESULT BalBaseBAFunctionsProcOnCachePayloadExtractBegin( | ||
| 681 | __in IBAFunctions* pBAFunctions, | ||
| 682 | __in BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS* pArgs, | ||
| 683 | __inout BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS* pResults | ||
| 684 | ) | ||
| 685 | { | ||
| 686 | return pBAFunctions->OnCachePayloadExtractBegin(pArgs->wzContainerId, pArgs->wzPayloadId, &pResults->fCancel); | ||
| 687 | } | ||
| 688 | |||
| 689 | static HRESULT BalBaseBAFunctionsProcOnCachePayloadExtractProgress( | ||
| 690 | __in IBAFunctions* pBAFunctions, | ||
| 691 | __in BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS* pArgs, | ||
| 692 | __inout BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS* pResults | ||
| 693 | ) | ||
| 694 | { | ||
| 695 | return pBAFunctions->OnCachePayloadExtractProgress(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); | ||
| 696 | } | ||
| 697 | |||
| 698 | static HRESULT BalBaseBAFunctionsProcOnCachePayloadExtractComplete( | ||
| 699 | __in IBAFunctions* pBAFunctions, | ||
| 700 | __in BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS* pArgs, | ||
| 701 | __inout BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS* /*pResults*/ | ||
| 702 | ) | ||
| 703 | { | ||
| 704 | return pBAFunctions->OnCachePayloadExtractComplete(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->hrStatus); | ||
| 705 | } | ||
| 706 | |||
| 707 | static HRESULT BalBaseBAFunctionsProcOnPlanRestoreRelatedBundle( | ||
| 708 | __in IBAFunctions* pBAFunctions, | ||
| 709 | __in BA_ONPLANRESTORERELATEDBUNDLE_ARGS* pArgs, | ||
| 710 | __inout BA_ONPLANRESTORERELATEDBUNDLE_RESULTS* pResults | ||
| 711 | ) | ||
| 712 | { | ||
| 713 | return pBAFunctions->OnPlanRestoreRelatedBundle(pArgs->wzBundleId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); | ||
| 714 | } | ||
| 715 | |||
| 716 | static HRESULT BalBaseBAFunctionsProcOnPlanRelatedBundleType( | ||
| 717 | __in IBAFunctions* pBAFunctions, | ||
| 718 | __in BA_ONPLANRELATEDBUNDLETYPE_ARGS* pArgs, | ||
| 719 | __inout BA_ONPLANRELATEDBUNDLETYPE_RESULTS* pResults | ||
| 720 | ) | ||
| 721 | { | ||
| 722 | return pBAFunctions->OnPlanRelatedBundleType(pArgs->wzBundleId, pArgs->recommendedType, &pResults->requestedType, &pResults->fCancel); | ||
| 723 | } | ||
| 724 | |||
| 725 | static HRESULT BalBaseBAFunctionsProcOnApplyDowngrade( | ||
| 726 | __in IBAFunctions* pBAFunctions, | ||
| 727 | __in BA_ONAPPLYDOWNGRADE_ARGS* pArgs, | ||
| 728 | __inout BA_ONAPPLYDOWNGRADE_RESULTS* pResults | ||
| 729 | ) | ||
| 730 | { | ||
| 731 | return pBAFunctions->OnApplyDowngrade(pArgs->hrRecommended, &pResults->hrStatus); | ||
| 732 | } | ||
| 733 | |||
| 734 | static HRESULT BalBaseBAFunctionsProcOnDetectRelatedBundlePackage( | ||
| 735 | __in IBAFunctions* pBAFunctions, | ||
| 736 | __in BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS* pArgs, | ||
| 737 | __inout BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS* pResults | ||
| 738 | ) | ||
| 739 | { | ||
| 740 | return pBAFunctions->OnDetectRelatedBundlePackage(pArgs->wzPackageId, pArgs->wzBundleId, pArgs->relationType, pArgs->fPerMachine, pArgs->wzVersion, &pResults->fCancel); | ||
| 741 | } | ||
| 742 | |||
| 743 | static HRESULT BalBaseBAFunctionsProcOnCachePackageNonVitalValidationFailure( | ||
| 744 | __in IBAFunctions* pBAFunctions, | ||
| 745 | __in BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS* pArgs, | ||
| 746 | __inout BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS* pResults | ||
| 747 | ) | ||
| 748 | { | ||
| 749 | return pBAFunctions->OnCachePackageNonVitalValidationFailure(pArgs->wzPackageId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); | ||
| 750 | } | ||
| 751 | |||
| 752 | static HRESULT BalBaseBAFunctionsProcOnThemeLoaded( | ||
| 753 | __in IBAFunctions* pBAFunctions, | ||
| 754 | __in BA_FUNCTIONS_ONTHEMELOADED_ARGS* pArgs, | ||
| 755 | __inout BA_FUNCTIONS_ONTHEMELOADED_RESULTS* /*pResults*/ | ||
| 756 | ) | ||
| 757 | { | ||
| 758 | return pBAFunctions->OnThemeLoaded(pArgs->hWnd); | ||
| 759 | } | ||
| 760 | |||
| 761 | static HRESULT BalBaseBAFunctionsProcWndProc( | ||
| 762 | __in IBAFunctions* pBAFunctions, | ||
| 763 | __in BA_FUNCTIONS_WNDPROC_ARGS* pArgs, | ||
| 764 | __inout BA_FUNCTIONS_WNDPROC_RESULTS* pResults | ||
| 765 | ) | ||
| 766 | { | ||
| 767 | return pBAFunctions->WndProc(pArgs->hWnd, pArgs->uMsg, pArgs->wParam, pArgs->lParam, &pResults->fProcessed, &pResults->lResult); | ||
| 768 | } | ||
| 769 | |||
| 770 | static HRESULT BalBaseBAFunctionsProcOnThemeControlLoading( | ||
| 771 | __in IBAFunctions* pBAFunctions, | ||
| 772 | __in BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS* pArgs, | ||
| 773 | __inout BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS* pResults | ||
| 774 | ) | ||
| 775 | { | ||
| 776 | return pBAFunctions->OnThemeControlLoading(pArgs->wzName, &pResults->fProcessed, &pResults->wId, &pResults->dwAutomaticBehaviorType); | ||
| 777 | } | ||
| 778 | |||
| 779 | static HRESULT BalBaseBAFunctionsProcOnThemeControlWmCommand( | ||
| 780 | __in IBAFunctions* pBAFunctions, | ||
| 781 | __in BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS* pArgs, | ||
| 782 | __inout BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS* pResults | ||
| 783 | ) | ||
| 784 | { | ||
| 785 | return pBAFunctions->OnThemeControlWmCommand(pArgs->wParam, pArgs->wzName, pArgs->wId, pArgs->hWnd, &pResults->fProcessed, &pResults->lResult); | ||
| 786 | } | ||
| 787 | |||
| 788 | static HRESULT BalBaseBAFunctionsProcOnThemeControlWmNotify( | ||
| 789 | __in IBAFunctions* pBAFunctions, | ||
| 790 | __in BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS* pArgs, | ||
| 791 | __inout BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS* pResults | ||
| 792 | ) | ||
| 793 | { | ||
| 794 | return pBAFunctions->OnThemeControlWmNotify(pArgs->lParam, pArgs->wzName, pArgs->wId, pArgs->hWnd, &pResults->fProcessed, &pResults->lResult); | ||
| 795 | } | ||
| 796 | |||
| 797 | static HRESULT BalBaseBAFunctionsProcOnThemeControlLoaded( | ||
| 798 | __in IBAFunctions* pBAFunctions, | ||
| 799 | __in BA_FUNCTIONS_ONTHEMECONTROLLOADED_ARGS* pArgs, | ||
| 800 | __inout BA_FUNCTIONS_ONTHEMECONTROLLOADED_RESULTS* pResults | ||
| 801 | ) | ||
| 802 | { | ||
| 803 | return pBAFunctions->OnThemeControlLoaded(pArgs->wzName, pArgs->wId, pArgs->hWnd, &pResults->fProcessed); | ||
| 804 | } | ||
| 805 | |||
| 806 | /******************************************************************* | ||
| 807 | BalBaseBAFunctionsProc - requires pvContext to be of type IBAFunctions. | ||
| 808 | Provides a default mapping between the message based BAFunctions interface and | ||
| 809 | the COM-based BAFunctions interface. | ||
| 810 | |||
| 811 | *******************************************************************/ | ||
| 812 | HRESULT WINAPI BalBaseBAFunctionsProc( | ||
| 813 | __in BA_FUNCTIONS_MESSAGE message, | ||
| 814 | __in const LPVOID pvArgs, | ||
| 815 | __inout LPVOID pvResults, | ||
| 816 | __in_opt LPVOID pvContext | ||
| 817 | ) | ||
| 818 | { | ||
| 819 | IBAFunctions* pBAFunctions = reinterpret_cast<IBAFunctions*>(pvContext); | ||
| 820 | HRESULT hr = pBAFunctions->BAFunctionsProc(message, pvArgs, pvResults, pvContext); | ||
| 821 | |||
| 822 | if (E_NOTIMPL == hr) | ||
| 823 | { | ||
| 824 | switch (message) | ||
| 825 | { | ||
| 826 | case BA_FUNCTIONS_MESSAGE_ONCREATE: | ||
| 827 | // ONCREATE is handled when the function is created, not via callback. | ||
| 828 | break; | ||
| 829 | case BA_FUNCTIONS_MESSAGE_ONDESTROY: | ||
| 830 | hr = BalBaseBAFunctionsProcOnDestroy(pBAFunctions, reinterpret_cast<BA_ONDESTROY_ARGS*>(pvArgs), reinterpret_cast<BA_ONDESTROY_RESULTS*>(pvResults)); | ||
| 831 | break; | ||
| 832 | case BA_FUNCTIONS_MESSAGE_ONSTARTUP: | ||
| 833 | hr = BalBaseBAFunctionsProcOnStartup(pBAFunctions, reinterpret_cast<BA_ONSTARTUP_ARGS*>(pvArgs), reinterpret_cast<BA_ONSTARTUP_RESULTS*>(pvResults)); | ||
| 834 | break; | ||
| 835 | case BA_FUNCTIONS_MESSAGE_ONSHUTDOWN: | ||
| 836 | hr = BalBaseBAFunctionsProcOnShutdown(pBAFunctions, reinterpret_cast<BA_ONSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSHUTDOWN_RESULTS*>(pvResults)); | ||
| 837 | break; | ||
| 838 | case BA_FUNCTIONS_MESSAGE_ONDETECTBEGIN: | ||
| 839 | hr = BalBaseBAFunctionsProcOnDetectBegin(pBAFunctions, reinterpret_cast<BA_ONDETECTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTBEGIN_RESULTS*>(pvResults)); | ||
| 840 | break; | ||
| 841 | case BA_FUNCTIONS_MESSAGE_ONDETECTCOMPLETE: | ||
| 842 | hr = BalBaseBAFunctionsProcOnDetectComplete(pBAFunctions, reinterpret_cast<BA_ONDETECTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTCOMPLETE_RESULTS*>(pvResults)); | ||
| 843 | break; | ||
| 844 | case BA_FUNCTIONS_MESSAGE_ONPLANBEGIN: | ||
| 845 | hr = BalBaseBAFunctionsProcOnPlanBegin(pBAFunctions, reinterpret_cast<BA_ONPLANBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANBEGIN_RESULTS*>(pvResults)); | ||
| 846 | break; | ||
| 847 | case BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE: | ||
| 848 | hr = BalBaseBAFunctionsProcOnPlanComplete(pBAFunctions, reinterpret_cast<BA_ONPLANCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPLETE_RESULTS*>(pvResults)); | ||
| 849 | break; | ||
| 850 | case BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: | ||
| 851 | hr = BalBaseBAFunctionsProcOnDetectForwardCompatibleBundle(pBAFunctions, reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults)); | ||
| 852 | break; | ||
| 853 | case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN: | ||
| 854 | hr = BalBaseBAFunctionsProcOnDetectUpdateBegin(pBAFunctions, reinterpret_cast<BA_ONDETECTUPDATEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATEBEGIN_RESULTS*>(pvResults)); | ||
| 855 | break; | ||
| 856 | case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE: | ||
| 857 | hr = BalBaseBAFunctionsProcOnDetectUpdate(pBAFunctions, reinterpret_cast<BA_ONDETECTUPDATE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATE_RESULTS*>(pvResults)); | ||
| 858 | break; | ||
| 859 | case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATECOMPLETE: | ||
| 860 | hr = BalBaseBAFunctionsProcOnDetectUpdateComplete(pBAFunctions, reinterpret_cast<BA_ONDETECTUPDATECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATECOMPLETE_RESULTS*>(pvResults)); | ||
| 861 | break; | ||
| 862 | case BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLE: | ||
| 863 | hr = BalBaseBAFunctionsProcOnDetectRelatedBundle(pBAFunctions, reinterpret_cast<BA_ONDETECTRELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDBUNDLE_RESULTS*>(pvResults)); | ||
| 864 | break; | ||
| 865 | case BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGEBEGIN: | ||
| 866 | hr = BalBaseBAFunctionsProcOnDetectPackageBegin(pBAFunctions, reinterpret_cast<BA_ONDETECTPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTPACKAGEBEGIN_RESULTS*>(pvResults)); | ||
| 867 | break; | ||
| 868 | case BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDMSIPACKAGE: | ||
| 869 | hr = BalBaseBAFunctionsProcOnDetectRelatedMsiPackage(pBAFunctions, reinterpret_cast<BA_ONDETECTRELATEDMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDMSIPACKAGE_RESULTS*>(pvResults)); | ||
| 870 | break; | ||
| 871 | case BA_FUNCTIONS_MESSAGE_ONDETECTPATCHTARGET: | ||
| 872 | hr = BalBaseBAFunctionsProcOnDetectPatchTarget(pBAFunctions, reinterpret_cast<BA_ONDETECTPATCHTARGET_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTPATCHTARGET_RESULTS*>(pvResults)); | ||
| 873 | break; | ||
| 874 | case BA_FUNCTIONS_MESSAGE_ONDETECTMSIFEATURE: | ||
| 875 | hr = BalBaseBAFunctionsProcOnDetectMsiFeature(pBAFunctions, reinterpret_cast<BA_ONDETECTMSIFEATURE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTMSIFEATURE_RESULTS*>(pvResults)); | ||
| 876 | break; | ||
| 877 | case BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGECOMPLETE: | ||
| 878 | hr = BalBaseBAFunctionsProcOnDetectPackageComplete(pBAFunctions, reinterpret_cast<BA_ONDETECTPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTPACKAGECOMPLETE_RESULTS*>(pvResults)); | ||
| 879 | break; | ||
| 880 | case BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLE: | ||
| 881 | hr = BalBaseBAFunctionsProcOnPlanRelatedBundle(pBAFunctions, reinterpret_cast<BA_ONPLANRELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRELATEDBUNDLE_RESULTS*>(pvResults)); | ||
| 882 | break; | ||
| 883 | case BA_FUNCTIONS_MESSAGE_ONPLANPACKAGEBEGIN: | ||
| 884 | hr = BalBaseBAFunctionsProcOnPlanPackageBegin(pBAFunctions, reinterpret_cast<BA_ONPLANPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANPACKAGEBEGIN_RESULTS*>(pvResults)); | ||
| 885 | break; | ||
| 886 | case BA_FUNCTIONS_MESSAGE_ONPLANPATCHTARGET: | ||
| 887 | hr = BalBaseBAFunctionsProcOnPlanPatchTarget(pBAFunctions, reinterpret_cast<BA_ONPLANPATCHTARGET_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANPATCHTARGET_RESULTS*>(pvResults)); | ||
| 888 | break; | ||
| 889 | case BA_FUNCTIONS_MESSAGE_ONPLANMSIFEATURE: | ||
| 890 | hr = BalBaseBAFunctionsProcOnPlanMsiFeature(pBAFunctions, reinterpret_cast<BA_ONPLANMSIFEATURE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANMSIFEATURE_RESULTS*>(pvResults)); | ||
| 891 | break; | ||
| 892 | case BA_FUNCTIONS_MESSAGE_ONPLANPACKAGECOMPLETE: | ||
| 893 | hr = BalBaseBAFunctionsProcOnPlanPackageComplete(pBAFunctions, reinterpret_cast<BA_ONPLANPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANPACKAGECOMPLETE_RESULTS*>(pvResults)); | ||
| 894 | break; | ||
| 895 | case BA_FUNCTIONS_MESSAGE_ONAPPLYBEGIN: | ||
| 896 | hr = BalBaseBAFunctionsProcOnApplyBegin(pBAFunctions, reinterpret_cast<BA_ONAPPLYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONAPPLYBEGIN_RESULTS*>(pvResults)); | ||
| 897 | break; | ||
| 898 | case BA_FUNCTIONS_MESSAGE_ONELEVATEBEGIN: | ||
| 899 | hr = BalBaseBAFunctionsProcOnElevateBegin(pBAFunctions, reinterpret_cast<BA_ONELEVATEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONELEVATEBEGIN_RESULTS*>(pvResults)); | ||
| 900 | break; | ||
| 901 | case BA_FUNCTIONS_MESSAGE_ONELEVATECOMPLETE: | ||
| 902 | hr = BalBaseBAFunctionsProcOnElevateComplete(pBAFunctions, reinterpret_cast<BA_ONELEVATECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONELEVATECOMPLETE_RESULTS*>(pvResults)); | ||
| 903 | break; | ||
| 904 | case BA_FUNCTIONS_MESSAGE_ONPROGRESS: | ||
| 905 | hr = BalBaseBAFunctionsProcOnProgress(pBAFunctions, reinterpret_cast<BA_ONPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONPROGRESS_RESULTS*>(pvResults)); | ||
| 906 | break; | ||
| 907 | case BA_FUNCTIONS_MESSAGE_ONERROR: | ||
| 908 | hr = BalBaseBAFunctionsProcOnError(pBAFunctions, reinterpret_cast<BA_ONERROR_ARGS*>(pvArgs), reinterpret_cast<BA_ONERROR_RESULTS*>(pvResults)); | ||
| 909 | break; | ||
| 910 | case BA_FUNCTIONS_MESSAGE_ONREGISTERBEGIN: | ||
| 911 | hr = BalBaseBAFunctionsProcOnRegisterBegin(pBAFunctions, reinterpret_cast<BA_ONREGISTERBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONREGISTERBEGIN_RESULTS*>(pvResults)); | ||
| 912 | break; | ||
| 913 | case BA_FUNCTIONS_MESSAGE_ONREGISTERCOMPLETE: | ||
| 914 | hr = BalBaseBAFunctionsProcOnRegisterComplete(pBAFunctions, reinterpret_cast<BA_ONREGISTERCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONREGISTERCOMPLETE_RESULTS*>(pvResults)); | ||
| 915 | break; | ||
| 916 | case BA_FUNCTIONS_MESSAGE_ONCACHEBEGIN: | ||
| 917 | hr = BalBaseBAFunctionsProcOnCacheBegin(pBAFunctions, reinterpret_cast<BA_ONCACHEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEBEGIN_RESULTS*>(pvResults)); | ||
| 918 | break; | ||
| 919 | case BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN: | ||
| 920 | hr = BalBaseBAFunctionsProcOnCachePackageBegin(pBAFunctions, reinterpret_cast<BA_ONCACHEPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPACKAGEBEGIN_RESULTS*>(pvResults)); | ||
| 921 | break; | ||
| 922 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN: | ||
| 923 | hr = BalBaseBAFunctionsProcOnCacheAcquireBegin(pBAFunctions, reinterpret_cast<BA_ONCACHEACQUIREBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIREBEGIN_RESULTS*>(pvResults)); | ||
| 924 | break; | ||
| 925 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS: | ||
| 926 | hr = BalBaseBAFunctionsProcOnCacheAcquireProgress(pBAFunctions, reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_RESULTS*>(pvResults)); | ||
| 927 | break; | ||
| 928 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRERESOLVING: | ||
| 929 | hr = BalBaseBAFunctionsProcOnCacheAcquireResolving(pBAFunctions, reinterpret_cast<BA_ONCACHEACQUIRERESOLVING_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIRERESOLVING_RESULTS*>(pvResults)); | ||
| 930 | break; | ||
| 931 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE: | ||
| 932 | hr = BalBaseBAFunctionsProcOnCacheAcquireComplete(pBAFunctions, reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_RESULTS*>(pvResults)); | ||
| 933 | break; | ||
| 934 | case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN: | ||
| 935 | hr = BalBaseBAFunctionsProcOnCacheVerifyBegin(pBAFunctions, reinterpret_cast<BA_ONCACHEVERIFYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYBEGIN_RESULTS*>(pvResults)); | ||
| 936 | break; | ||
| 937 | case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYPROGRESS: | ||
| 938 | hr = BalBaseBAFunctionsProcOnCacheVerifyProgress(pBAFunctions, reinterpret_cast<BA_ONCACHEVERIFYPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYPROGRESS_RESULTS*>(pvResults)); | ||
| 939 | break; | ||
| 940 | case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE: | ||
| 941 | hr = BalBaseBAFunctionsProcOnCacheVerifyComplete(pBAFunctions, reinterpret_cast<BA_ONCACHEVERIFYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYCOMPLETE_RESULTS*>(pvResults)); | ||
| 942 | break; | ||
| 943 | case BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGECOMPLETE: | ||
| 944 | hr = BalBaseBAFunctionsProcOnCachePackageComplete(pBAFunctions, reinterpret_cast<BA_ONCACHEPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPACKAGECOMPLETE_RESULTS*>(pvResults)); | ||
| 945 | break; | ||
| 946 | case BA_FUNCTIONS_MESSAGE_ONCACHECOMPLETE: | ||
| 947 | hr = BalBaseBAFunctionsProcOnCacheComplete(pBAFunctions, reinterpret_cast<BA_ONCACHECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECOMPLETE_RESULTS*>(pvResults)); | ||
| 948 | break; | ||
| 949 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEBEGIN: | ||
| 950 | hr = BalBaseBAFunctionsProcOnExecuteBegin(pBAFunctions, reinterpret_cast<BA_ONEXECUTEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEBEGIN_RESULTS*>(pvResults)); | ||
| 951 | break; | ||
| 952 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGEBEGIN: | ||
| 953 | hr = BalBaseBAFunctionsProcOnExecutePackageBegin(pBAFunctions, reinterpret_cast<BA_ONEXECUTEPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPACKAGEBEGIN_RESULTS*>(pvResults)); | ||
| 954 | break; | ||
| 955 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEPATCHTARGET: | ||
| 956 | hr = BalBaseBAFunctionsProcOnExecutePatchTarget(pBAFunctions, reinterpret_cast<BA_ONEXECUTEPATCHTARGET_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPATCHTARGET_RESULTS*>(pvResults)); | ||
| 957 | break; | ||
| 958 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEPROGRESS: | ||
| 959 | hr = BalBaseBAFunctionsProcOnExecuteProgress(pBAFunctions, reinterpret_cast<BA_ONEXECUTEPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPROGRESS_RESULTS*>(pvResults)); | ||
| 960 | break; | ||
| 961 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEMSIMESSAGE: | ||
| 962 | hr = BalBaseBAFunctionsProcOnExecuteMsiMessage(pBAFunctions, reinterpret_cast<BA_ONEXECUTEMSIMESSAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEMSIMESSAGE_RESULTS*>(pvResults)); | ||
| 963 | break; | ||
| 964 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEFILESINUSE: | ||
| 965 | hr = BalBaseBAFunctionsProcOnExecuteFilesInUse(pBAFunctions, reinterpret_cast<BA_ONEXECUTEFILESINUSE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEFILESINUSE_RESULTS*>(pvResults)); | ||
| 966 | break; | ||
| 967 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGECOMPLETE: | ||
| 968 | hr = BalBaseBAFunctionsProcOnExecutePackageComplete(pBAFunctions, reinterpret_cast<BA_ONEXECUTEPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPACKAGECOMPLETE_RESULTS*>(pvResults)); | ||
| 969 | break; | ||
| 970 | case BA_FUNCTIONS_MESSAGE_ONEXECUTECOMPLETE: | ||
| 971 | hr = BalBaseBAFunctionsProcOnExecuteComplete(pBAFunctions, reinterpret_cast<BA_ONEXECUTECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTECOMPLETE_RESULTS*>(pvResults)); | ||
| 972 | break; | ||
| 973 | case BA_FUNCTIONS_MESSAGE_ONUNREGISTERBEGIN: | ||
| 974 | hr = BalBaseBAFunctionsProcOnUnregisterBegin(pBAFunctions, reinterpret_cast<BA_ONUNREGISTERBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONUNREGISTERBEGIN_RESULTS*>(pvResults)); | ||
| 975 | break; | ||
| 976 | case BA_FUNCTIONS_MESSAGE_ONUNREGISTERCOMPLETE: | ||
| 977 | hr = BalBaseBAFunctionsProcOnUnregisterComplete(pBAFunctions, reinterpret_cast<BA_ONUNREGISTERCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONUNREGISTERCOMPLETE_RESULTS*>(pvResults)); | ||
| 978 | break; | ||
| 979 | case BA_FUNCTIONS_MESSAGE_ONAPPLYCOMPLETE: | ||
| 980 | hr = BalBaseBAFunctionsProcOnApplyComplete(pBAFunctions, reinterpret_cast<BA_ONAPPLYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONAPPLYCOMPLETE_RESULTS*>(pvResults)); | ||
| 981 | break; | ||
| 982 | case BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN: | ||
| 983 | hr = BalBaseBAFunctionsProcOnLaunchApprovedExeBegin(pBAFunctions, reinterpret_cast<BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS*>(pvResults)); | ||
| 984 | break; | ||
| 985 | case BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE: | ||
| 986 | hr = BalBaseBAFunctionsProcOnLaunchApprovedExeComplete(pBAFunctions, reinterpret_cast<BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS*>(pvResults)); | ||
| 987 | break; | ||
| 988 | case BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE: | ||
| 989 | hr = BalBaseBAFunctionsProcOnPlanMsiPackage(pBAFunctions, reinterpret_cast<BA_ONPLANMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANMSIPACKAGE_RESULTS*>(pvResults)); | ||
| 990 | break; | ||
| 991 | case BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONBEGIN: | ||
| 992 | hr = BalBaseBAFunctionsProcOnBeginMsiTransactionBegin(pBAFunctions, reinterpret_cast<BA_ONBEGINMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS*>(pvResults)); | ||
| 993 | break; | ||
| 994 | case BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE: | ||
| 995 | hr = BalBaseBAFunctionsProcOnBeginMsiTransactionComplete(pBAFunctions, reinterpret_cast<BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults)); | ||
| 996 | break; | ||
| 997 | case BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN: | ||
| 998 | hr = BalBaseBAFunctionsProcOnCommitMsiTransactionBegin(pBAFunctions, reinterpret_cast<BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS*>(pvResults)); | ||
| 999 | break; | ||
| 1000 | case BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE: | ||
| 1001 | hr = BalBaseBAFunctionsProcOnCommitMsiTransactionComplete(pBAFunctions, reinterpret_cast<BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults)); | ||
| 1002 | break; | ||
| 1003 | case BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN: | ||
| 1004 | hr = BalBaseBAFunctionsProcOnRollbackMsiTransactionBegin(pBAFunctions, reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS*>(pvResults)); | ||
| 1005 | break; | ||
| 1006 | case BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE: | ||
| 1007 | hr = BalBaseBAFunctionsProcOnRollbackMsiTransactionComplete(pBAFunctions, reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS*>(pvResults)); | ||
| 1008 | case BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN: | ||
| 1009 | hr = BalBaseBAFunctionsProcOnPauseAutomaticUpdatesBegin(pBAFunctions, reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS*>(pvResults)); | ||
| 1010 | break; | ||
| 1011 | case BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE: | ||
| 1012 | hr = BalBaseBAFunctionsProcOnPauseAutomaticUpdatesComplete(pBAFunctions, reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS*>(pvResults)); | ||
| 1013 | break; | ||
| 1014 | case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN: | ||
| 1015 | hr = BalBaseBAFunctionsProcOnSystemRestorePointBegin(pBAFunctions, reinterpret_cast<BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS*>(pvResults)); | ||
| 1016 | break; | ||
| 1017 | case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE: | ||
| 1018 | hr = BalBaseBAFunctionsProcOnSystemRestorePointComplete(pBAFunctions, reinterpret_cast<BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS*>(pvResults)); | ||
| 1019 | break; | ||
| 1020 | case BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE: | ||
| 1021 | hr = BalBaseBAFunctionsProcOnPlannedPackage(pBAFunctions, reinterpret_cast<BA_ONPLANNEDPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANNEDPACKAGE_RESULTS*>(pvResults)); | ||
| 1022 | break; | ||
| 1023 | case BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE: | ||
| 1024 | hr = BalBaseBAFunctionsProcOnPlanForwardCompatibleBundle(pBAFunctions, reinterpret_cast<BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults)); | ||
| 1025 | break; | ||
| 1026 | case BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN: | ||
| 1027 | hr = BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyBegin(pBAFunctions, reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS*>(pvResults)); | ||
| 1028 | break; | ||
| 1029 | case BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS: | ||
| 1030 | hr = BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyProgress(pBAFunctions, reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS*>(pvResults)); | ||
| 1031 | break; | ||
| 1032 | case BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE: | ||
| 1033 | hr = BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyComplete(pBAFunctions, reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS*>(pvResults)); | ||
| 1034 | break; | ||
| 1035 | case BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN: | ||
| 1036 | hr = BalBaseBAFunctionsProcOnCachePayloadExtractBegin(pBAFunctions, reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS*>(pvResults)); | ||
| 1037 | break; | ||
| 1038 | case BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS: | ||
| 1039 | hr = BalBaseBAFunctionsProcOnCachePayloadExtractProgress(pBAFunctions, reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS*>(pvResults)); | ||
| 1040 | break; | ||
| 1041 | case BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE: | ||
| 1042 | hr = BalBaseBAFunctionsProcOnCachePayloadExtractComplete(pBAFunctions, reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS*>(pvResults)); | ||
| 1043 | break; | ||
| 1044 | case BA_FUNCTIONS_MESSAGE_ONPLANROLLBACKBOUNDARY: | ||
| 1045 | hr = BalBaseBAFunctionsProcOnPlanRollbackBoundary(pBAFunctions, reinterpret_cast<BA_ONPLANROLLBACKBOUNDARY_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANROLLBACKBOUNDARY_RESULTS*>(pvResults)); | ||
| 1046 | break; | ||
| 1047 | case BA_FUNCTIONS_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE: | ||
| 1048 | hr = BalBaseBAFunctionsProcOnDetectCompatiblePackage(pBAFunctions, reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS*>(pvResults)); | ||
| 1049 | break; | ||
| 1050 | case BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN: | ||
| 1051 | hr = BalBaseBAFunctionsProcOnPlanCompatibleMsiPackageBegin(pBAFunctions, reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS*>(pvResults)); | ||
| 1052 | break; | ||
| 1053 | case BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE: | ||
| 1054 | hr = BalBaseBAFunctionsProcOnPlanCompatibleMsiPackageComplete(pBAFunctions, reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS*>(pvResults)); | ||
| 1055 | break; | ||
| 1056 | case BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE: | ||
| 1057 | hr = BalBaseBAFunctionsProcOnPlannedCompatiblePackage(pBAFunctions, reinterpret_cast<BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS*>(pvResults)); | ||
| 1058 | break; | ||
| 1059 | case BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE: | ||
| 1060 | hr = BalBaseBAFunctionsProcOnPlanRestoreRelatedBundle(pBAFunctions, reinterpret_cast<BA_ONPLANRESTORERELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRESTORERELATEDBUNDLE_RESULTS*>(pvResults)); | ||
| 1061 | break; | ||
| 1062 | case BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE: | ||
| 1063 | hr = BalBaseBAFunctionsProcOnPlanRelatedBundleType(pBAFunctions, reinterpret_cast<BA_ONPLANRELATEDBUNDLETYPE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRELATEDBUNDLETYPE_RESULTS*>(pvResults)); | ||
| 1064 | break; | ||
| 1065 | case BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE: | ||
| 1066 | hr = BalBaseBAFunctionsProcOnApplyDowngrade(pBAFunctions, reinterpret_cast<BA_ONAPPLYDOWNGRADE_ARGS*>(pvArgs), reinterpret_cast<BA_ONAPPLYDOWNGRADE_RESULTS*>(pvResults)); | ||
| 1067 | break; | ||
| 1068 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL: | ||
| 1069 | hr = BalBaseBAFunctionsProcOnExecuteProcessCancel(pBAFunctions, reinterpret_cast<BA_ONEXECUTEPROCESSCANCEL_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPROCESSCANCEL_RESULTS*>(pvResults)); | ||
| 1070 | break; | ||
| 1071 | case BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE: | ||
| 1072 | hr = BalBaseBAFunctionsProcOnDetectRelatedBundlePackage(pBAFunctions, reinterpret_cast<BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS*>(pvResults)); | ||
| 1073 | break; | ||
| 1074 | case BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE: | ||
| 1075 | hr = BalBaseBAFunctionsProcOnCachePackageNonVitalValidationFailure(pBAFunctions, reinterpret_cast<BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS*>(pvResults)); | ||
| 1076 | break; | ||
| 1077 | case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: | ||
| 1078 | hr = BalBaseBAFunctionsProcOnThemeLoaded(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMELOADED_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMELOADED_RESULTS*>(pvResults)); | ||
| 1079 | break; | ||
| 1080 | case BA_FUNCTIONS_MESSAGE_WNDPROC: | ||
| 1081 | hr = BalBaseBAFunctionsProcWndProc(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_WNDPROC_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_WNDPROC_RESULTS*>(pvResults)); | ||
| 1082 | break; | ||
| 1083 | case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING: | ||
| 1084 | hr = BalBaseBAFunctionsProcOnThemeControlLoading(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS*>(pvResults)); | ||
| 1085 | break; | ||
| 1086 | case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMCOMMAND: | ||
| 1087 | hr = BalBaseBAFunctionsProcOnThemeControlWmCommand(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS*>(pvResults)); | ||
| 1088 | break; | ||
| 1089 | case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMNOTIFY: | ||
| 1090 | hr = BalBaseBAFunctionsProcOnThemeControlWmNotify(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS*>(pvResults)); | ||
| 1091 | break; | ||
| 1092 | case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADED: | ||
| 1093 | hr = BalBaseBAFunctionsProcOnThemeControlLoaded(pBAFunctions, reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLLOADED_ARGS*>(pvArgs), reinterpret_cast<BA_FUNCTIONS_ONTHEMECONTROLLOADED_RESULTS*>(pvResults)); | ||
| 1094 | break; | ||
| 1095 | } | ||
| 1096 | } | ||
| 1097 | |||
| 1098 | return hr; | ||
| 1099 | } | ||
diff --git a/src/ext/Bal/wixstdfn/build/WixToolset.WixStandardBootstrapperApplicationFunctionApi.props b/src/ext/Bal/wixstdfn/build/WixToolset.WixStandardBootstrapperApplicationFunctionApi.props new file mode 100644 index 00000000..7a0b08e6 --- /dev/null +++ b/src/ext/Bal/wixstdfn/build/WixToolset.WixStandardBootstrapperApplicationFunctionApi.props | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-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. --> | ||
| 3 | |||
| 4 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 5 | <ItemDefinitionGroup> | ||
| 6 | <ClCompile> | ||
| 7 | <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\lib\native\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| 8 | </ClCompile> | ||
| 9 | <ResourceCompile> | ||
| 10 | <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\lib\native\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| 11 | </ResourceCompile> | ||
| 12 | </ItemDefinitionGroup> | ||
| 13 | <ItemDefinitionGroup Condition=" $(PlatformToolset.ToLower().StartsWith('v14')) "> | ||
| 14 | <Link> | ||
| 15 | <AdditionalDependencies>$(MSBuildThisFileDirectory)..\lib\native\v14\$(PlatformTarget)\wixstdfn.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
| 16 | </Link> | ||
| 17 | </ItemDefinitionGroup> | ||
| 18 | </Project> | ||
diff --git a/src/ext/Bal/wixstdfn/inc/BAFunctions.h b/src/ext/Bal/wixstdfn/inc/BAFunctions.h new file mode 100644 index 00000000..7908a74c --- /dev/null +++ b/src/ext/Bal/wixstdfn/inc/BAFunctions.h | |||
| @@ -0,0 +1,243 @@ | |||
| 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. | ||
| 3 | |||
| 4 | #include "IBootstrapperEngine.h" | ||
| 5 | |||
| 6 | #ifdef __cplusplus | ||
| 7 | extern "C" { | ||
| 8 | #endif | ||
| 9 | |||
| 10 | // The first 1024 messages are reserved so that the BA messages have the same value here. | ||
| 11 | enum BA_FUNCTIONS_MESSAGE | ||
| 12 | { | ||
| 13 | BA_FUNCTIONS_MESSAGE_ONCREATE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCREATE, | ||
| 14 | BA_FUNCTIONS_MESSAGE_ONDESTROY = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDESTROY, | ||
| 15 | BA_FUNCTIONS_MESSAGE_ONSTARTUP = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, | ||
| 16 | BA_FUNCTIONS_MESSAGE_ONSHUTDOWN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, | ||
| 17 | BA_FUNCTIONS_MESSAGE_ONDETECTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, | ||
| 18 | BA_FUNCTIONS_MESSAGE_ONDETECTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE, | ||
| 19 | BA_FUNCTIONS_MESSAGE_ONPLANBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN, | ||
| 20 | BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, | ||
| 21 | BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, | ||
| 22 | BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, | ||
| 23 | BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, | ||
| 24 | BA_FUNCTIONS_MESSAGE_ONDETECTUPDATECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE, | ||
| 25 | BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE, | ||
| 26 | BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN, | ||
| 27 | BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDMSIPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE, | ||
| 28 | BA_FUNCTIONS_MESSAGE_ONDETECTPATCHTARGET = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPATCHTARGET, | ||
| 29 | BA_FUNCTIONS_MESSAGE_ONDETECTMSIFEATURE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE, | ||
| 30 | BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE, | ||
| 31 | BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE, | ||
| 32 | BA_FUNCTIONS_MESSAGE_ONPLANPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN, | ||
| 33 | BA_FUNCTIONS_MESSAGE_ONPLANPATCHTARGET = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPATCHTARGET, | ||
| 34 | BA_FUNCTIONS_MESSAGE_ONPLANMSIFEATURE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE, | ||
| 35 | BA_FUNCTIONS_MESSAGE_ONPLANPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE, | ||
| 36 | BA_FUNCTIONS_MESSAGE_ONAPPLYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN, | ||
| 37 | BA_FUNCTIONS_MESSAGE_ONELEVATEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN, | ||
| 38 | BA_FUNCTIONS_MESSAGE_ONELEVATECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE, | ||
| 39 | BA_FUNCTIONS_MESSAGE_ONPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS, | ||
| 40 | BA_FUNCTIONS_MESSAGE_ONERROR = BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR, | ||
| 41 | BA_FUNCTIONS_MESSAGE_ONREGISTERBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN, | ||
| 42 | BA_FUNCTIONS_MESSAGE_ONREGISTERCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE, | ||
| 43 | BA_FUNCTIONS_MESSAGE_ONCACHEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN, | ||
| 44 | BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, | ||
| 45 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, | ||
| 46 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, | ||
| 47 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRERESOLVING = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING, | ||
| 48 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, | ||
| 49 | BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, | ||
| 50 | BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, | ||
| 51 | BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE, | ||
| 52 | BA_FUNCTIONS_MESSAGE_ONCACHECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE, | ||
| 53 | BA_FUNCTIONS_MESSAGE_ONEXECUTEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN, | ||
| 54 | BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN, | ||
| 55 | BA_FUNCTIONS_MESSAGE_ONEXECUTEPATCHTARGET = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET, | ||
| 56 | BA_FUNCTIONS_MESSAGE_ONEXECUTEPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS, | ||
| 57 | BA_FUNCTIONS_MESSAGE_ONEXECUTEMSIMESSAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE, | ||
| 58 | BA_FUNCTIONS_MESSAGE_ONEXECUTEFILESINUSE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE, | ||
| 59 | BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE, | ||
| 60 | BA_FUNCTIONS_MESSAGE_ONEXECUTECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE, | ||
| 61 | BA_FUNCTIONS_MESSAGE_ONUNREGISTERBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN, | ||
| 62 | BA_FUNCTIONS_MESSAGE_ONUNREGISTERCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE, | ||
| 63 | BA_FUNCTIONS_MESSAGE_ONAPPLYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE, | ||
| 64 | BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, | ||
| 65 | BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, | ||
| 66 | BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, | ||
| 67 | BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, | ||
| 68 | BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, | ||
| 69 | BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, | ||
| 70 | BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, | ||
| 71 | BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, | ||
| 72 | BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, | ||
| 73 | BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, | ||
| 74 | BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, | ||
| 75 | BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, | ||
| 76 | BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, | ||
| 77 | BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE, | ||
| 78 | BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, | ||
| 79 | BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS, | ||
| 80 | BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN, | ||
| 81 | BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE, | ||
| 82 | BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS, | ||
| 83 | BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN, | ||
| 84 | BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE, | ||
| 85 | BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS, | ||
| 86 | BA_FUNCTIONS_MESSAGE_ONPLANROLLBACKBOUNDARY = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY, | ||
| 87 | BA_FUNCTIONS_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, | ||
| 88 | BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, | ||
| 89 | BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, | ||
| 90 | BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, | ||
| 91 | BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, | ||
| 92 | BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, | ||
| 93 | BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, | ||
| 94 | BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, | ||
| 95 | BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, | ||
| 96 | BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE, | ||
| 97 | |||
| 98 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, | ||
| 99 | BA_FUNCTIONS_MESSAGE_WNDPROC, | ||
| 100 | BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING, | ||
| 101 | BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMCOMMAND, | ||
| 102 | BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMNOTIFY, | ||
| 103 | BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADED, | ||
| 104 | }; | ||
| 105 | |||
| 106 | typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_PROC)( | ||
| 107 | __in BA_FUNCTIONS_MESSAGE message, | ||
| 108 | __in const LPVOID pvArgs, | ||
| 109 | __inout LPVOID pvResults, | ||
| 110 | __in_opt LPVOID pvContext | ||
| 111 | ); | ||
| 112 | |||
| 113 | // Should be the same as THEME_FIRST_ASSIGN_CONTROL_ID. | ||
| 114 | // BAFunctions must only assign ids in the range [BAFUNCTIONS_FIRST_ASSIGN_CONTROL_ID, 0x8000) to avoid collisions. | ||
| 115 | const WORD BAFUNCTIONS_FIRST_ASSIGN_CONTROL_ID = 0x4000; | ||
| 116 | |||
| 117 | struct BA_FUNCTIONS_CREATE_ARGS | ||
| 118 | { | ||
| 119 | DWORD cbSize; | ||
| 120 | DWORD64 qwBAFunctionsAPIVersion; | ||
| 121 | IBootstrapperEngine* pEngine; | ||
| 122 | BOOTSTRAPPER_COMMAND* pCommand; | ||
| 123 | }; | ||
| 124 | |||
| 125 | struct BA_FUNCTIONS_CREATE_RESULTS | ||
| 126 | { | ||
| 127 | DWORD cbSize; | ||
| 128 | PFN_BA_FUNCTIONS_PROC pfnBAFunctionsProc; | ||
| 129 | LPVOID pvBAFunctionsProcContext; | ||
| 130 | }; | ||
| 131 | |||
| 132 | struct BA_FUNCTIONS_DESTROY_ARGS | ||
| 133 | { | ||
| 134 | DWORD cbSize; | ||
| 135 | BOOL fReload; | ||
| 136 | }; | ||
| 137 | |||
| 138 | struct BA_FUNCTIONS_DESTROY_RESULTS | ||
| 139 | { | ||
| 140 | DWORD cbSize; | ||
| 141 | BOOL fDisableUnloading; // indicates the BAFunctions dll must not be unloaded after BAFunctionsDestroy. | ||
| 142 | }; | ||
| 143 | |||
| 144 | struct BA_FUNCTIONS_ONTHEMECONTROLLOADED_ARGS | ||
| 145 | { | ||
| 146 | DWORD cbSize; | ||
| 147 | LPCWSTR wzName; | ||
| 148 | WORD wId; | ||
| 149 | HWND hWnd; | ||
| 150 | }; | ||
| 151 | |||
| 152 | struct BA_FUNCTIONS_ONTHEMECONTROLLOADED_RESULTS | ||
| 153 | { | ||
| 154 | DWORD cbSize; | ||
| 155 | BOOL fProcessed; | ||
| 156 | }; | ||
| 157 | |||
| 158 | struct BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS | ||
| 159 | { | ||
| 160 | DWORD cbSize; | ||
| 161 | LPCWSTR wzName; | ||
| 162 | }; | ||
| 163 | |||
| 164 | struct BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS | ||
| 165 | { | ||
| 166 | DWORD cbSize; | ||
| 167 | BOOL fProcessed; | ||
| 168 | WORD wId; | ||
| 169 | DWORD dwAutomaticBehaviorType; | ||
| 170 | }; | ||
| 171 | |||
| 172 | struct BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS | ||
| 173 | { | ||
| 174 | DWORD cbSize; | ||
| 175 | WPARAM wParam; | ||
| 176 | LPCWSTR wzName; | ||
| 177 | WORD wId; | ||
| 178 | HWND hWnd; | ||
| 179 | }; | ||
| 180 | |||
| 181 | struct BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS | ||
| 182 | { | ||
| 183 | DWORD cbSize; | ||
| 184 | BOOL fProcessed; | ||
| 185 | LRESULT lResult; | ||
| 186 | }; | ||
| 187 | |||
| 188 | struct BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS | ||
| 189 | { | ||
| 190 | DWORD cbSize; | ||
| 191 | LPNMHDR lParam; | ||
| 192 | LPCWSTR wzName; | ||
| 193 | WORD wId; | ||
| 194 | HWND hWnd; | ||
| 195 | }; | ||
| 196 | |||
| 197 | struct BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS | ||
| 198 | { | ||
| 199 | DWORD cbSize; | ||
| 200 | BOOL fProcessed; | ||
| 201 | LRESULT lResult; | ||
| 202 | }; | ||
| 203 | |||
| 204 | struct BA_FUNCTIONS_ONTHEMELOADED_ARGS | ||
| 205 | { | ||
| 206 | DWORD cbSize; | ||
| 207 | HWND hWnd; | ||
| 208 | }; | ||
| 209 | |||
| 210 | struct BA_FUNCTIONS_ONTHEMELOADED_RESULTS | ||
| 211 | { | ||
| 212 | DWORD cbSize; | ||
| 213 | }; | ||
| 214 | |||
| 215 | struct BA_FUNCTIONS_WNDPROC_ARGS | ||
| 216 | { | ||
| 217 | DWORD cbSize; | ||
| 218 | HWND hWnd; | ||
| 219 | UINT uMsg; | ||
| 220 | WPARAM wParam; | ||
| 221 | LPARAM lParam; | ||
| 222 | }; | ||
| 223 | |||
| 224 | struct BA_FUNCTIONS_WNDPROC_RESULTS | ||
| 225 | { | ||
| 226 | DWORD cbSize; | ||
| 227 | BOOL fProcessed; | ||
| 228 | LRESULT lResult; | ||
| 229 | }; | ||
| 230 | |||
| 231 | typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_CREATE)( | ||
| 232 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | ||
| 233 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults | ||
| 234 | ); | ||
| 235 | |||
| 236 | typedef void (WINAPI *PFN_BA_FUNCTIONS_DESTROY)( | ||
| 237 | __in const BA_FUNCTIONS_DESTROY_ARGS* pArgs, | ||
| 238 | __inout BA_FUNCTIONS_DESTROY_RESULTS* pResults | ||
| 239 | ); | ||
| 240 | |||
| 241 | #ifdef __cplusplus | ||
| 242 | } | ||
| 243 | #endif | ||
diff --git a/src/ext/Bal/wixstdfn/inc/BalBaseBAFunctions.h b/src/ext/Bal/wixstdfn/inc/BalBaseBAFunctions.h new file mode 100644 index 00000000..fd284d9c --- /dev/null +++ b/src/ext/Bal/wixstdfn/inc/BalBaseBAFunctions.h | |||
| @@ -0,0 +1,1018 @@ | |||
| 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. | ||
| 3 | |||
| 4 | #include <windows.h> | ||
| 5 | #include <msiquery.h> | ||
| 6 | |||
| 7 | #include <IBAFunctions.h> | ||
| 8 | |||
| 9 | class CBalBaseBAFunctions : public IBAFunctions | ||
| 10 | { | ||
| 11 | public: // IUnknown | ||
| 12 | virtual STDMETHODIMP QueryInterface( | ||
| 13 | __in REFIID riid, | ||
| 14 | __out LPVOID *ppvObject | ||
| 15 | ) | ||
| 16 | { | ||
| 17 | if (!ppvObject) | ||
| 18 | { | ||
| 19 | return E_INVALIDARG; | ||
| 20 | } | ||
| 21 | |||
| 22 | *ppvObject = NULL; | ||
| 23 | |||
| 24 | if (::IsEqualIID(__uuidof(IBAFunctions), riid)) | ||
| 25 | { | ||
| 26 | *ppvObject = static_cast<IBAFunctions*>(this); | ||
| 27 | } | ||
| 28 | else if (::IsEqualIID(__uuidof(IBootstrapperApplication), riid)) | ||
| 29 | { | ||
| 30 | *ppvObject = static_cast<IBootstrapperApplication*>(this); | ||
| 31 | } | ||
| 32 | else if (::IsEqualIID(IID_IUnknown, riid)) | ||
| 33 | { | ||
| 34 | *ppvObject = static_cast<IUnknown*>(this); | ||
| 35 | } | ||
| 36 | else // no interface for requested iid | ||
| 37 | { | ||
| 38 | return E_NOINTERFACE; | ||
| 39 | } | ||
| 40 | |||
| 41 | AddRef(); | ||
| 42 | return S_OK; | ||
| 43 | } | ||
| 44 | |||
| 45 | virtual STDMETHODIMP_(ULONG) AddRef() | ||
| 46 | { | ||
| 47 | return ::InterlockedIncrement(&this->m_cReferences); | ||
| 48 | } | ||
| 49 | |||
| 50 | virtual STDMETHODIMP_(ULONG) Release() | ||
| 51 | { | ||
| 52 | long l = ::InterlockedDecrement(&this->m_cReferences); | ||
| 53 | if (0 < l) | ||
| 54 | { | ||
| 55 | return l; | ||
| 56 | } | ||
| 57 | |||
| 58 | delete this; | ||
| 59 | return 0; | ||
| 60 | } | ||
| 61 | |||
| 62 | public: // IBootstrapperApplication | ||
| 63 | virtual STDMETHODIMP_(HRESULT) BAProc( | ||
| 64 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, | ||
| 65 | __in const LPVOID /*pvArgs*/, | ||
| 66 | __inout LPVOID /*pvResults*/ | ||
| 67 | ) | ||
| 68 | { | ||
| 69 | return E_NOTIMPL; | ||
| 70 | } | ||
| 71 | |||
| 72 | virtual STDMETHODIMP_(void) BAProcFallback( | ||
| 73 | __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, | ||
| 74 | __in const LPVOID /*pvArgs*/, | ||
| 75 | __inout LPVOID /*pvResults*/, | ||
| 76 | __inout HRESULT* /*phr*/ | ||
| 77 | ) | ||
| 78 | { | ||
| 79 | } | ||
| 80 | |||
| 81 | virtual STDMETHODIMP OnCreate( | ||
| 82 | __in IBootstrapperEngine* pEngine, | ||
| 83 | __in BOOTSTRAPPER_COMMAND* /*pCommand*/ | ||
| 84 | ) | ||
| 85 | { | ||
| 86 | HRESULT hr = S_OK; | ||
| 87 | |||
| 88 | pEngine->AddRef(); | ||
| 89 | m_pEngine = pEngine; | ||
| 90 | |||
| 91 | return hr; | ||
| 92 | } | ||
| 93 | |||
| 94 | virtual STDMETHODIMP OnDestroy( | ||
| 95 | __in BOOL /*fReload*/ | ||
| 96 | ) | ||
| 97 | { | ||
| 98 | return S_OK; | ||
| 99 | } | ||
| 100 | |||
| 101 | virtual STDMETHODIMP OnStartup() | ||
| 102 | { | ||
| 103 | return S_OK; | ||
| 104 | } | ||
| 105 | |||
| 106 | virtual STDMETHODIMP OnShutdown( | ||
| 107 | __inout BOOTSTRAPPER_SHUTDOWN_ACTION* /*pAction*/ | ||
| 108 | ) | ||
| 109 | { | ||
| 110 | return S_OK; | ||
| 111 | } | ||
| 112 | |||
| 113 | virtual STDMETHODIMP OnDetectBegin( | ||
| 114 | __in BOOL /*fCached*/, | ||
| 115 | __in BOOTSTRAPPER_REGISTRATION_TYPE /*registrationType*/, | ||
| 116 | __in DWORD /*cPackages*/, | ||
| 117 | __inout BOOL* /*pfCancel*/ | ||
| 118 | ) | ||
| 119 | { | ||
| 120 | return S_OK; | ||
| 121 | } | ||
| 122 | |||
| 123 | virtual STDMETHODIMP OnDetectForwardCompatibleBundle( | ||
| 124 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 125 | __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, | ||
| 126 | __in_z LPCWSTR /*wzBundleTag*/, | ||
| 127 | __in BOOL /*fPerMachine*/, | ||
| 128 | __in LPCWSTR /*wzVersion*/, | ||
| 129 | __in BOOL /*fMissingFromCache*/, | ||
| 130 | __inout BOOL* /*pfCancel*/ | ||
| 131 | ) | ||
| 132 | { | ||
| 133 | return S_OK; | ||
| 134 | } | ||
| 135 | |||
| 136 | virtual STDMETHODIMP OnDetectUpdateBegin( | ||
| 137 | __in_z LPCWSTR /*wzUpdateLocation*/, | ||
| 138 | __inout BOOL* /*pfCancel*/, | ||
| 139 | __inout BOOL* /*pfSkip*/ | ||
| 140 | ) | ||
| 141 | { | ||
| 142 | return S_OK; | ||
| 143 | } | ||
| 144 | |||
| 145 | virtual STDMETHODIMP OnDetectUpdate( | ||
| 146 | __in_z LPCWSTR /*wzUpdateLocation*/, | ||
| 147 | __in DWORD64 /*dw64Size*/, | ||
| 148 | __in_z_opt LPCWSTR /*wzHash*/, | ||
| 149 | __in BOOTSTRAPPER_UPDATE_HASH_TYPE /*hashAlgorithm*/, | ||
| 150 | __in LPCWSTR /*wzVersion*/, | ||
| 151 | __in_z LPCWSTR /*wzTitle*/, | ||
| 152 | __in_z LPCWSTR /*wzSummary*/, | ||
| 153 | __in_z LPCWSTR /*wzContentType*/, | ||
| 154 | __in_z LPCWSTR /*wzContent*/, | ||
| 155 | __inout BOOL* /*pfCancel*/, | ||
| 156 | __inout BOOL* /*pfStopProcessingUpdates*/ | ||
| 157 | ) | ||
| 158 | { | ||
| 159 | return S_OK; | ||
| 160 | } | ||
| 161 | |||
| 162 | virtual STDMETHODIMP OnDetectUpdateComplete( | ||
| 163 | __in HRESULT /*hrStatus*/, | ||
| 164 | __inout BOOL* /*pfIgnoreError*/ | ||
| 165 | ) | ||
| 166 | { | ||
| 167 | return S_OK; | ||
| 168 | } | ||
| 169 | |||
| 170 | virtual STDMETHODIMP OnDetectRelatedBundle( | ||
| 171 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 172 | __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, | ||
| 173 | __in_z LPCWSTR /*wzBundleTag*/, | ||
| 174 | __in BOOL /*fPerMachine*/, | ||
| 175 | __in LPCWSTR /*wzVersion*/, | ||
| 176 | __in BOOL /*fMissingFromCache*/, | ||
| 177 | __inout BOOL* /*pfCancel*/ | ||
| 178 | ) | ||
| 179 | { | ||
| 180 | return S_OK; | ||
| 181 | } | ||
| 182 | |||
| 183 | virtual STDMETHODIMP OnDetectPackageBegin( | ||
| 184 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 185 | __inout BOOL* /*pfCancel*/ | ||
| 186 | ) | ||
| 187 | { | ||
| 188 | return S_OK; | ||
| 189 | } | ||
| 190 | |||
| 191 | virtual STDMETHODIMP OnDetectCompatibleMsiPackage( | ||
| 192 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 193 | __in_z LPCWSTR /*wzCompatiblePackageId*/, | ||
| 194 | __in LPCWSTR /*wzCompatiblePackageVersion*/, | ||
| 195 | __inout BOOL* /*pfCancel*/ | ||
| 196 | ) | ||
| 197 | { | ||
| 198 | return S_OK; | ||
| 199 | } | ||
| 200 | |||
| 201 | virtual STDMETHODIMP OnDetectRelatedMsiPackage( | ||
| 202 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 203 | __in_z LPCWSTR /*wzUpgradeCode*/, | ||
| 204 | __in_z LPCWSTR /*wzProductCode*/, | ||
| 205 | __in BOOL /*fPerMachine*/, | ||
| 206 | __in LPCWSTR /*wzVersion*/, | ||
| 207 | __in BOOTSTRAPPER_RELATED_OPERATION /*operation*/, | ||
| 208 | __inout BOOL* /*pfCancel*/ | ||
| 209 | ) | ||
| 210 | { | ||
| 211 | return S_OK; | ||
| 212 | } | ||
| 213 | |||
| 214 | virtual STDMETHODIMP OnDetectPatchTarget( | ||
| 215 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 216 | __in_z LPCWSTR /*wzProductCode*/, | ||
| 217 | __in BOOTSTRAPPER_PACKAGE_STATE /*patchState*/, | ||
| 218 | __inout BOOL* /*pfCancel*/ | ||
| 219 | ) | ||
| 220 | { | ||
| 221 | return S_OK; | ||
| 222 | } | ||
| 223 | |||
| 224 | virtual STDMETHODIMP OnDetectMsiFeature( | ||
| 225 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 226 | __in_z LPCWSTR /*wzFeatureId*/, | ||
| 227 | __in BOOTSTRAPPER_FEATURE_STATE /*state*/, | ||
| 228 | __inout BOOL* /*pfCancel*/ | ||
| 229 | ) | ||
| 230 | { | ||
| 231 | return S_OK; | ||
| 232 | } | ||
| 233 | |||
| 234 | virtual STDMETHODIMP OnDetectPackageComplete( | ||
| 235 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 236 | __in HRESULT /*hrStatus*/, | ||
| 237 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, | ||
| 238 | __in BOOL /*fCached*/ | ||
| 239 | ) | ||
| 240 | { | ||
| 241 | return S_OK; | ||
| 242 | } | ||
| 243 | |||
| 244 | virtual STDMETHODIMP OnDetectComplete( | ||
| 245 | __in HRESULT /*hrStatus*/, | ||
| 246 | __in BOOL /*fEligibleForCleanup*/ | ||
| 247 | ) | ||
| 248 | { | ||
| 249 | return S_OK; | ||
| 250 | } | ||
| 251 | |||
| 252 | virtual STDMETHODIMP OnPlanBegin( | ||
| 253 | __in DWORD /*cPackages*/, | ||
| 254 | __inout BOOL* /*pfCancel*/ | ||
| 255 | ) | ||
| 256 | { | ||
| 257 | return S_OK; | ||
| 258 | } | ||
| 259 | |||
| 260 | virtual STDMETHODIMP OnPlanRelatedBundle( | ||
| 261 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 262 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, | ||
| 263 | __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/, | ||
| 264 | __inout BOOL* /*pfCancel*/ | ||
| 265 | ) | ||
| 266 | { | ||
| 267 | return S_OK; | ||
| 268 | } | ||
| 269 | |||
| 270 | virtual STDMETHODIMP OnPlanRollbackBoundary( | ||
| 271 | __in_z LPCWSTR /*wzRollbackBoundaryId*/, | ||
| 272 | __in BOOL /*fRecommendedTransaction*/, | ||
| 273 | __inout BOOL* /*pfTransaction*/, | ||
| 274 | __inout BOOL* /*pfCancel*/ | ||
| 275 | ) | ||
| 276 | { | ||
| 277 | return S_OK; | ||
| 278 | } | ||
| 279 | |||
| 280 | virtual STDMETHODIMP OnPlanPackageBegin( | ||
| 281 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 282 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, | ||
| 283 | __in BOOL /*fCached*/, | ||
| 284 | __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*installCondition*/, | ||
| 285 | __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*repairCondition*/, | ||
| 286 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, | ||
| 287 | __in BOOTSTRAPPER_CACHE_TYPE /*recommendedCacheType*/, | ||
| 288 | __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/, | ||
| 289 | __inout BOOTSTRAPPER_CACHE_TYPE* /*pRequestedCacheType*/, | ||
| 290 | __inout BOOL* /*pfCancel*/ | ||
| 291 | ) | ||
| 292 | { | ||
| 293 | return S_OK; | ||
| 294 | } | ||
| 295 | |||
| 296 | virtual STDMETHODIMP OnPlanCompatibleMsiPackageBegin( | ||
| 297 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 298 | __in_z LPCWSTR /*wzCompatiblePackageId*/, | ||
| 299 | __in LPCWSTR /*wzCompatiblePackageVersion*/, | ||
| 300 | __in BOOL /*fRecommendedRemove*/, | ||
| 301 | __inout BOOL* /*pfRequestRemove*/, | ||
| 302 | __inout BOOL* /*pfCancel*/ | ||
| 303 | ) | ||
| 304 | { | ||
| 305 | return S_OK; | ||
| 306 | } | ||
| 307 | |||
| 308 | virtual STDMETHODIMP OnPlanCompatibleMsiPackageComplete( | ||
| 309 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 310 | __in_z LPCWSTR /*wzCompatiblePackageId*/, | ||
| 311 | __in HRESULT /*hrStatus*/, | ||
| 312 | __in BOOL /*fRequestedRemove*/ | ||
| 313 | ) | ||
| 314 | { | ||
| 315 | return S_OK; | ||
| 316 | } | ||
| 317 | |||
| 318 | virtual STDMETHODIMP OnPlanPatchTarget( | ||
| 319 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 320 | __in_z LPCWSTR /*wzProductCode*/, | ||
| 321 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, | ||
| 322 | __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/, | ||
| 323 | __inout BOOL* /*pfCancel*/ | ||
| 324 | ) | ||
| 325 | { | ||
| 326 | return S_OK; | ||
| 327 | } | ||
| 328 | |||
| 329 | virtual STDMETHODIMP OnPlanMsiFeature( | ||
| 330 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 331 | __in_z LPCWSTR /*wzFeatureId*/, | ||
| 332 | __in BOOTSTRAPPER_FEATURE_STATE /*recommendedState*/, | ||
| 333 | __inout BOOTSTRAPPER_FEATURE_STATE* /*pRequestedState*/, | ||
| 334 | __inout BOOL* /*pfCancel*/ | ||
| 335 | ) | ||
| 336 | { | ||
| 337 | return S_OK; | ||
| 338 | } | ||
| 339 | |||
| 340 | virtual STDMETHODIMP OnPlanMsiPackage( | ||
| 341 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 342 | __in BOOL /*fExecute*/, | ||
| 343 | __in BOOTSTRAPPER_ACTION_STATE /*action*/, | ||
| 344 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING /*recommendedFileVersioning*/, | ||
| 345 | __inout BOOL* /*pfCancel*/, | ||
| 346 | __inout BURN_MSI_PROPERTY* /*pActionMsiProperty*/, | ||
| 347 | __inout INSTALLUILEVEL* /*pUiLevel*/, | ||
| 348 | __inout BOOL* /*pfDisableExternalUiHandler*/, | ||
| 349 | __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* /*pFileVersioning*/ | ||
| 350 | ) | ||
| 351 | { | ||
| 352 | return S_OK; | ||
| 353 | } | ||
| 354 | |||
| 355 | virtual STDMETHODIMP OnPlanPackageComplete( | ||
| 356 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 357 | __in HRESULT /*hrStatus*/, | ||
| 358 | __in BOOTSTRAPPER_REQUEST_STATE /*requested*/ | ||
| 359 | ) | ||
| 360 | { | ||
| 361 | return S_OK; | ||
| 362 | } | ||
| 363 | |||
| 364 | virtual STDMETHODIMP OnPlannedCompatiblePackage( | ||
| 365 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 366 | __in_z LPCWSTR /*wzCompatiblePackageId*/, | ||
| 367 | __in BOOL /*fRemove*/ | ||
| 368 | ) | ||
| 369 | { | ||
| 370 | return S_OK; | ||
| 371 | } | ||
| 372 | |||
| 373 | virtual STDMETHODIMP OnPlannedPackage( | ||
| 374 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 375 | __in BOOTSTRAPPER_ACTION_STATE /*execute*/, | ||
| 376 | __in BOOTSTRAPPER_ACTION_STATE /*rollback*/, | ||
| 377 | __in BOOL /*fPlannedCache*/, | ||
| 378 | __in BOOL /*fPlannedUncache*/ | ||
| 379 | ) | ||
| 380 | { | ||
| 381 | return S_OK; | ||
| 382 | } | ||
| 383 | |||
| 384 | virtual STDMETHODIMP OnPlanComplete( | ||
| 385 | __in HRESULT /*hrStatus*/ | ||
| 386 | ) | ||
| 387 | { | ||
| 388 | return S_OK; | ||
| 389 | } | ||
| 390 | |||
| 391 | virtual STDMETHODIMP OnApplyBegin( | ||
| 392 | __in DWORD /*dwPhaseCount*/, | ||
| 393 | __inout BOOL* /*pfCancel*/ | ||
| 394 | ) | ||
| 395 | { | ||
| 396 | return S_OK; | ||
| 397 | } | ||
| 398 | |||
| 399 | virtual STDMETHODIMP OnElevateBegin( | ||
| 400 | __inout BOOL* /*pfCancel*/ | ||
| 401 | ) | ||
| 402 | { | ||
| 403 | return S_OK; | ||
| 404 | } | ||
| 405 | |||
| 406 | virtual STDMETHODIMP OnElevateComplete( | ||
| 407 | __in HRESULT /*hrStatus*/ | ||
| 408 | ) | ||
| 409 | { | ||
| 410 | return S_OK; | ||
| 411 | } | ||
| 412 | |||
| 413 | virtual STDMETHODIMP OnProgress( | ||
| 414 | __in DWORD /*dwProgressPercentage*/, | ||
| 415 | __in DWORD /*dwOverallProgressPercentage*/, | ||
| 416 | __inout BOOL* /*pfCancel*/ | ||
| 417 | ) | ||
| 418 | { | ||
| 419 | return IDNOACTION; | ||
| 420 | } | ||
| 421 | |||
| 422 | virtual STDMETHODIMP OnError( | ||
| 423 | __in BOOTSTRAPPER_ERROR_TYPE /*errorType*/, | ||
| 424 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 425 | __in DWORD /*dwCode*/, | ||
| 426 | __in_z LPCWSTR /*wzError*/, | ||
| 427 | __in DWORD /*dwUIHint*/, | ||
| 428 | __in DWORD /*cData*/, | ||
| 429 | __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, | ||
| 430 | __in int /*nRecommendation*/, | ||
| 431 | __inout int* /*pResult*/ | ||
| 432 | ) | ||
| 433 | { | ||
| 434 | return S_OK; | ||
| 435 | } | ||
| 436 | |||
| 437 | virtual STDMETHODIMP OnRegisterBegin( | ||
| 438 | __in BOOTSTRAPPER_REGISTRATION_TYPE /*recommendedRegistrationType*/, | ||
| 439 | __inout BOOL* /*pfCancel*/, | ||
| 440 | __inout BOOTSTRAPPER_REGISTRATION_TYPE* /*pRegistrationType*/ | ||
| 441 | ) | ||
| 442 | { | ||
| 443 | return S_OK; | ||
| 444 | } | ||
| 445 | |||
| 446 | virtual STDMETHODIMP OnRegisterComplete( | ||
| 447 | __in HRESULT /*hrStatus*/ | ||
| 448 | ) | ||
| 449 | { | ||
| 450 | return S_OK; | ||
| 451 | } | ||
| 452 | |||
| 453 | virtual STDMETHODIMP OnCacheBegin( | ||
| 454 | __inout BOOL* /*pfCancel*/ | ||
| 455 | ) | ||
| 456 | { | ||
| 457 | return S_OK; | ||
| 458 | } | ||
| 459 | |||
| 460 | virtual STDMETHODIMP OnCachePackageBegin( | ||
| 461 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 462 | __in DWORD /*cCachePayloads*/, | ||
| 463 | __in DWORD64 /*dw64PackageCacheSize*/, | ||
| 464 | __in BOOL /*fVital*/, | ||
| 465 | __inout BOOL* /*pfCancel*/ | ||
| 466 | ) | ||
| 467 | { | ||
| 468 | return S_OK; | ||
| 469 | } | ||
| 470 | |||
| 471 | virtual STDMETHODIMP OnCacheAcquireBegin( | ||
| 472 | __in_z LPCWSTR /*wzPackageOrContainerId*/, | ||
| 473 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 474 | __in_z LPCWSTR /*wzSource*/, | ||
| 475 | __in_z_opt LPCWSTR /*wzDownloadUrl*/, | ||
| 476 | __in_z_opt LPCWSTR /*wzPayloadContainerId*/, | ||
| 477 | __in BOOTSTRAPPER_CACHE_OPERATION /*recommendation*/, | ||
| 478 | __inout BOOTSTRAPPER_CACHE_OPERATION* /*pAction*/, | ||
| 479 | __inout BOOL* /*pfCancel*/ | ||
| 480 | ) | ||
| 481 | { | ||
| 482 | return S_OK; | ||
| 483 | } | ||
| 484 | |||
| 485 | virtual STDMETHODIMP OnCacheAcquireProgress( | ||
| 486 | __in_z LPCWSTR /*wzPackageOrContainerId*/, | ||
| 487 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 488 | __in DWORD64 /*dw64Progress*/, | ||
| 489 | __in DWORD64 /*dw64Total*/, | ||
| 490 | __in DWORD /*dwOverallPercentage*/, | ||
| 491 | __inout BOOL* /*pfCancel*/ | ||
| 492 | ) | ||
| 493 | { | ||
| 494 | return S_OK; | ||
| 495 | } | ||
| 496 | |||
| 497 | virtual STDMETHODIMP OnCacheAcquireResolving( | ||
| 498 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, | ||
| 499 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 500 | __in_z LPCWSTR* /*rgSearchPaths*/, | ||
| 501 | __in DWORD /*cSearchPaths*/, | ||
| 502 | __in BOOL /*fFoundLocal*/, | ||
| 503 | __in DWORD /*dwRecommendedSearchPath*/, | ||
| 504 | __in_z_opt LPCWSTR /*wzDownloadUrl*/, | ||
| 505 | __in_z_opt LPCWSTR /*wzPayloadContainerId*/, | ||
| 506 | __in BOOTSTRAPPER_CACHE_RESOLVE_OPERATION /*recommendation*/, | ||
| 507 | __inout DWORD* /*pdwChosenSearchPath*/, | ||
| 508 | __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* /*pAction*/, | ||
| 509 | __inout BOOL* /*pfCancel*/ | ||
| 510 | ) | ||
| 511 | { | ||
| 512 | return S_OK; | ||
| 513 | } | ||
| 514 | |||
| 515 | virtual STDMETHODIMP OnCacheAcquireComplete( | ||
| 516 | __in_z LPCWSTR /*wzPackageOrContainerId*/, | ||
| 517 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 518 | __in HRESULT /*hrStatus*/, | ||
| 519 | __in BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION /*recommendation*/, | ||
| 520 | __inout BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION* /*pAction*/ | ||
| 521 | ) | ||
| 522 | { | ||
| 523 | return S_OK; | ||
| 524 | } | ||
| 525 | |||
| 526 | virtual STDMETHODIMP OnCacheVerifyBegin( | ||
| 527 | __in_z LPCWSTR /*wzPackageOrContainerId*/, | ||
| 528 | __in_z LPCWSTR /*wzPayloadId*/, | ||
| 529 | __inout BOOL* /*pfCancel*/ | ||
| 530 | ) | ||
| 531 | { | ||
| 532 | return S_OK; | ||
| 533 | } | ||
| 534 | |||
| 535 | virtual STDMETHODIMP OnCacheVerifyProgress( | ||
| 536 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, | ||
| 537 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 538 | __in DWORD64 /*dw64Progress*/, | ||
| 539 | __in DWORD64 /*dw64Total*/, | ||
| 540 | __in DWORD /*dwOverallPercentage*/, | ||
| 541 | __in BOOTSTRAPPER_CACHE_VERIFY_STEP /*verifyStep*/, | ||
| 542 | __inout BOOL* /*pfCancel*/ | ||
| 543 | ) | ||
| 544 | { | ||
| 545 | return S_OK; | ||
| 546 | } | ||
| 547 | |||
| 548 | virtual STDMETHODIMP OnCacheVerifyComplete( | ||
| 549 | __in_z LPCWSTR /*wzPackageOrContainerId*/, | ||
| 550 | __in_z LPCWSTR /*wzPayloadId*/, | ||
| 551 | __in HRESULT /*hrStatus*/, | ||
| 552 | __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION /*recommendation*/, | ||
| 553 | __inout BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION* /*pAction*/ | ||
| 554 | ) | ||
| 555 | { | ||
| 556 | return S_OK; | ||
| 557 | } | ||
| 558 | |||
| 559 | virtual STDMETHODIMP OnCachePackageComplete( | ||
| 560 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 561 | __in HRESULT /*hrStatus*/, | ||
| 562 | __in BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION /*recommendation*/, | ||
| 563 | __inout BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION* /*pAction*/ | ||
| 564 | ) | ||
| 565 | { | ||
| 566 | return S_OK; | ||
| 567 | } | ||
| 568 | |||
| 569 | virtual STDMETHODIMP OnCacheComplete( | ||
| 570 | __in HRESULT /*hrStatus*/ | ||
| 571 | ) | ||
| 572 | { | ||
| 573 | return S_OK; | ||
| 574 | } | ||
| 575 | |||
| 576 | virtual STDMETHODIMP OnExecuteBegin( | ||
| 577 | __in DWORD /*cExecutingPackages*/, | ||
| 578 | __inout BOOL* /*pfCancel*/ | ||
| 579 | ) | ||
| 580 | { | ||
| 581 | return S_OK; | ||
| 582 | } | ||
| 583 | |||
| 584 | virtual STDMETHODIMP OnExecutePackageBegin( | ||
| 585 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 586 | __in BOOL /*fExecute*/, | ||
| 587 | __in BOOTSTRAPPER_ACTION_STATE /*action*/, | ||
| 588 | __in INSTALLUILEVEL /*uiLevel*/, | ||
| 589 | __in BOOL /*fDisableExternalUiHandler*/, | ||
| 590 | __inout BOOL* /*pfCancel*/ | ||
| 591 | ) | ||
| 592 | { | ||
| 593 | return S_OK; | ||
| 594 | } | ||
| 595 | |||
| 596 | virtual STDMETHODIMP OnExecutePatchTarget( | ||
| 597 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 598 | __in_z LPCWSTR /*wzTargetProductCode*/, | ||
| 599 | __inout BOOL* /*pfCancel*/ | ||
| 600 | ) | ||
| 601 | { | ||
| 602 | return S_OK; | ||
| 603 | } | ||
| 604 | |||
| 605 | virtual STDMETHODIMP OnExecuteProgress( | ||
| 606 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 607 | __in DWORD /*dwProgressPercentage*/, | ||
| 608 | __in DWORD /*dwOverallProgressPercentage*/, | ||
| 609 | __inout BOOL* /*pfCancel*/ | ||
| 610 | ) | ||
| 611 | { | ||
| 612 | return S_OK; | ||
| 613 | } | ||
| 614 | |||
| 615 | virtual STDMETHODIMP OnExecuteMsiMessage( | ||
| 616 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 617 | __in INSTALLMESSAGE /*messageType*/, | ||
| 618 | __in DWORD /*dwUIHint*/, | ||
| 619 | __in_z LPCWSTR /*wzMessage*/, | ||
| 620 | __in DWORD /*cData*/, | ||
| 621 | __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, | ||
| 622 | __in int /*nRecommendation*/, | ||
| 623 | __inout int* /*pResult*/ | ||
| 624 | ) | ||
| 625 | { | ||
| 626 | return S_OK; | ||
| 627 | } | ||
| 628 | |||
| 629 | virtual STDMETHODIMP OnExecuteFilesInUse( | ||
| 630 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 631 | __in DWORD /*cFiles*/, | ||
| 632 | __in_ecount_z(cFiles) LPCWSTR* /*rgwzFiles*/, | ||
| 633 | __in int /*nRecommendation*/, | ||
| 634 | __in BOOTSTRAPPER_FILES_IN_USE_TYPE /*source*/, | ||
| 635 | __inout int* /*pResult*/ | ||
| 636 | ) | ||
| 637 | { | ||
| 638 | return S_OK; | ||
| 639 | } | ||
| 640 | |||
| 641 | virtual STDMETHODIMP OnExecutePackageComplete( | ||
| 642 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 643 | __in HRESULT /*hrStatus*/, | ||
| 644 | __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, | ||
| 645 | __in BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION /*recommendation*/, | ||
| 646 | __inout BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION* /*pAction*/ | ||
| 647 | ) | ||
| 648 | { | ||
| 649 | return S_OK; | ||
| 650 | } | ||
| 651 | |||
| 652 | virtual STDMETHODIMP OnExecuteComplete( | ||
| 653 | __in HRESULT /*hrStatus*/ | ||
| 654 | ) | ||
| 655 | { | ||
| 656 | return S_OK; | ||
| 657 | } | ||
| 658 | |||
| 659 | virtual STDMETHODIMP OnUnregisterBegin( | ||
| 660 | __in BOOTSTRAPPER_REGISTRATION_TYPE /*recommendedRegistrationType*/, | ||
| 661 | __inout BOOTSTRAPPER_REGISTRATION_TYPE* /*pRegistrationType*/ | ||
| 662 | ) | ||
| 663 | { | ||
| 664 | return S_OK; | ||
| 665 | } | ||
| 666 | |||
| 667 | virtual STDMETHODIMP OnUnregisterComplete( | ||
| 668 | __in HRESULT /*hrStatus*/ | ||
| 669 | ) | ||
| 670 | { | ||
| 671 | return S_OK; | ||
| 672 | } | ||
| 673 | |||
| 674 | virtual STDMETHODIMP OnApplyComplete( | ||
| 675 | __in HRESULT /*hrStatus*/, | ||
| 676 | __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, | ||
| 677 | __in BOOTSTRAPPER_APPLYCOMPLETE_ACTION /*recommendation*/, | ||
| 678 | __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* /*pAction*/ | ||
| 679 | ) | ||
| 680 | { | ||
| 681 | return S_OK; | ||
| 682 | } | ||
| 683 | |||
| 684 | virtual STDMETHODIMP OnLaunchApprovedExeBegin( | ||
| 685 | __inout BOOL* /*pfCancel*/ | ||
| 686 | ) | ||
| 687 | { | ||
| 688 | return S_OK; | ||
| 689 | } | ||
| 690 | |||
| 691 | virtual STDMETHODIMP OnLaunchApprovedExeComplete( | ||
| 692 | __in HRESULT /*hrStatus*/, | ||
| 693 | __in DWORD /*dwProcessId*/ | ||
| 694 | ) | ||
| 695 | { | ||
| 696 | return S_OK; | ||
| 697 | } | ||
| 698 | |||
| 699 | virtual STDMETHODIMP OnBeginMsiTransactionBegin( | ||
| 700 | __in_z LPCWSTR /*wzTransactionId*/, | ||
| 701 | __inout BOOL* /*pfCancel*/ | ||
| 702 | ) | ||
| 703 | { | ||
| 704 | return S_OK; | ||
| 705 | } | ||
| 706 | |||
| 707 | virtual STDMETHODIMP OnBeginMsiTransactionComplete( | ||
| 708 | __in_z LPCWSTR /*wzTransactionId*/, | ||
| 709 | __in HRESULT /*hrStatus*/ | ||
| 710 | ) | ||
| 711 | { | ||
| 712 | return S_OK; | ||
| 713 | } | ||
| 714 | |||
| 715 | virtual STDMETHODIMP OnCommitMsiTransactionBegin( | ||
| 716 | __in_z LPCWSTR /*wzTransactionId*/, | ||
| 717 | __inout BOOL* /*pfCancel*/ | ||
| 718 | ) | ||
| 719 | { | ||
| 720 | return S_OK; | ||
| 721 | } | ||
| 722 | |||
| 723 | virtual STDMETHODIMP OnCommitMsiTransactionComplete( | ||
| 724 | __in_z LPCWSTR /*wzTransactionId*/, | ||
| 725 | __in HRESULT /*hrStatus*/, | ||
| 726 | __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, | ||
| 727 | __in BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION /*recommendation*/, | ||
| 728 | __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* /*pAction*/ | ||
| 729 | ) | ||
| 730 | { | ||
| 731 | return S_OK; | ||
| 732 | } | ||
| 733 | |||
| 734 | virtual STDMETHODIMP OnRollbackMsiTransactionBegin( | ||
| 735 | __in_z LPCWSTR /*wzTransactionId*/ | ||
| 736 | ) | ||
| 737 | { | ||
| 738 | return S_OK; | ||
| 739 | } | ||
| 740 | |||
| 741 | virtual STDMETHODIMP OnRollbackMsiTransactionComplete( | ||
| 742 | __in_z LPCWSTR /*wzTransactionId*/, | ||
| 743 | __in HRESULT /*hrStatus*/, | ||
| 744 | __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, | ||
| 745 | __in BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION /*recommendation*/, | ||
| 746 | __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* /*pAction*/ | ||
| 747 | ) | ||
| 748 | { | ||
| 749 | return S_OK; | ||
| 750 | } | ||
| 751 | |||
| 752 | virtual STDMETHODIMP OnPauseAutomaticUpdatesBegin( | ||
| 753 | ) | ||
| 754 | { | ||
| 755 | return S_OK; | ||
| 756 | } | ||
| 757 | |||
| 758 | virtual STDMETHODIMP OnPauseAutomaticUpdatesComplete( | ||
| 759 | __in HRESULT /*hrStatus*/ | ||
| 760 | ) | ||
| 761 | { | ||
| 762 | return S_OK; | ||
| 763 | } | ||
| 764 | |||
| 765 | virtual STDMETHODIMP OnSystemRestorePointBegin( | ||
| 766 | ) | ||
| 767 | { | ||
| 768 | return S_OK; | ||
| 769 | } | ||
| 770 | |||
| 771 | virtual STDMETHODIMP OnSystemRestorePointComplete( | ||
| 772 | __in HRESULT /*hrStatus*/ | ||
| 773 | ) | ||
| 774 | { | ||
| 775 | return S_OK; | ||
| 776 | } | ||
| 777 | |||
| 778 | virtual STDMETHODIMP OnPlanForwardCompatibleBundle( | ||
| 779 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 780 | __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, | ||
| 781 | __in_z LPCWSTR /*wzBundleTag*/, | ||
| 782 | __in BOOL /*fPerMachine*/, | ||
| 783 | __in LPCWSTR /*wzVersion*/, | ||
| 784 | __in BOOL /*fRecommendedIgnoreBundle*/, | ||
| 785 | __inout BOOL* /*pfCancel*/, | ||
| 786 | __inout BOOL* /*pfIgnoreBundle*/ | ||
| 787 | ) | ||
| 788 | { | ||
| 789 | return S_OK; | ||
| 790 | } | ||
| 791 | |||
| 792 | virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyBegin( | ||
| 793 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, | ||
| 794 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 795 | __inout BOOL* /*pfCancel*/ | ||
| 796 | ) | ||
| 797 | { | ||
| 798 | return S_OK; | ||
| 799 | } | ||
| 800 | |||
| 801 | virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyProgress( | ||
| 802 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, | ||
| 803 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 804 | __in DWORD64 /*dw64Progress*/, | ||
| 805 | __in DWORD64 /*dw64Total*/, | ||
| 806 | __in DWORD /*dwOverallPercentage*/, | ||
| 807 | __inout BOOL* /*pfCancel*/ | ||
| 808 | ) | ||
| 809 | { | ||
| 810 | return S_OK; | ||
| 811 | } | ||
| 812 | |||
| 813 | virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyComplete( | ||
| 814 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, | ||
| 815 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 816 | __in HRESULT /*hrStatus*/ | ||
| 817 | ) | ||
| 818 | { | ||
| 819 | return S_OK; | ||
| 820 | } | ||
| 821 | |||
| 822 | virtual STDMETHODIMP OnCachePayloadExtractBegin( | ||
| 823 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, | ||
| 824 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 825 | __inout BOOL* /*pfCancel*/ | ||
| 826 | ) | ||
| 827 | { | ||
| 828 | return S_OK; | ||
| 829 | } | ||
| 830 | |||
| 831 | virtual STDMETHODIMP OnCachePayloadExtractProgress( | ||
| 832 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, | ||
| 833 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 834 | __in DWORD64 /*dw64Progress*/, | ||
| 835 | __in DWORD64 /*dw64Total*/, | ||
| 836 | __in DWORD /*dwOverallPercentage*/, | ||
| 837 | __inout BOOL* /*pfCancel*/ | ||
| 838 | ) | ||
| 839 | { | ||
| 840 | return S_OK; | ||
| 841 | } | ||
| 842 | |||
| 843 | virtual STDMETHODIMP OnCachePayloadExtractComplete( | ||
| 844 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, | ||
| 845 | __in_z_opt LPCWSTR /*wzPayloadId*/, | ||
| 846 | __in HRESULT /*hrStatus*/ | ||
| 847 | ) | ||
| 848 | { | ||
| 849 | return S_OK; | ||
| 850 | } | ||
| 851 | |||
| 852 | virtual STDMETHODIMP OnPlanRestoreRelatedBundle( | ||
| 853 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 854 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, | ||
| 855 | __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/, | ||
| 856 | __inout BOOL* /*pfCancel*/ | ||
| 857 | ) | ||
| 858 | { | ||
| 859 | return S_OK; | ||
| 860 | } | ||
| 861 | |||
| 862 | virtual STDMETHODIMP OnPlanRelatedBundleType( | ||
| 863 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 864 | __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE /*recommendedType*/, | ||
| 865 | __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* /*pRequestedType*/, | ||
| 866 | __inout BOOL* /*pfCancel*/ | ||
| 867 | ) | ||
| 868 | { | ||
| 869 | return S_OK; | ||
| 870 | } | ||
| 871 | |||
| 872 | virtual STDMETHODIMP OnApplyDowngrade( | ||
| 873 | __in HRESULT /*hrRecommended*/, | ||
| 874 | __in HRESULT* /*phrStatus*/ | ||
| 875 | ) | ||
| 876 | { | ||
| 877 | return S_OK; | ||
| 878 | } | ||
| 879 | |||
| 880 | virtual STDMETHODIMP OnExecuteProcessCancel( | ||
| 881 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 882 | __in DWORD /*dwProcessId*/, | ||
| 883 | __in BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION /*recommendation*/, | ||
| 884 | __inout BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION* /*pAction*/ | ||
| 885 | ) | ||
| 886 | { | ||
| 887 | return S_OK; | ||
| 888 | } | ||
| 889 | |||
| 890 | virtual STDMETHODIMP OnDetectRelatedBundlePackage( | ||
| 891 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 892 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 893 | __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, | ||
| 894 | __in BOOL /*fPerMachine*/, | ||
| 895 | __in LPCWSTR /*wzVersion*/, | ||
| 896 | __inout BOOL* /*pfCancel*/ | ||
| 897 | ) | ||
| 898 | { | ||
| 899 | return S_OK; | ||
| 900 | } | ||
| 901 | |||
| 902 | virtual STDMETHODIMP OnCachePackageNonVitalValidationFailure( | ||
| 903 | __in_z LPCWSTR /*wzPackageId*/, | ||
| 904 | __in HRESULT /*hrStatus*/, | ||
| 905 | __in BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION /*recommendation*/, | ||
| 906 | __inout BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION* /*pAction*/ | ||
| 907 | ) | ||
| 908 | { | ||
| 909 | return S_OK; | ||
| 910 | } | ||
| 911 | |||
| 912 | public: // IBAFunctions | ||
| 913 | virtual STDMETHODIMP OnPlan( | ||
| 914 | ) | ||
| 915 | { | ||
| 916 | return S_OK; | ||
| 917 | } | ||
| 918 | |||
| 919 | virtual STDMETHODIMP OnThemeLoaded( | ||
| 920 | __in HWND hWnd | ||
| 921 | ) | ||
| 922 | { | ||
| 923 | HRESULT hr = S_OK; | ||
| 924 | |||
| 925 | m_hwndParent = hWnd; | ||
| 926 | |||
| 927 | return hr; | ||
| 928 | } | ||
| 929 | |||
| 930 | virtual STDMETHODIMP WndProc( | ||
| 931 | __in HWND /*hWnd*/, | ||
| 932 | __in UINT /*uMsg*/, | ||
| 933 | __in WPARAM /*wParam*/, | ||
| 934 | __in LPARAM /*lParam*/, | ||
| 935 | __inout BOOL* /*pfProcessed*/, | ||
| 936 | __inout LRESULT* /*plResult*/ | ||
| 937 | ) | ||
| 938 | { | ||
| 939 | return S_OK; | ||
| 940 | } | ||
| 941 | |||
| 942 | virtual STDMETHODIMP BAFunctionsProc( | ||
| 943 | __in BA_FUNCTIONS_MESSAGE /*message*/, | ||
| 944 | __in const LPVOID /*pvArgs*/, | ||
| 945 | __inout LPVOID /*pvResults*/, | ||
| 946 | __in_opt LPVOID /*pvContext*/ | ||
| 947 | ) | ||
| 948 | { | ||
| 949 | return E_NOTIMPL; | ||
| 950 | } | ||
| 951 | |||
| 952 | virtual STDMETHODIMP OnThemeControlLoading( | ||
| 953 | __in LPCWSTR /*wzName*/, | ||
| 954 | __inout BOOL* /*pfProcessed*/, | ||
| 955 | __inout WORD* /*pwId*/, | ||
| 956 | __inout DWORD* /*pdwAutomaticBehaviorType*/ | ||
| 957 | ) | ||
| 958 | { | ||
| 959 | return S_OK; | ||
| 960 | } | ||
| 961 | |||
| 962 | virtual STDMETHODIMP OnThemeControlWmCommand( | ||
| 963 | __in WPARAM /*wParam*/, | ||
| 964 | __in LPCWSTR /*wzName*/, | ||
| 965 | __in WORD /*wId*/, | ||
| 966 | __in HWND /*hWnd*/, | ||
| 967 | __inout BOOL* /*pfProcessed*/, | ||
| 968 | __inout LRESULT* /*plResult*/ | ||
| 969 | ) | ||
| 970 | { | ||
| 971 | return S_OK; | ||
| 972 | } | ||
| 973 | |||
| 974 | virtual STDMETHODIMP OnThemeControlWmNotify( | ||
| 975 | __in LPNMHDR /*lParam*/, | ||
| 976 | __in LPCWSTR /*wzName*/, | ||
| 977 | __in WORD /*wId*/, | ||
| 978 | __in HWND /*hWnd*/, | ||
| 979 | __inout BOOL* /*pfProcessed*/, | ||
| 980 | __inout LRESULT* /*plResult*/ | ||
| 981 | ) | ||
| 982 | { | ||
| 983 | return S_OK; | ||
| 984 | } | ||
| 985 | |||
| 986 | virtual STDMETHODIMP OnThemeControlLoaded( | ||
| 987 | __in LPCWSTR /*wzName*/, | ||
| 988 | __in WORD /*wId*/, | ||
| 989 | __in HWND /*hWnd*/, | ||
| 990 | __inout BOOL* /*pfProcessed*/ | ||
| 991 | ) | ||
| 992 | { | ||
| 993 | return S_OK; | ||
| 994 | } | ||
| 995 | |||
| 996 | protected: | ||
| 997 | CBalBaseBAFunctions(HMODULE hModule) | ||
| 998 | { | ||
| 999 | m_cReferences = 1; | ||
| 1000 | m_hModule = hModule; | ||
| 1001 | |||
| 1002 | m_hwndParent = NULL; | ||
| 1003 | m_pEngine = NULL; | ||
| 1004 | } | ||
| 1005 | |||
| 1006 | virtual ~CBalBaseBAFunctions() | ||
| 1007 | { | ||
| 1008 | ReleaseNullObject(m_pEngine); | ||
| 1009 | } | ||
| 1010 | |||
| 1011 | private: | ||
| 1012 | long m_cReferences; | ||
| 1013 | |||
| 1014 | protected: | ||
| 1015 | IBootstrapperEngine* m_pEngine; | ||
| 1016 | HMODULE m_hModule; | ||
| 1017 | HWND m_hwndParent; | ||
| 1018 | }; | ||
diff --git a/src/ext/Bal/wixstdfn/inc/BalBaseBAFunctionsProc.h b/src/ext/Bal/wixstdfn/inc/BalBaseBAFunctionsProc.h new file mode 100644 index 00000000..65eeb0b4 --- /dev/null +++ b/src/ext/Bal/wixstdfn/inc/BalBaseBAFunctionsProc.h | |||
| @@ -0,0 +1,15 @@ | |||
| 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. | ||
| 3 | |||
| 4 | /******************************************************************* | ||
| 5 | BalBaseBAFunctionsProc - requires pvContext to be of type IBAFunctions. | ||
| 6 | Provides a default mapping between the message based BAFunctions interface and | ||
| 7 | the COM-based BAFunctions interface. | ||
| 8 | |||
| 9 | *******************************************************************/ | ||
| 10 | HRESULT WINAPI BalBaseBAFunctionsProc( | ||
| 11 | __in BA_FUNCTIONS_MESSAGE message, | ||
| 12 | __in const LPVOID pvArgs, | ||
| 13 | __inout LPVOID pvResults, | ||
| 14 | __in_opt LPVOID pvContext | ||
| 15 | ); | ||
diff --git a/src/ext/Bal/wixstdfn/inc/IBAFunctions.h b/src/ext/Bal/wixstdfn/inc/IBAFunctions.h new file mode 100644 index 00000000..f54ae339 --- /dev/null +++ b/src/ext/Bal/wixstdfn/inc/IBAFunctions.h | |||
| @@ -0,0 +1,75 @@ | |||
| 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. | ||
| 3 | |||
| 4 | |||
| 5 | #include <IBootstrapperApplication.h> | ||
| 6 | #include <BAFunctions.h> | ||
| 7 | |||
| 8 | DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49C7-BE19-479776F8AE96") | ||
| 9 | { | ||
| 10 | // OnThemeLoaded - Called after the BA finished loading all the controls for the theme. | ||
| 11 | // | ||
| 12 | STDMETHOD(OnThemeLoaded)( | ||
| 13 | __in HWND hWnd | ||
| 14 | ) = 0; | ||
| 15 | |||
| 16 | // WndProc - Called if the BA hasn't handled the message. | ||
| 17 | // | ||
| 18 | STDMETHOD(WndProc)( | ||
| 19 | __in HWND hWnd, | ||
| 20 | __in UINT uMsg, | ||
| 21 | __in WPARAM wParam, | ||
| 22 | __in LPARAM lParam, | ||
| 23 | __inout BOOL* pfProcessed, | ||
| 24 | __inout LRESULT* plResult | ||
| 25 | ) = 0; | ||
| 26 | |||
| 27 | // BAFunctionsProc - The PFN_BA_FUNCTIONS_PROC can call this method to give the BAFunctions raw access to the callback from WixStdBA. | ||
| 28 | // This might be used to help the BAFunctions support more than one version of the engine/WixStdBA. | ||
| 29 | STDMETHOD(BAFunctionsProc)( | ||
| 30 | __in BA_FUNCTIONS_MESSAGE message, | ||
| 31 | __in const LPVOID pvArgs, | ||
| 32 | __inout LPVOID pvResults, | ||
| 33 | __in_opt LPVOID pvContext | ||
| 34 | ) = 0; | ||
| 35 | |||
| 36 | // OnThemeControlLoading - Called while creating a control for the theme. | ||
| 37 | // | ||
| 38 | STDMETHOD(OnThemeControlLoading)( | ||
| 39 | __in LPCWSTR wzName, | ||
| 40 | __inout BOOL* pfProcessed, | ||
| 41 | __inout WORD* pwId, | ||
| 42 | __inout DWORD* pdwAutomaticBehaviorType | ||
| 43 | ) = 0; | ||
| 44 | |||
| 45 | // OnThemeControlWmCommand - Called when WM_COMMAND is received for a control. | ||
| 46 | // | ||
| 47 | STDMETHOD(OnThemeControlWmCommand)( | ||
| 48 | __in WPARAM wParam, | ||
| 49 | __in LPCWSTR wzName, | ||
| 50 | __in WORD wId, | ||
| 51 | __in HWND hWnd, | ||
| 52 | __inout BOOL* pfProcessed, | ||
| 53 | __inout LRESULT* plResult | ||
| 54 | ) = 0; | ||
| 55 | |||
| 56 | // OnThemeControlWmNotify - Called when WM_NOTIFY is received for a control. | ||
| 57 | // | ||
| 58 | STDMETHOD(OnThemeControlWmNotify)( | ||
| 59 | __in LPNMHDR lParam, | ||
| 60 | __in LPCWSTR wzName, | ||
| 61 | __in WORD wId, | ||
| 62 | __in HWND hWnd, | ||
| 63 | __inout BOOL* pfProcessed, | ||
| 64 | __inout LRESULT* plResult | ||
| 65 | ) = 0; | ||
| 66 | |||
| 67 | // OnThemeControlLoaded - Called after a control was created for the theme. | ||
| 68 | // | ||
| 69 | STDMETHOD(OnThemeControlLoaded)( | ||
| 70 | __in LPCWSTR wzName, | ||
| 71 | __in WORD wId, | ||
| 72 | __in HWND hWnd, | ||
| 73 | __inout BOOL* pfProcessed | ||
| 74 | ) = 0; | ||
| 75 | }; | ||
diff --git a/src/ext/Bal/wixstdfn/precomp.cpp b/src/ext/Bal/wixstdfn/precomp.cpp new file mode 100644 index 00000000..37664a1c --- /dev/null +++ b/src/ext/Bal/wixstdfn/precomp.cpp | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | // 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 | |||
| 3 | #include "precomp.h" | ||
diff --git a/src/ext/Bal/wixstdfn/precomp.h b/src/ext/Bal/wixstdfn/precomp.h new file mode 100644 index 00000000..ff959ed7 --- /dev/null +++ b/src/ext/Bal/wixstdfn/precomp.h | |||
| @@ -0,0 +1,11 @@ | |||
| 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. | ||
| 3 | |||
| 4 | |||
| 5 | #include <windows.h> | ||
| 6 | #include <msi.h> | ||
| 7 | |||
| 8 | #include <dutil.h> | ||
| 9 | |||
| 10 | #include "IBAFunctions.h" | ||
| 11 | #include "BalBaseBAFunctionsProc.h" | ||
diff --git a/src/ext/Bal/wixstdfn/wixstdfn.nuspec b/src/ext/Bal/wixstdfn/wixstdfn.nuspec new file mode 100644 index 00000000..d7e0de41 --- /dev/null +++ b/src/ext/Bal/wixstdfn/wixstdfn.nuspec | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
| 3 | <metadata minClientVersion="4.0"> | ||
| 4 | <id>$id$</id> | ||
| 5 | <version>$version$</version> | ||
| 6 | <title>$title$</title> | ||
| 7 | <description>$description$</description> | ||
| 8 | <authors>$authors$</authors> | ||
| 9 | <icon>wix.png</icon> | ||
| 10 | <license type="expression">MS-RL</license> | ||
| 11 | <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
| 12 | <copyright>$copyright$</copyright> | ||
| 13 | <projectUrl>$projectUrl$</projectUrl> | ||
| 14 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> | ||
| 15 | <dependencies> | ||
| 16 | <group targetFramework="Native"> | ||
| 17 | <dependency id="WixToolset.BootstrapperApplicationApi" version="[$version$,5)" /> | ||
| 18 | <dependency id="WixToolset.DUtil" version="[$version$,5)" /> | ||
| 19 | </group> | ||
| 20 | </dependencies> | ||
| 21 | </metadata> | ||
| 22 | |||
| 23 | <files> | ||
| 24 | <file src="$projectFolder$\build\$id$.props" target="build\" /> | ||
| 25 | <file src="$projectFolder$\..\..\..\internal\images\wix.png" /> | ||
| 26 | <file src="$projectFolder$\inc\*" target="lib\native\include" /> | ||
| 27 | <file src="..\..\v141\x86\wixstdfn.lib" target="lib\native\v14\x86" /> | ||
| 28 | <file src="..\..\v141\x64\wixstdfn.lib" target="lib\native\v14\x64" /> | ||
| 29 | <file src="..\..\v141\ARM64\wixstdfn.lib" target="lib\native\v14\ARM64" /> | ||
| 30 | </files> | ||
| 31 | </package> | ||
diff --git a/src/ext/Bal/wixstdfn/wixstdfn.vcxproj b/src/ext/Bal/wixstdfn/wixstdfn.vcxproj new file mode 100644 index 00000000..8d522ebc --- /dev/null +++ b/src/ext/Bal/wixstdfn/wixstdfn.vcxproj | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-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. --> | ||
| 3 | |||
| 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 5 | <ItemGroup Label="ProjectConfigurations"> | ||
| 6 | <ProjectConfiguration Include="Debug|ARM64"> | ||
| 7 | <Configuration>Debug</Configuration> | ||
| 8 | <Platform>ARM64</Platform> | ||
| 9 | </ProjectConfiguration> | ||
| 10 | <ProjectConfiguration Include="Release|ARM64"> | ||
| 11 | <Configuration>Release</Configuration> | ||
| 12 | <Platform>ARM64</Platform> | ||
| 13 | </ProjectConfiguration> | ||
| 14 | <ProjectConfiguration Include="Debug|Win32"> | ||
| 15 | <Configuration>Debug</Configuration> | ||
| 16 | <Platform>Win32</Platform> | ||
| 17 | </ProjectConfiguration> | ||
| 18 | <ProjectConfiguration Include="Release|Win32"> | ||
| 19 | <Configuration>Release</Configuration> | ||
| 20 | <Platform>Win32</Platform> | ||
| 21 | </ProjectConfiguration> | ||
| 22 | <ProjectConfiguration Include="Debug|x64"> | ||
| 23 | <Configuration>Debug</Configuration> | ||
| 24 | <Platform>x64</Platform> | ||
| 25 | </ProjectConfiguration> | ||
| 26 | <ProjectConfiguration Include="Release|x64"> | ||
| 27 | <Configuration>Release</Configuration> | ||
| 28 | <Platform>x64</Platform> | ||
| 29 | </ProjectConfiguration> | ||
| 30 | </ItemGroup> | ||
| 31 | |||
| 32 | <PropertyGroup Label="Globals"> | ||
| 33 | <ProjectGuid>{D786C02F-9488-421F-A5A5-D1D31E8E648B}</ProjectGuid> | ||
| 34 | <ConfigurationType>StaticLibrary</ConfigurationType> | ||
| 35 | <TargetName>wixstdfn</TargetName> | ||
| 36 | <CharacterSet>MultiByte</CharacterSet> | ||
| 37 | <Description>WiX Toolset Standard BootstrapperApplication Functions API</Description> | ||
| 38 | <PackageId>WixToolset.WixStandardBootstrapperApplicationFunctionApi</PackageId> | ||
| 39 | </PropertyGroup> | ||
| 40 | |||
| 41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| 42 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| 43 | <Import Project="..\..\..\NativeMultiTargeting.Build.props" /> | ||
| 44 | |||
| 45 | <ImportGroup Label="ExtensionSettings"> | ||
| 46 | </ImportGroup> | ||
| 47 | |||
| 48 | <ImportGroup Label="Shared"> | ||
| 49 | </ImportGroup> | ||
| 50 | |||
| 51 | <PropertyGroup> | ||
| 52 | <ProjectAdditionalIncludeDirectories>inc</ProjectAdditionalIncludeDirectories> | ||
| 53 | </PropertyGroup> | ||
| 54 | |||
| 55 | <ItemGroup> | ||
| 56 | <ClCompile Include="BalBaseBAFunctionsProc.cpp" /> | ||
| 57 | <ClCompile Include="precomp.cpp"> | ||
| 58 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
| 59 | </ClCompile> | ||
| 60 | </ItemGroup> | ||
| 61 | <ItemGroup> | ||
| 62 | <ClInclude Include="inc\BAFunctions.h" /> | ||
| 63 | <ClInclude Include="inc\BalBaseBAFunctions.h" /> | ||
| 64 | <ClInclude Include="inc\BalBaseBAFunctionsProc.h" /> | ||
| 65 | <ClInclude Include="inc\IBAFunctions.h" /> | ||
| 66 | <ClInclude Include="precomp.h" /> | ||
| 67 | </ItemGroup> | ||
| 68 | |||
| 69 | <ItemGroup> | ||
| 70 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> | ||
| 71 | |||
| 72 | <PackageReference Include="WixToolset.BootstrapperApplicationApi" /> | ||
| 73 | </ItemGroup> | ||
| 74 | |||
| 75 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| 76 | </Project> | ||
