From dea25ba9bcfd65200b60339c2e4bc060cdf20723 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 7 Mar 2024 01:44:51 -0800 Subject: Move wixstdba functions to Bal.wixext build --- .../Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp (limited to 'src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp') diff --git a/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp b/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp new file mode 100644 index 00000000..3e850442 --- /dev/null +++ b/src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp @@ -0,0 +1,39 @@ +// 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 + ) : CBalBaseBAFunctions(hModule) + { + } +}; + +HRESULT CreateBAFunctions( + __in HMODULE hModule, + __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, + __inout BA_FUNCTIONS_CREATE_RESULTS* pResults + ) +{ + HRESULT hr = S_OK; + CTestBAFunctions* pFunction = NULL; + + pFunction = new CTestBAFunctions(hModule); + ExitOnNull(pFunction, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object."); + + hr = pFunction->OnCreate(pArgs->pEngine, pArgs->pCommand); + ExitOnFailure(hr, "Failed to initialize new test bafunctions."); + + pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; + pResults->pvBAFunctionsProcContext = pFunction; + pFunction = NULL; + +LExit: + ReleaseObject(pFunction); + return hr; +} -- cgit v1.2.3-55-g6feb