diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2019-12-22 10:31:33 +1100 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2019-12-22 13:19:29 +1000 |
| commit | 24379873f589cff33965f1104041f61c0c4503e0 (patch) | |
| tree | b50fb0270d2de706cb6f3a4dea0af77ce2cae9e1 /src/mbanative/mbanative.cpp | |
| parent | f3c383c2412e376353d64a8b744184fa1cee1c6e (diff) | |
| download | wix-24379873f589cff33965f1104041f61c0c4503e0.tar.gz wix-24379873f589cff33965f1104041f61c0c4503e0.tar.bz2 wix-24379873f589cff33965f1104041f61c0c4503e0.zip | |
Move the responsibility of wrapping the binary interfaces from mbahost to the new mbanative dll of WixToolset.Mba.Core.
Diffstat (limited to 'src/mbanative/mbanative.cpp')
| -rw-r--r-- | src/mbanative/mbanative.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
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 @@ | |||
| 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 | #include "BalBaseBootstrapperApplicationProc.h" | ||
| 5 | |||
| 6 | extern "C" HRESULT WINAPI InitializeFromCreateArgs( | ||
| 7 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
| 8 | __inout BOOTSTRAPPER_COMMAND* pCommand, | ||
| 9 | __out IBootstrapperEngine** ppEngine | ||
| 10 | ) | ||
| 11 | { | ||
| 12 | HRESULT hr = S_OK; | ||
| 13 | |||
| 14 | hr = BalInitializeFromCreateArgs(pArgs, ppEngine); | ||
| 15 | ExitOnFailure(hr, "Failed to initialize Bal."); | ||
| 16 | |||
| 17 | memcpy_s(pCommand, pCommand->cbSize, pArgs->pCommand, pArgs->pCommand->cbSize); | ||
| 18 | LExit: | ||
| 19 | return hr; | ||
| 20 | } | ||
| 21 | |||
| 22 | extern "C" void WINAPI StoreBAInCreateResults( | ||
| 23 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, | ||
| 24 | __in IBootstrapperApplication* pBA | ||
| 25 | ) | ||
| 26 | { | ||
| 27 | pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc; | ||
| 28 | pResults->pvBootstrapperApplicationProcContext = pBA; | ||
| 29 | } | ||
