diff options
| author | Rob Mensching <rob@firegiant.com> | 2024-01-11 18:26:20 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2024-03-06 18:03:38 -0800 |
| commit | 0d3d54992104288e9ee0c834d0b96e8502fd2d42 (patch) | |
| tree | 9efa49c4983cd2ba1becab64bd1f2faccac88acf /src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp | |
| parent | 2824298d9dd817a47527c920363556b54ead5d5d (diff) | |
| download | wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.gz wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.bz2 wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.zip | |
Move the BootstrapperApplication out of proc
Diffstat (limited to 'src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp')
| -rw-r--r-- | src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp index 927a8d10..3e850442 100644 --- a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp +++ b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp | |||
| @@ -8,34 +8,32 @@ class CTestBAFunctions : public CBalBaseBAFunctions | |||
| 8 | { | 8 | { |
| 9 | public: | 9 | public: |
| 10 | CTestBAFunctions( | 10 | CTestBAFunctions( |
| 11 | __in HMODULE hModule, | 11 | __in HMODULE hModule |
| 12 | __in IBootstrapperEngine* pEngine, | 12 | ) : CBalBaseBAFunctions(hModule) |
| 13 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs | ||
| 14 | ) : CBalBaseBAFunctions(hModule, pEngine, pArgs) | ||
| 15 | { | 13 | { |
| 16 | } | 14 | } |
| 17 | }; | 15 | }; |
| 18 | 16 | ||
| 19 | HRESULT CreateBAFunctions( | 17 | HRESULT CreateBAFunctions( |
| 20 | __in HMODULE hModule, | 18 | __in HMODULE hModule, |
| 21 | __in IBootstrapperEngine* pEngine, | ||
| 22 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | 19 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, |
| 23 | __in BA_FUNCTIONS_CREATE_RESULTS* pResults, | 20 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults |
| 24 | __out IBAFunctions** ppApplication | ||
| 25 | ) | 21 | ) |
| 26 | { | 22 | { |
| 27 | HRESULT hr = S_OK; | 23 | HRESULT hr = S_OK; |
| 28 | CTestBAFunctions* pApplication = NULL; | 24 | CTestBAFunctions* pFunction = NULL; |
| 29 | 25 | ||
| 30 | pApplication = new CTestBAFunctions(hModule, pEngine, pArgs); | 26 | pFunction = new CTestBAFunctions(hModule); |
| 31 | ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object."); | 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."); | ||
| 32 | 31 | ||
| 33 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; | 32 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; |
| 34 | pResults->pvBAFunctionsProcContext = pApplication; | 33 | pResults->pvBAFunctionsProcContext = pFunction; |
| 35 | *ppApplication = pApplication; | 34 | pFunction = NULL; |
| 36 | pApplication = NULL; | ||
| 37 | 35 | ||
| 38 | LExit: | 36 | LExit: |
| 39 | ReleaseObject(pApplication); | 37 | ReleaseObject(pFunction); |
| 40 | return hr; | 38 | return hr; |
| 41 | } | 39 | } |
