diff options
| author | Rob Mensching <rob@firegiant.com> | 2025-11-01 21:52:31 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2025-11-03 14:49:39 -0800 |
| commit | d2ba0da55725f2908b67e1470afc7cfd71cb3d1f (patch) | |
| tree | c2a1db61c5fac031c698976106bba2c453d85ded /src/burn/engine/search.cpp | |
| parent | 4d626c294c4783d454e27ea4e5614037dac8576e (diff) | |
| download | wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.tar.gz wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.tar.bz2 wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.zip | |
Use CompareStringOrdinal() instead of CompareString() case-sensitive
This commit moves to the modern CompareStringOrdinal() for all case-sensitve
uses of CompareString() with the invariant locale.
Resolves 6947
Diffstat (limited to 'src/burn/engine/search.cpp')
| -rw-r--r-- | src/burn/engine/search.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/burn/engine/search.cpp b/src/burn/engine/search.cpp index a1b6b74a..b5218600 100644 --- a/src/burn/engine/search.cpp +++ b/src/burn/engine/search.cpp | |||
| @@ -106,7 +106,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 106 | ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get @Condition."); | 106 | ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get @Condition."); |
| 107 | 107 | ||
| 108 | // read type specific attributes | 108 | // read type specific attributes |
| 109 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"DirectorySearch", -1)) | 109 | if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"DirectorySearch", -1, FALSE)) |
| 110 | { | 110 | { |
| 111 | pSearch->Type = BURN_SEARCH_TYPE_DIRECTORY; | 111 | pSearch->Type = BURN_SEARCH_TYPE_DIRECTORY; |
| 112 | 112 | ||
| @@ -118,11 +118,11 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 118 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 118 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 119 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 119 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 120 | 120 | ||
| 121 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) | 121 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) |
| 122 | { | 122 | { |
| 123 | pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_EXISTS; | 123 | pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_EXISTS; |
| 124 | } | 124 | } |
| 125 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"path", -1)) | 125 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"path", -1, FALSE)) |
| 126 | { | 126 | { |
| 127 | pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_PATH; | 127 | pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_PATH; |
| 128 | } | 128 | } |
| @@ -131,7 +131,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 131 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 131 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 132 | } | 132 | } |
| 133 | } | 133 | } |
| 134 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"FileSearch", -1)) | 134 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"FileSearch", -1, FALSE)) |
| 135 | { | 135 | { |
| 136 | pSearch->Type = BURN_SEARCH_TYPE_FILE; | 136 | pSearch->Type = BURN_SEARCH_TYPE_FILE; |
| 137 | 137 | ||
| @@ -147,15 +147,15 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 147 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 147 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 148 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 148 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 149 | 149 | ||
| 150 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) | 150 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) |
| 151 | { | 151 | { |
| 152 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_EXISTS; | 152 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_EXISTS; |
| 153 | } | 153 | } |
| 154 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 154 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 155 | { | 155 | { |
| 156 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_VERSION; | 156 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_VERSION; |
| 157 | } | 157 | } |
| 158 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"path", -1)) | 158 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"path", -1, FALSE)) |
| 159 | { | 159 | { |
| 160 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_PATH; | 160 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_PATH; |
| 161 | } | 161 | } |
| @@ -164,7 +164,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 164 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 164 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 165 | } | 165 | } |
| 166 | } | 166 | } |
| 167 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"RegistrySearch", -1)) | 167 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"RegistrySearch", -1, FALSE)) |
| 168 | { | 168 | { |
| 169 | pSearch->Type = BURN_SEARCH_TYPE_REGISTRY; | 169 | pSearch->Type = BURN_SEARCH_TYPE_REGISTRY; |
| 170 | 170 | ||
| @@ -172,19 +172,19 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 172 | hr = XmlGetAttributeEx(pixnNode, L"Root", &scz); | 172 | hr = XmlGetAttributeEx(pixnNode, L"Root", &scz); |
| 173 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Root."); | 173 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Root."); |
| 174 | 174 | ||
| 175 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKCR", -1)) | 175 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKCR", -1, FALSE)) |
| 176 | { | 176 | { |
| 177 | pSearch->RegistrySearch.hRoot = HKEY_CLASSES_ROOT; | 177 | pSearch->RegistrySearch.hRoot = HKEY_CLASSES_ROOT; |
| 178 | } | 178 | } |
| 179 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKCU", -1)) | 179 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKCU", -1, FALSE)) |
| 180 | { | 180 | { |
| 181 | pSearch->RegistrySearch.hRoot = HKEY_CURRENT_USER; | 181 | pSearch->RegistrySearch.hRoot = HKEY_CURRENT_USER; |
| 182 | } | 182 | } |
| 183 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKLM", -1)) | 183 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKLM", -1, FALSE)) |
| 184 | { | 184 | { |
| 185 | pSearch->RegistrySearch.hRoot = HKEY_LOCAL_MACHINE; | 185 | pSearch->RegistrySearch.hRoot = HKEY_LOCAL_MACHINE; |
| 186 | } | 186 | } |
| 187 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKU", -1)) | 187 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKU", -1, FALSE)) |
| 188 | { | 188 | { |
| 189 | pSearch->RegistrySearch.hRoot = HKEY_USERS; | 189 | pSearch->RegistrySearch.hRoot = HKEY_USERS; |
| 190 | } | 190 | } |
| @@ -208,11 +208,11 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 208 | hr = XmlGetYesNoAttribute(pixnNode, L"Win64", &pSearch->RegistrySearch.fWin64); | 208 | hr = XmlGetYesNoAttribute(pixnNode, L"Win64", &pSearch->RegistrySearch.fWin64); |
| 209 | ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get Win64 attribute."); | 209 | ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get Win64 attribute."); |
| 210 | 210 | ||
| 211 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) | 211 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) |
| 212 | { | 212 | { |
| 213 | pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_EXISTS; | 213 | pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_EXISTS; |
| 214 | } | 214 | } |
| 215 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"value", -1)) | 215 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"value", -1, FALSE)) |
| 216 | { | 216 | { |
| 217 | pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_VALUE; | 217 | pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_VALUE; |
| 218 | 218 | ||
| @@ -224,19 +224,19 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 224 | hr = XmlGetAttributeEx(pixnNode, L"VariableType", &scz); | 224 | hr = XmlGetAttributeEx(pixnNode, L"VariableType", &scz); |
| 225 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @VariableType."); | 225 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @VariableType."); |
| 226 | 226 | ||
| 227 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) | 227 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE)) |
| 228 | { | 228 | { |
| 229 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_FORMATTED; | 229 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_FORMATTED; |
| 230 | } | 230 | } |
| 231 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) | 231 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE)) |
| 232 | { | 232 | { |
| 233 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_NUMERIC; | 233 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_NUMERIC; |
| 234 | } | 234 | } |
| 235 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) | 235 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE)) |
| 236 | { | 236 | { |
| 237 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_STRING; | 237 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_STRING; |
| 238 | } | 238 | } |
| 239 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 239 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 240 | { | 240 | { |
| 241 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_VERSION; | 241 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_VERSION; |
| 242 | } | 242 | } |
| @@ -250,7 +250,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 250 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 250 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 251 | } | 251 | } |
| 252 | } | 252 | } |
| 253 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiComponentSearch", -1)) | 253 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiComponentSearch", -1, FALSE)) |
| 254 | { | 254 | { |
| 255 | pSearch->Type = BURN_SEARCH_TYPE_MSI_COMPONENT; | 255 | pSearch->Type = BURN_SEARCH_TYPE_MSI_COMPONENT; |
| 256 | 256 | ||
| @@ -266,15 +266,15 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 266 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 266 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 267 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 267 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 268 | 268 | ||
| 269 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"keyPath", -1)) | 269 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"keyPath", -1, FALSE)) |
| 270 | { | 270 | { |
| 271 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_KEYPATH; | 271 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_KEYPATH; |
| 272 | } | 272 | } |
| 273 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"state", -1)) | 273 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"state", -1, FALSE)) |
| 274 | { | 274 | { |
| 275 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_STATE; | 275 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_STATE; |
| 276 | } | 276 | } |
| 277 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"directory", -1)) | 277 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"directory", -1, FALSE)) |
| 278 | { | 278 | { |
| 279 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_DIRECTORY; | 279 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_DIRECTORY; |
| 280 | } | 280 | } |
| @@ -283,7 +283,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 283 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 283 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| 286 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiProductSearch", -1)) | 286 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiProductSearch", -1, FALSE)) |
| 287 | { | 287 | { |
| 288 | pSearch->Type = BURN_SEARCH_TYPE_MSI_PRODUCT; | 288 | pSearch->Type = BURN_SEARCH_TYPE_MSI_PRODUCT; |
| 289 | pSearch->MsiProductSearch.GuidType = BURN_MSI_PRODUCT_SEARCH_GUID_TYPE_NONE; | 289 | pSearch->MsiProductSearch.GuidType = BURN_MSI_PRODUCT_SEARCH_GUID_TYPE_NONE; |
| @@ -318,19 +318,19 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 318 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 318 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 319 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 319 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 320 | 320 | ||
| 321 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 321 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 322 | { | 322 | { |
| 323 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_VERSION; | 323 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_VERSION; |
| 324 | } | 324 | } |
| 325 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"language", -1)) | 325 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"language", -1, FALSE)) |
| 326 | { | 326 | { |
| 327 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_LANGUAGE; | 327 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_LANGUAGE; |
| 328 | } | 328 | } |
| 329 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"state", -1)) | 329 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"state", -1, FALSE)) |
| 330 | { | 330 | { |
| 331 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_STATE; | 331 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_STATE; |
| 332 | } | 332 | } |
| 333 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"assignment", -1)) | 333 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"assignment", -1, FALSE)) |
| 334 | { | 334 | { |
| 335 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_ASSIGNMENT; | 335 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_ASSIGNMENT; |
| 336 | } | 336 | } |
| @@ -339,7 +339,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 339 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 339 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 340 | } | 340 | } |
| 341 | } | 341 | } |
| 342 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"ExtensionSearch", -1)) | 342 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"ExtensionSearch", -1, FALSE)) |
| 343 | { | 343 | { |
| 344 | pSearch->Type = BURN_SEARCH_TYPE_EXTENSION; | 344 | pSearch->Type = BURN_SEARCH_TYPE_EXTENSION; |
| 345 | 345 | ||
| @@ -350,7 +350,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 350 | hr = BurnExtensionFindById(pBurnExtensions, scz, &pSearch->ExtensionSearch.pExtension); | 350 | hr = BurnExtensionFindById(pBurnExtensions, scz, &pSearch->ExtensionSearch.pExtension); |
| 351 | ExitOnRootFailure(hr, "Failed to find extension '%ls' for search '%ls'", scz, pSearch->sczKey); | 351 | ExitOnRootFailure(hr, "Failed to find extension '%ls' for search '%ls'", scz, pSearch->sczKey); |
| 352 | } | 352 | } |
| 353 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"SetVariable", -1)) | 353 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"SetVariable", -1, FALSE)) |
| 354 | { | 354 | { |
| 355 | pSearch->Type = BURN_SEARCH_TYPE_SET_VARIABLE; | 355 | pSearch->Type = BURN_SEARCH_TYPE_SET_VARIABLE; |
| 356 | 356 | ||
| @@ -367,19 +367,19 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 367 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 367 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 368 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 368 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 369 | 369 | ||
| 370 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) | 370 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE)) |
| 371 | { | 371 | { |
| 372 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_FORMATTED; | 372 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_FORMATTED; |
| 373 | } | 373 | } |
| 374 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) | 374 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE)) |
| 375 | { | 375 | { |
| 376 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_NUMERIC; | 376 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_NUMERIC; |
| 377 | } | 377 | } |
| 378 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) | 378 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE)) |
| 379 | { | 379 | { |
| 380 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_STRING; | 380 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_STRING; |
| 381 | } | 381 | } |
| 382 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 382 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 383 | { | 383 | { |
| 384 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_VERSION; | 384 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_VERSION; |
| 385 | } | 385 | } |
