aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2019-12-22 13:51:35 +1100
committerSean Hall <r.sean.hall@gmail.com>2019-12-22 13:34:07 +1000
commit4a176b759c47fa1970fcfd0d9e25c294bda82ef4 (patch)
tree961cc91c44569d72c12d9f2dc5b1c11a80bb94a9 /src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
parent43fb611edc680a74d229e8f1eeacb30adad8e3c7 (diff)
downloadwix-4a176b759c47fa1970fcfd0d9e25c294bda82ef4.tar.gz
wix-4a176b759c47fa1970fcfd0d9e25c294bda82ef4.tar.bz2
wix-4a176b759c47fa1970fcfd0d9e25c294bda82ef4.zip
Update the MbaHost test project to use an external exe to load the BA, which allows loading a different .NET than the one running the tests. This also allows writing the tests in C# instead of C++/CLI.
Diffstat (limited to 'src/test/WixToolsetTest.MbaHost/EngineForTest.cpp')
-rw-r--r--src/test/WixToolsetTest.MbaHost/EngineForTest.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp b/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
deleted file mode 100644
index b2567a7b..00000000
--- a/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
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