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/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.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/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp')
-rw-r--r-- | src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp b/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp index 5383efbf..14a898e8 100644 --- a/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp +++ b/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp | |||
@@ -51,10 +51,8 @@ public: | |||
51 | // Constructor - initialize member variables. | 51 | // Constructor - initialize member variables. |
52 | // | 52 | // |
53 | CWixSampleBAFunctions( | 53 | CWixSampleBAFunctions( |
54 | __in HMODULE hModule, | 54 | __in HMODULE hModule |
55 | __in IBootstrapperEngine* pEngine, | 55 | ) : CBalBaseBAFunctions(hModule) |
56 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs | ||
57 | ) : CBalBaseBAFunctions(hModule, pEngine, pArgs) | ||
58 | { | 56 | { |
59 | } | 57 | } |
60 | 58 | ||
@@ -75,22 +73,22 @@ HRESULT WINAPI CreateBAFunctions( | |||
75 | { | 73 | { |
76 | HRESULT hr = S_OK; | 74 | HRESULT hr = S_OK; |
77 | CWixSampleBAFunctions* pBAFunctions = NULL; | 75 | CWixSampleBAFunctions* pBAFunctions = NULL; |
78 | IBootstrapperEngine* pEngine = NULL; | ||
79 | 76 | ||
80 | // This is required to enable logging functions. | 77 | // This is required to enable logging functions. |
81 | hr = BalInitializeFromCreateArgs(pArgs->pBootstrapperCreateArgs, &pEngine); | 78 | BalInitialize(pArgs->pEngine); |
82 | ExitOnFailure(hr, "Failed to initialize Bal."); | ||
83 | 79 | ||
84 | pBAFunctions = new CWixSampleBAFunctions(hModule, pEngine, pArgs); | 80 | pBAFunctions = new CWixSampleBAFunctions(hModule); |
85 | ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CWixSampleBAFunctions object."); | 81 | ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CWixSampleBAFunctions object."); |
86 | 82 | ||
83 | hr = pBAFunctions->OnCreate(pArgs->pEngine, pArgs->pCommand); | ||
84 | ExitOnFailure(hr, "Failed to call OnCreate CPrereqBaf."); | ||
85 | |||
87 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; | 86 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; |
88 | pResults->pvBAFunctionsProcContext = pBAFunctions; | 87 | pResults->pvBAFunctionsProcContext = pBAFunctions; |
89 | pBAFunctions = NULL; | 88 | pBAFunctions = NULL; |
90 | 89 | ||
91 | LExit: | 90 | LExit: |
92 | ReleaseObject(pBAFunctions); | 91 | ReleaseObject(pBAFunctions); |
93 | ReleaseObject(pEngine); | ||
94 | 92 | ||
95 | return hr; | 93 | return hr; |
96 | } | 94 | } |