diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:42:09 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:42:09 -0700 |
| commit | 8e1207c4c5e451ba1a087f0fa11b63964ac35f3c (patch) | |
| tree | 8cdfc18d38f25a5fb8e63f115d3447b11172e1e5 /src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp | |
| parent | 6fa3bf7fe67e25650d5a2b6bec09a9813b1a4722 (diff) | |
| parent | c00516901e6b67e398396b14fe7682d0376f8643 (diff) | |
| download | wix-8e1207c4c5e451ba1a087f0fa11b63964ac35f3c.tar.gz wix-8e1207c4c5e451ba1a087f0fa11b63964ac35f3c.tar.bz2 wix-8e1207c4c5e451ba1a087f0fa11b63964ac35f3c.zip | |
Merge balutil
Diffstat (limited to 'src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp')
| -rw-r--r-- | src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp new file mode 100644 index 00000000..927a8d10 --- /dev/null +++ b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp | |||
| @@ -0,0 +1,41 @@ | |||
| 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 | __in IBootstrapperEngine* pEngine, | ||
| 13 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs | ||
| 14 | ) : CBalBaseBAFunctions(hModule, pEngine, pArgs) | ||
| 15 | { | ||
| 16 | } | ||
| 17 | }; | ||
| 18 | |||
| 19 | HRESULT CreateBAFunctions( | ||
| 20 | __in HMODULE hModule, | ||
| 21 | __in IBootstrapperEngine* pEngine, | ||
| 22 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | ||
| 23 | __in BA_FUNCTIONS_CREATE_RESULTS* pResults, | ||
| 24 | __out IBAFunctions** ppApplication | ||
| 25 | ) | ||
| 26 | { | ||
| 27 | HRESULT hr = S_OK; | ||
| 28 | CTestBAFunctions* pApplication = NULL; | ||
| 29 | |||
| 30 | pApplication = new CTestBAFunctions(hModule, pEngine, pArgs); | ||
| 31 | ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object."); | ||
| 32 | |||
| 33 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; | ||
| 34 | pResults->pvBAFunctionsProcContext = pApplication; | ||
| 35 | *ppApplication = pApplication; | ||
| 36 | pApplication = NULL; | ||
| 37 | |||
| 38 | LExit: | ||
| 39 | ReleaseObject(pApplication); | ||
| 40 | return hr; | ||
| 41 | } | ||
