aboutsummaryrefslogtreecommitdiff
path: root/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp')
-rw-r--r--src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp41
1 files changed, 41 insertions, 0 deletions
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 @@
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 "BalBaseBAFunctions.h"
5#include "BalBaseBAFunctionsProc.h"
6
7class CTestBAFunctions : public CBalBaseBAFunctions
8{
9public:
10 CTestBAFunctions(
11 __in HMODULE hModule,
12 __in IBootstrapperEngine* pEngine,
13 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs
14 ) : CBalBaseBAFunctions(hModule, pEngine, pArgs)
15 {
16 }
17};
18
19HRESULT CreateBAFunctions(
20 __in HMODULE hModule,
21 __in IBootstrapperEngine* pEngine,
22 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
23 __in BA_FUNCTIONS_CREATE_RESULTS* pResults,
24 __out IBAFunctions** ppApplication
25 )
26{
27 HRESULT hr = S_OK;
28 CTestBAFunctions* pApplication = NULL;
29
30 pApplication = new CTestBAFunctions(hModule, pEngine, pArgs);
31 ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object.");
32
33 pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc;
34 pResults->pvBAFunctionsProcContext = pApplication;
35 *ppApplication = pApplication;
36 pApplication = NULL;
37
38LExit:
39 ReleaseObject(pApplication);
40 return hr;
41}