diff options
author | Rob Mensching <rob@firegiant.com> | 2021-05-03 15:55:48 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-05-03 15:55:48 -0700 |
commit | ba7bab476501c16e437b0aee71c1be02c3dda176 (patch) | |
tree | 814fba485c29a7dfe1adb396169e27ed641ef9a3 /src/ext/Bal/test/examples/TestEngine/WaitForQuitEngine.cpp | |
parent | 14987a72cc1a3493ca8f80693d273352fc314bd9 (diff) | |
download | wix-ba7bab476501c16e437b0aee71c1be02c3dda176.tar.gz wix-ba7bab476501c16e437b0aee71c1be02c3dda176.tar.bz2 wix-ba7bab476501c16e437b0aee71c1be02c3dda176.zip |
Move Bal.wixext into ext
Diffstat (limited to 'src/ext/Bal/test/examples/TestEngine/WaitForQuitEngine.cpp')
-rw-r--r-- | src/ext/Bal/test/examples/TestEngine/WaitForQuitEngine.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/ext/Bal/test/examples/TestEngine/WaitForQuitEngine.cpp b/src/ext/Bal/test/examples/TestEngine/WaitForQuitEngine.cpp new file mode 100644 index 00000000..2f80ba75 --- /dev/null +++ b/src/ext/Bal/test/examples/TestEngine/WaitForQuitEngine.cpp | |||
@@ -0,0 +1,35 @@ | |||
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 | HRESULT RunWaitForQuitEngine( | ||
6 | __in LPCWSTR wzBundleFilePath, | ||
7 | __in LPCWSTR wzBAFilePath | ||
8 | ) | ||
9 | { | ||
10 | HRESULT hr = S_OK; | ||
11 | TestEngine* pTestEngine = NULL; | ||
12 | |||
13 | pTestEngine = new TestEngine(); | ||
14 | ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine."); | ||
15 | |||
16 | hr = pTestEngine->Initialize(wzBundleFilePath); | ||
17 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine."); | ||
18 | |||
19 | hr = pTestEngine->LoadBA(wzBAFilePath); | ||
20 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); | ||
21 | |||
22 | hr = pTestEngine->SendStartupEvent(); | ||
23 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); | ||
24 | |||
25 | hr = pTestEngine->RunApplication(); | ||
26 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); | ||
27 | |||
28 | hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER); | ||
29 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); | ||
30 | |||
31 | pTestEngine->UnloadBA(); | ||
32 | |||
33 | LExit: | ||
34 | return hr; | ||
35 | } | ||