From 24379873f589cff33965f1104041f61c0c4503e0 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 22 Dec 2019 10:31:33 +1100 Subject: Move the responsibility of wrapping the binary interfaces from mbahost to the new mbanative dll of WixToolset.Mba.Core. --- src/mbanative/mbanative.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/mbanative/mbanative.cpp (limited to 'src/mbanative/mbanative.cpp') diff --git a/src/mbanative/mbanative.cpp b/src/mbanative/mbanative.cpp new file mode 100644 index 00000000..745b50e7 --- /dev/null +++ b/src/mbanative/mbanative.cpp @@ -0,0 +1,29 @@ +// 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. + +#include "precomp.h" +#include "BalBaseBootstrapperApplicationProc.h" + +extern "C" HRESULT WINAPI InitializeFromCreateArgs( + __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, + __inout BOOTSTRAPPER_COMMAND* pCommand, + __out IBootstrapperEngine** ppEngine + ) +{ + HRESULT hr = S_OK; + + hr = BalInitializeFromCreateArgs(pArgs, ppEngine); + ExitOnFailure(hr, "Failed to initialize Bal."); + + memcpy_s(pCommand, pCommand->cbSize, pArgs->pCommand, pArgs->pCommand->cbSize); +LExit: + return hr; +} + +extern "C" void WINAPI StoreBAInCreateResults( + __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, + __in IBootstrapperApplication* pBA + ) +{ + pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc; + pResults->pvBootstrapperApplicationProcContext = pBA; +} -- cgit v1.2.3-55-g6feb