diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:42:44 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:42:44 -0700 |
| commit | afc20ecb53ad3ade524aceefa30d98a3d84fd479 (patch) | |
| tree | 4fb762f65dc195ccb104a6c1fcce7c40e7693e98 /src/burn/engine/update.cpp | |
| parent | 8e1207c4c5e451ba1a087f0fa11b63964ac35f3c (diff) | |
| parent | af10c45d7b3a44af0b461a557847fe03263dcc10 (diff) | |
| download | wix-afc20ecb53ad3ade524aceefa30d98a3d84fd479.tar.gz wix-afc20ecb53ad3ade524aceefa30d98a3d84fd479.tar.bz2 wix-afc20ecb53ad3ade524aceefa30d98a3d84fd479.zip | |
Merge burn
Diffstat (limited to 'src/burn/engine/update.cpp')
| -rw-r--r-- | src/burn/engine/update.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/burn/engine/update.cpp b/src/burn/engine/update.cpp new file mode 100644 index 00000000..b04fa9a4 --- /dev/null +++ b/src/burn/engine/update.cpp | |||
| @@ -0,0 +1,44 @@ | |||
| 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 | |||
| 5 | |||
| 6 | // internal function declarations | ||
| 7 | |||
| 8 | |||
| 9 | // function definitions | ||
| 10 | |||
| 11 | extern "C" HRESULT UpdateParseFromXml( | ||
| 12 | __in BURN_UPDATE* pUpdate, | ||
| 13 | __in IXMLDOMNode* pixnBundle | ||
| 14 | ) | ||
| 15 | { | ||
| 16 | HRESULT hr = S_OK; | ||
| 17 | IXMLDOMNode* pixnUpdateNode = NULL; | ||
| 18 | |||
| 19 | hr = XmlSelectSingleNode(pixnBundle, L"Update", &pixnUpdateNode); | ||
| 20 | if (S_FALSE == hr) | ||
| 21 | { | ||
| 22 | ExitFunction1(hr = S_OK); | ||
| 23 | } | ||
| 24 | ExitOnFailure(hr, "Failed to select Bundle/Update node."); | ||
| 25 | |||
| 26 | // @Location | ||
| 27 | hr = XmlGetAttributeEx(pixnUpdateNode, L"Location", &pUpdate->sczUpdateSource); | ||
| 28 | ExitOnFailure(hr, "Failed to get Update@Location."); | ||
| 29 | |||
| 30 | LExit: | ||
| 31 | ReleaseObject(pixnUpdateNode); | ||
| 32 | |||
| 33 | return hr; | ||
| 34 | } | ||
| 35 | |||
| 36 | extern "C" void UpdateUninitialize( | ||
| 37 | __in BURN_UPDATE* pUpdate | ||
| 38 | ) | ||
| 39 | { | ||
| 40 | PackageUninitialize(&pUpdate->package); | ||
| 41 | |||
| 42 | ReleaseStr(pUpdate->sczUpdateSource); | ||
| 43 | memset(pUpdate, 0, sizeof(BURN_UPDATE)); | ||
| 44 | } | ||
