diff options
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 | } | ||