diff options
author | Rob Mensching <rob@firegiant.com> | 2021-04-22 05:46:03 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-04-29 16:41:44 -0700 |
commit | c00516901e6b67e398396b14fe7682d0376f8643 (patch) | |
tree | b0d62089a1c5700c7f2c3e3790750bf2d8ea33c0 /src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp | |
parent | 8eb98efd2175d9ece2e4639d43081667af9a4990 (diff) | |
download | wix-c00516901e6b67e398396b14fe7682d0376f8643.tar.gz wix-c00516901e6b67e398396b14fe7682d0376f8643.tar.bz2 wix-c00516901e6b67e398396b14fe7682d0376f8643.zip |
Move balutil into API/burn
Diffstat (limited to 'src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp')
-rw-r--r-- | src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp b/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp new file mode 100644 index 00000000..921303bb --- /dev/null +++ b/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp | |||
@@ -0,0 +1,42 @@ | |||
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 "BextBaseBundleExtension.h" | ||
5 | #include "BextBaseBundleExtensionProc.h" | ||
6 | |||
7 | class CTestBundleExtension : public CBextBaseBundleExtension | ||
8 | { | ||
9 | public: | ||
10 | CTestBundleExtension( | ||
11 | __in IBundleExtensionEngine* pEngine | ||
12 | ) : CBextBaseBundleExtension(pEngine) | ||
13 | { | ||
14 | } | ||
15 | }; | ||
16 | |||
17 | HRESULT TestBundleExtensionCreate( | ||
18 | __in IBundleExtensionEngine* pEngine, | ||
19 | __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, | ||
20 | __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults, | ||
21 | __out IBundleExtension** ppBundleExtension | ||
22 | ) | ||
23 | { | ||
24 | HRESULT hr = S_OK; | ||
25 | CTestBundleExtension* pExtension = NULL; | ||
26 | |||
27 | pExtension = new CTestBundleExtension(pEngine); | ||
28 | ExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CTestBundleExtension."); | ||
29 | |||
30 | hr = pExtension->Initialize(pArgs); | ||
31 | ExitOnFailure(hr, "CTestBundleExtension initialization failed"); | ||
32 | |||
33 | pResults->pfnBundleExtensionProc = BextBaseBundleExtensionProc; | ||
34 | pResults->pvBundleExtensionProcContext = pExtension; | ||
35 | |||
36 | *ppBundleExtension = pExtension; | ||
37 | pExtension = NULL; | ||
38 | |||
39 | LExit: | ||
40 | ReleaseObject(pExtension); | ||
41 | return hr; | ||
42 | } | ||