aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2019-02-13 20:13:57 -0600
committerSean Hall <r.sean.hall@gmail.com>2019-02-13 20:16:48 -0600
commit391057093e45db2d4b2450bd236b9e1fc4cfd53c (patch)
tree0057f9e3626a594b0d2bc691c8ead8ea1283598d /src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
parente0d1a8f6e54f2c573fc79fc442518758297b7d80 (diff)
downloadwix-391057093e45db2d4b2450bd236b9e1fc4cfd53c.tar.gz
wix-391057093e45db2d4b2450bd236b9e1fc4cfd53c.tar.bz2
wix-391057093e45db2d4b2450bd236b9e1fc4cfd53c.zip
Add test for creating a Managed BA through mbahost.
Diffstat (limited to 'src/test/WixToolsetTest.MbaHost/EngineForTest.cpp')
-rw-r--r--src/test/WixToolsetTest.MbaHost/EngineForTest.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp b/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
new file mode 100644
index 00000000..b2567a7b
--- /dev/null
+++ b/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
@@ -0,0 +1,45 @@
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
5static HRESULT BAEngineLog(
6 __in BOOTSTRAPPER_ENGINE_CONTEXT* pContext,
7 __in BAENGINE_LOG_ARGS* pArgs,
8 __in BAENGINE_LOG_RESULTS* /*pResults*/
9)
10{
11 HRESULT hr = S_OK;
12
13 pContext->pfnLog(pArgs->wzMessage);
14
15 return hr;
16}
17
18HRESULT WINAPI EngineForTestProc(
19 __in BOOTSTRAPPER_ENGINE_MESSAGE message,
20 __in const LPVOID pvArgs,
21 __inout LPVOID pvResults,
22 __in_opt LPVOID pvContext
23)
24{
25 HRESULT hr = S_OK;
26 BOOTSTRAPPER_ENGINE_CONTEXT* pContext = reinterpret_cast<BOOTSTRAPPER_ENGINE_CONTEXT*>(pvContext);
27
28 if (!pContext || !pvArgs || !pvResults)
29 {
30 ExitFunction1(hr = E_INVALIDARG);
31 }
32
33 switch (message)
34 {
35 case BOOTSTRAPPER_ENGINE_MESSAGE_LOG:
36 hr = BAEngineLog(pContext, reinterpret_cast<BAENGINE_LOG_ARGS*>(pvArgs), reinterpret_cast<BAENGINE_LOG_RESULTS*>(pvResults));
37 break;
38 default:
39 hr = E_NOTIMPL;
40 break;
41 }
42
43LExit:
44 return hr;
45} \ No newline at end of file