aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp
diff options
context:
space:
mode:
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