From c00516901e6b67e398396b14fe7682d0376f8643 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 22 Apr 2021 05:46:03 -0700 Subject: Move balutil into API/burn --- .../burn/test/BalUtilUnitTest/TestBAFunctions.cpp | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp (limited to 'src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp') diff --git a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp new file mode 100644 index 00000000..927a8d10 --- /dev/null +++ b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp @@ -0,0 +1,41 @@ +// 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 "BalBaseBAFunctions.h" +#include "BalBaseBAFunctionsProc.h" + +class CTestBAFunctions : public CBalBaseBAFunctions +{ +public: + CTestBAFunctions( + __in HMODULE hModule, + __in IBootstrapperEngine* pEngine, + __in const BA_FUNCTIONS_CREATE_ARGS* pArgs + ) : CBalBaseBAFunctions(hModule, pEngine, pArgs) + { + } +}; + +HRESULT CreateBAFunctions( + __in HMODULE hModule, + __in IBootstrapperEngine* pEngine, + __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, + __in BA_FUNCTIONS_CREATE_RESULTS* pResults, + __out IBAFunctions** ppApplication + ) +{ + HRESULT hr = S_OK; + CTestBAFunctions* pApplication = NULL; + + pApplication = new CTestBAFunctions(hModule, pEngine, pArgs); + ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object."); + + pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; + pResults->pvBAFunctionsProcContext = pApplication; + *ppApplication = pApplication; + pApplication = NULL; + +LExit: + ReleaseObject(pApplication); + return hr; +} -- cgit v1.2.3-55-g6feb