From 21a0685ef69e9d634600622b19ea970c6f58ef03 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 6 Oct 2022 16:37:14 -0500 Subject: Add Netfx bundle extension and netfx:DotNetCoreSearch. Remove built-in .NET Core packages since they update too quickly. Fixes 6257 --- src/ext/Util/be/utilsearch.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/ext/Util/be/utilsearch.cpp') diff --git a/src/ext/Util/be/utilsearch.cpp b/src/ext/Util/be/utilsearch.cpp index 7cd2ea09..20a514d8 100644 --- a/src/ext/Util/be/utilsearch.cpp +++ b/src/ext/Util/be/utilsearch.cpp @@ -17,11 +17,11 @@ STDMETHODIMP UtilSearchParseFromXml( // Select Util search nodes. hr = XmlSelectNodes(pixnBundleExtension, L"WixWindowsFeatureSearch", &pixnNodes); - ExitOnFailure(hr, "Failed to select Util search nodes."); + BextExitOnFailure(hr, "Failed to select Util search nodes."); // Get Util search node count. hr = pixnNodes->get_length((long*)&cNodes); - ExitOnFailure(hr, "Failed to get Util search node count."); + BextExitOnFailure(hr, "Failed to get Util search node count."); if (!cNodes) { @@ -30,7 +30,7 @@ STDMETHODIMP UtilSearchParseFromXml( // Allocate memory for searches. pSearches->rgSearches = (UTIL_SEARCH*)MemAlloc(sizeof(UTIL_SEARCH) * cNodes, TRUE); - ExitOnNull(pSearches->rgSearches, hr, E_OUTOFMEMORY, "Failed to allocate memory for search structs."); + BextExitOnNull(pSearches->rgSearches, hr, E_OUTOFMEMORY, "Failed to allocate memory for search structs."); pSearches->cSearches = cNodes; @@ -40,11 +40,11 @@ STDMETHODIMP UtilSearchParseFromXml( UTIL_SEARCH* pSearch = &pSearches->rgSearches[i]; hr = XmlNextElement(pixnNodes, &pixnNode, &bstrNodeName); - ExitOnFailure(hr, "Failed to get next node."); + BextExitOnFailure(hr, "Failed to get next node."); // @Id hr = XmlGetAttributeEx(pixnNode, L"Id", &pSearch->sczId); - ExitOnFailure(hr, "Failed to get @Id."); + BextExitOnFailure(hr, "Failed to get @Id."); // Read type specific attributes. if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"WixWindowsFeatureSearch", -1)) @@ -53,7 +53,7 @@ STDMETHODIMP UtilSearchParseFromXml( // @Type hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); - ExitOnFailure(hr, "Failed to get @Type."); + BextExitOnFailure(hr, "Failed to get @Type."); if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"sha2CodeSigning", -1)) { @@ -61,14 +61,12 @@ STDMETHODIMP UtilSearchParseFromXml( } else { - hr = E_INVALIDARG; - ExitOnFailure(hr, "Invalid value for @Type: %ls", scz); + BextExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); } } else { - hr = E_UNEXPECTED; - ExitOnFailure(hr, "Unexpected element name: %ls", bstrNodeName); + BextExitWithRootFailure(hr, E_UNEXPECTED, "Unexpected element name: %ls", bstrNodeName); } // prepare next iteration @@ -112,7 +110,7 @@ STDMETHODIMP UtilSearchExecute( UTIL_SEARCH* pSearch = NULL; hr = UtilSearchFindById(pSearches, wzSearchId, &pSearch); - ExitOnFailure(hr, "Search id '%ls' is unknown to the util extension."); + BextExitOnFailure(hr, "Search id '%ls' is unknown to the util extension.", wzSearchId); switch (pSearch->Type) { -- cgit v1.2.3-55-g6feb