aboutsummaryrefslogtreecommitdiff
path: root/src/be/utilbe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/be/utilbe.cpp')
-rw-r--r--src/be/utilbe.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/be/utilbe.cpp b/src/be/utilbe.cpp
index 370669dd..d9816dc7 100644
--- a/src/be/utilbe.cpp
+++ b/src/be/utilbe.cpp
@@ -1,19 +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. 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 2
3#include "precomp.h" 3#include "precomp.h"
4#include "BextBaseBundleExtensionProc.h"
5
6static IBundleExtension* vpBundleExtension = NULL;
4 7
5// function definitions 8// function definitions
6 9
7extern "C" HRESULT WINAPI BundleExtensionCreate( 10extern "C" HRESULT WINAPI BundleExtensionCreate(
8 __in const BUNDLE_EXTENSION_CREATE_ARGS* /*pArgs*/, 11 __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs,
9 __inout BUNDLE_EXTENSION_CREATE_RESULTS* /*pResults*/ 12 __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults
10 ) 13 )
11{ 14{
12 HRESULT hr = S_OK; 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
30LExit:
31 ReleaseObject(pEngine);
13 32
14 return hr; 33 return hr;
15} 34}
16 35
17extern "C" void WINAPI BundleExtensionDestroy() 36extern "C" void WINAPI BundleExtensionDestroy()
18{ 37{
38 BextUninitialize();
39 ReleaseNullObject(vpBundleExtension);
40 XmlUninitialize();
19} \ No newline at end of file 41} \ No newline at end of file