diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-05-03 09:55:22 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-05-03 09:55:22 -0700 |
| commit | ff659159e041bf6c083e6b7fcb9b726065a9dd73 (patch) | |
| tree | ea95bf3d3e031edcee65de33b9e6954178be669c /src/ext/Util/be/utilbe.cpp | |
| parent | 8a8a25695351ee542f08886a9d0957c78c6af366 (diff) | |
| download | wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.tar.gz wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.tar.bz2 wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.zip | |
Move Util.wixext into ext
Diffstat (limited to 'src/ext/Util/be/utilbe.cpp')
| -rw-r--r-- | src/ext/Util/be/utilbe.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/ext/Util/be/utilbe.cpp b/src/ext/Util/be/utilbe.cpp new file mode 100644 index 00000000..d9816dc7 --- /dev/null +++ b/src/ext/Util/be/utilbe.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 "BextBaseBundleExtensionProc.h" | ||
| 5 | |||
| 6 | static IBundleExtension* vpBundleExtension = NULL; | ||
| 7 | |||
| 8 | // function definitions | ||
| 9 | |||
| 10 | extern "C" HRESULT WINAPI BundleExtensionCreate( | ||
| 11 | __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, | ||
| 12 | __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults | ||
| 13 | ) | ||
| 14 | { | ||
| 15 | HRESULT hr = S_OK; | ||
| 16 | IBundleExtensionEngine* pEngine = NULL; | ||
| 17 | |||
| 18 | hr = XmlInitialize(); | ||
| 19 | ExitOnFailure(hr, "Failed to initialize XML."); | ||
| 20 | |||
| 21 | hr = BextInitializeFromCreateArgs(pArgs, &pEngine); | ||
| 22 | ExitOnFailure(hr, "Failed to initialize bext"); | ||
| 23 | |||
| 24 | hr = UtilBundleExtensionCreate(pEngine, pArgs, &vpBundleExtension); | ||
| 25 | BextExitOnFailure(hr, "Failed to create WixUtilBundleExtension"); | ||
| 26 | |||
| 27 | pResults->pfnBundleExtensionProc = BextBaseBundleExtensionProc; | ||
| 28 | pResults->pvBundleExtensionProcContext = vpBundleExtension; | ||
| 29 | |||
| 30 | LExit: | ||
| 31 | ReleaseObject(pEngine); | ||
| 32 | |||
| 33 | return hr; | ||
| 34 | } | ||
| 35 | |||
| 36 | extern "C" void WINAPI BundleExtensionDestroy() | ||
| 37 | { | ||
| 38 | BextUninitialize(); | ||
| 39 | ReleaseNullObject(vpBundleExtension); | ||
| 40 | XmlUninitialize(); | ||
| 41 | } \ No newline at end of file | ||
