aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2025-11-01 21:52:31 -0700
committerRob Mensching <rob@firegiant.com>2025-11-03 14:49:39 -0800
commitd2ba0da55725f2908b67e1470afc7cfd71cb3d1f (patch)
treec2a1db61c5fac031c698976106bba2c453d85ded /src
parent4d626c294c4783d454e27ea4e5614037dac8576e (diff)
downloadwix-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')
-rw-r--r--src/api/burn/balutil/balinfo.cpp34
-rw-r--r--src/api/burn/balutil/balretry.cpp2
-rw-r--r--src/api/burn/bextutil/bextutil.cpp2
-rw-r--r--src/burn/engine/approvedexe.cpp2
-rw-r--r--src/burn/engine/bundlepackageengine.cpp8
-rw-r--r--src/burn/engine/burnextension.cpp2
-rw-r--r--src/burn/engine/burnpipe.cpp2
-rw-r--r--src/burn/engine/condition.cpp10
-rw-r--r--src/burn/engine/container.cpp2
-rw-r--r--src/burn/engine/exeengine.cpp12
-rw-r--r--src/burn/engine/logging.cpp2
-rw-r--r--src/burn/engine/manifest.cpp2
-rw-r--r--src/burn/engine/mspengine.cpp6
-rw-r--r--src/burn/engine/package.cpp28
-rw-r--r--src/burn/engine/payload.cpp4
-rw-r--r--src/burn/engine/registration.cpp8
-rw-r--r--src/burn/engine/relatedbundle.cpp2
-rw-r--r--src/burn/engine/search.cpp66
-rw-r--r--src/burn/engine/variable.cpp12
-rw-r--r--src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp4
-rw-r--r--src/ext/Iis/ca/scafilter.cpp4
-rw-r--r--src/ext/NetFx/be/netfxsearch.cpp8
-rw-r--r--src/ext/Util/be/utilsearch.cpp6
-rw-r--r--src/libs/dutil/WixToolset.DUtil/apuputil.cpp32
-rw-r--r--src/libs/dutil/WixToolset.DUtil/atomutil.cpp66
-rw-r--r--src/libs/dutil/WixToolset.DUtil/dictutil.cpp11
-rw-r--r--src/libs/dutil/WixToolset.DUtil/iniutil.cpp10
-rw-r--r--src/libs/dutil/WixToolset.DUtil/locutil.cpp6
-rw-r--r--src/libs/dutil/WixToolset.DUtil/monutil.cpp4
-rw-r--r--src/libs/dutil/WixToolset.DUtil/sceutil.cpp16
-rw-r--r--src/libs/dutil/WixToolset.DUtil/thmutil.cpp70
-rw-r--r--src/libs/dutil/WixToolset.DUtil/xmlutil.cpp4
-rw-r--r--src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp4
-rw-r--r--src/tools/thmviewer/thmviewer.cpp6
34 files changed, 226 insertions, 231 deletions
diff --git a/src/api/burn/balutil/balinfo.cpp b/src/api/burn/balutil/balinfo.cpp
index 8784a380..38c4bd18 100644
--- a/src/api/burn/balutil/balinfo.cpp
+++ b/src/api/burn/balutil/balinfo.cpp
@@ -190,7 +190,7 @@ DAPI_(HRESULT) BalInfoAddRelatedBundleAsPackage(
190 // Check to see if the bundle is already in the list of packages. 190 // Check to see if the bundle is already in the list of packages.
191 for (DWORD i = 0; i < pPackages->cPackages; ++i) 191 for (DWORD i = 0; i < pPackages->cPackages; ++i)
192 { 192 {
193 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzId, -1, pPackages->rgPackages[i].sczId, -1)) 193 if (CSTR_EQUAL == ::CompareStringOrdinal(wzId, -1, pPackages->rgPackages[i].sczId, -1, FALSE))
194 { 194 {
195 ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)); 195 ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS));
196 } 196 }
@@ -232,7 +232,7 @@ DAPI_(HRESULT) BalInfoAddUpdateBundleAsPackage(
232 // Check to see if the bundle is already in the list of packages. 232 // Check to see if the bundle is already in the list of packages.
233 for (DWORD i = 0; i < pPackages->cPackages; ++i) 233 for (DWORD i = 0; i < pPackages->cPackages; ++i)
234 { 234 {
235 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzId, -1, pPackages->rgPackages[i].sczId, -1)) 235 if (CSTR_EQUAL == ::CompareStringOrdinal(wzId, -1, pPackages->rgPackages[i].sczId, -1, FALSE))
236 { 236 {
237 ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)); 237 ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS));
238 } 238 }
@@ -270,7 +270,7 @@ DAPI_(HRESULT) BalInfoFindPackageById(
270 270
271 for (DWORD i = 0; i < pPackages->cPackages; ++i) 271 for (DWORD i = 0; i < pPackages->cPackages; ++i)
272 { 272 {
273 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzId, -1, pPackages->rgPackages[i].sczId, -1)) 273 if (CSTR_EQUAL == ::CompareStringOrdinal(wzId, -1, pPackages->rgPackages[i].sczId, -1, FALSE))
274 { 274 {
275 *ppPackage = pPackages->rgPackages + i; 275 *ppPackage = pPackages->rgPackages + i;
276 break; 276 break;
@@ -409,23 +409,23 @@ static HRESULT ParsePackagesFromXml(
409 hr = XmlGetAttributeEx(pNode, L"PackageType", &scz); 409 hr = XmlGetAttributeEx(pNode, L"PackageType", &scz);
410 ExitOnRequiredXmlQueryFailure(hr, "Failed to get package type for package."); 410 ExitOnRequiredXmlQueryFailure(hr, "Failed to get package type for package.");
411 411
412 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Bundle", -1, scz, -1)) 412 if (CSTR_EQUAL == ::CompareStringOrdinal(L"Bundle", -1, scz, -1, FALSE))
413 { 413 {
414 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_BUNDLE_CHAIN; 414 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_BUNDLE_CHAIN;
415 } 415 }
416 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Exe", -1, scz, -1)) 416 else if (CSTR_EQUAL == ::CompareStringOrdinal(L"Exe", -1, scz, -1, FALSE))
417 { 417 {
418 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_EXE; 418 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_EXE;
419 } 419 }
420 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Msi", -1, scz, -1)) 420 else if (CSTR_EQUAL == ::CompareStringOrdinal(L"Msi", -1, scz, -1, FALSE))
421 { 421 {
422 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSI; 422 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSI;
423 } 423 }
424 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Msp", -1, scz, -1)) 424 else if (CSTR_EQUAL == ::CompareStringOrdinal(L"Msp", -1, scz, -1, FALSE))
425 { 425 {
426 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSP; 426 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSP;
427 } 427 }
428 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Msu", -1, scz, -1)) 428 else if (CSTR_EQUAL == ::CompareStringOrdinal(L"Msu", -1, scz, -1, FALSE))
429 { 429 {
430 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSU; 430 prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSU;
431 } 431 }
@@ -454,15 +454,15 @@ static HRESULT ParsePackagesFromXml(
454 hr = XmlGetAttributeEx(pNode, L"Cache", &scz); 454 hr = XmlGetAttributeEx(pNode, L"Cache", &scz);
455 ExitOnRequiredXmlQueryFailure(hr, "Failed to get cache type for package."); 455 ExitOnRequiredXmlQueryFailure(hr, "Failed to get cache type for package.");
456 456
457 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"remove", -1)) 457 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"remove", -1, FALSE))
458 { 458 {
459 prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE; 459 prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE;
460 } 460 }
461 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"keep", -1)) 461 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"keep", -1, FALSE))
462 { 462 {
463 prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP; 463 prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP;
464 } 464 }
465 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"force", -1)) 465 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"force", -1, FALSE))
466 { 466 {
467 prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE; 467 prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE;
468 } 468 }
@@ -522,19 +522,19 @@ static HRESULT ParseBalPackageInfoFromXml(
522 522
523 if (fXmlFound) 523 if (fXmlFound)
524 { 524 {
525 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"default", -1)) 525 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"default", -1, FALSE))
526 { 526 {
527 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_DEFAULT; 527 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_DEFAULT;
528 } 528 }
529 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"x86", -1)) 529 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"x86", -1, FALSE))
530 { 530 {
531 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X86; 531 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X86;
532 } 532 }
533 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"x64", -1)) 533 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"x64", -1, FALSE))
534 { 534 {
535 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X64; 535 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X64;
536 } 536 }
537 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"arm64", -1)) 537 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"arm64", -1, FALSE))
538 { 538 {
539 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_ARM64; 539 pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_ARM64;
540 } 540 }
@@ -611,11 +611,11 @@ static HRESULT ParseOverridableVariablesFromXml(
611 hr = XmlGetAttributeEx(pCommandLineNode, L"VariableType", &scz); 611 hr = XmlGetAttributeEx(pCommandLineNode, L"VariableType", &scz);
612 ExitOnRequiredXmlQueryFailure(hr, "Failed to get command line variable type."); 612 ExitOnRequiredXmlQueryFailure(hr, "Failed to get command line variable type.");
613 613
614 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"caseInsensitive", -1)) 614 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"caseInsensitive", -1, FALSE))
615 { 615 {
616 pOverridableVariables->commandLineType = BAL_INFO_VARIABLE_COMMAND_LINE_TYPE_CASE_INSENSITIVE; 616 pOverridableVariables->commandLineType = BAL_INFO_VARIABLE_COMMAND_LINE_TYPE_CASE_INSENSITIVE;
617 } 617 }
618 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"caseSensitive", -1)) 618 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"caseSensitive", -1, FALSE))
619 { 619 {
620 pOverridableVariables->commandLineType = BAL_INFO_VARIABLE_COMMAND_LINE_TYPE_CASE_SENSITIVE; 620 pOverridableVariables->commandLineType = BAL_INFO_VARIABLE_COMMAND_LINE_TYPE_CASE_SENSITIVE;
621 } 621 }
diff --git a/src/api/burn/balutil/balretry.cpp b/src/api/burn/balutil/balretry.cpp
index d2973026..0c686ad2 100644
--- a/src/api/burn/balutil/balretry.cpp
+++ b/src/api/burn/balutil/balretry.cpp
@@ -211,7 +211,7 @@ static BOOL IsActiveRetryEntry(
211{ 211{
212 BOOL fActive = FALSE; 212 BOOL fActive = FALSE;
213 213
214 fActive = vrgRetryInfo[type].sczId && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, sczId, -1, vrgRetryInfo[type].sczId, -1); 214 fActive = vrgRetryInfo[type].sczId && CSTR_EQUAL == ::CompareStringOrdinal(sczId, -1, vrgRetryInfo[type].sczId, -1, FALSE);
215 215
216 return fActive; 216 return fActive;
217} 217}
diff --git a/src/api/burn/bextutil/bextutil.cpp b/src/api/burn/bextutil/bextutil.cpp
index 6f960ef5..fb1b03c8 100644
--- a/src/api/burn/bextutil/bextutil.cpp
+++ b/src/api/burn/bextutil/bextutil.cpp
@@ -87,7 +87,7 @@ DAPI_(HRESULT) BextGetBootstrapperExtensionDataNode(
87 hr = XmlGetAttributeEx(pixnNode, L"Id", &sczId); 87 hr = XmlGetAttributeEx(pixnNode, L"Id", &sczId);
88 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Id."); 88 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Id.");
89 89
90 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczId, -1, wzExtensionId, -1)) 90 if (CSTR_EQUAL == ::CompareStringOrdinal(sczId, -1, wzExtensionId, -1, FALSE))
91 { 91 {
92 *ppixnBootstrapperExtension = pixnNode; 92 *ppixnBootstrapperExtension = pixnNode;
93 pixnNode = NULL; 93 pixnNode = NULL;
diff --git a/src/burn/engine/approvedexe.cpp b/src/burn/engine/approvedexe.cpp
index 383ee7fa..27ec2adc 100644
--- a/src/burn/engine/approvedexe.cpp
+++ b/src/burn/engine/approvedexe.cpp
@@ -129,7 +129,7 @@ extern "C" HRESULT ApprovedExesFindById(
129 { 129 {
130 pApprovedExe = &pApprovedExes->rgApprovedExes[i]; 130 pApprovedExe = &pApprovedExes->rgApprovedExes[i];
131 131
132 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pApprovedExe->sczId, -1, wzId, -1)) 132 if (CSTR_EQUAL == ::CompareStringOrdinal(pApprovedExe->sczId, -1, wzId, -1, FALSE))
133 { 133 {
134 *ppApprovedExe = pApprovedExe; 134 *ppApprovedExe = pApprovedExe;
135 ExitFunction1(hr = S_OK); 135 ExitFunction1(hr = S_OK);
diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp
index 1a8ba982..7ada5f6a 100644
--- a/src/burn/engine/bundlepackageengine.cpp
+++ b/src/burn/engine/bundlepackageengine.cpp
@@ -146,7 +146,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
146 hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode); 146 hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode);
147 ExitOnFailure(hr, "Failed to get @Code."); 147 ExitOnFailure(hr, "Failed to get @Code.");
148 148
149 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Detect", -1)) 149 if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Detect", -1, FALSE))
150 { 150 {
151 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5); 151 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5);
152 ExitOnFailure(hr, "Failed to resize Detect code array"); 152 ExitOnFailure(hr, "Failed to resize Detect code array");
@@ -155,7 +155,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
155 sczCode = NULL; 155 sczCode = NULL;
156 *pcDetectCodes += 1; 156 *pcDetectCodes += 1;
157 } 157 }
158 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Upgrade", -1)) 158 else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Upgrade", -1, FALSE))
159 { 159 {
160 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5); 160 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5);
161 ExitOnFailure(hr, "Failed to resize Upgrade code array"); 161 ExitOnFailure(hr, "Failed to resize Upgrade code array");
@@ -164,7 +164,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
164 sczCode = NULL; 164 sczCode = NULL;
165 *pcUpgradeCodes += 1; 165 *pcUpgradeCodes += 1;
166 } 166 }
167 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Addon", -1)) 167 else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Addon", -1, FALSE))
168 { 168 {
169 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5); 169 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5);
170 ExitOnFailure(hr, "Failed to resize Addon code array"); 170 ExitOnFailure(hr, "Failed to resize Addon code array");
@@ -173,7 +173,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
173 sczCode = NULL; 173 sczCode = NULL;
174 *pcAddonCodes += 1; 174 *pcAddonCodes += 1;
175 } 175 }
176 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Patch", -1)) 176 else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Patch", -1, FALSE))
177 { 177 {
178 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5); 178 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5);
179 ExitOnFailure(hr, "Failed to resize Patch code array"); 179 ExitOnFailure(hr, "Failed to resize Patch code array");
diff --git a/src/burn/engine/burnextension.cpp b/src/burn/engine/burnextension.cpp
index 536dbcc9..50657f32 100644
--- a/src/burn/engine/burnextension.cpp
+++ b/src/burn/engine/burnextension.cpp
@@ -214,7 +214,7 @@ EXTERN_C HRESULT BurnExtensionFindById(
214 { 214 {
215 pExtension = &pBurnExtensions->rgExtensions[i]; 215 pExtension = &pBurnExtensions->rgExtensions[i];
216 216
217 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pExtension->sczId, -1, wzId, -1)) 217 if (CSTR_EQUAL == ::CompareStringOrdinal(pExtension->sczId, -1, wzId, -1, FALSE))
218 { 218 {
219 *ppExtension = pExtension; 219 *ppExtension = pExtension;
220 ExitFunction1(hr = S_OK); 220 ExitFunction1(hr = S_OK);
diff --git a/src/burn/engine/burnpipe.cpp b/src/burn/engine/burnpipe.cpp
index 25d602b1..ec85822e 100644
--- a/src/burn/engine/burnpipe.cpp
+++ b/src/burn/engine/burnpipe.cpp
@@ -515,7 +515,7 @@ static HRESULT ChildPipeConnected(
515 ExitOnFailure(hr, "Failed to read verification secret from parent pipe."); 515 ExitOnFailure(hr, "Failed to read verification secret from parent pipe.");
516 516
517 // Verify the secrets match. 517 // Verify the secrets match.
518 if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, 0, sczVerificationSecret, -1, wzSecret, -1)) 518 if (CSTR_EQUAL != ::CompareStringOrdinal(sczVerificationSecret, -1, wzSecret, -1, FALSE))
519 { 519 {
520 hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA); 520 hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
521 ExitOnRootFailure(hr, "Verification secret from parent does not match."); 521 ExitOnRootFailure(hr, "Verification secret from parent does not match.");
diff --git a/src/burn/engine/condition.cpp b/src/burn/engine/condition.cpp
index ecce2d5c..3719ce79 100644
--- a/src/burn/engine/condition.cpp
+++ b/src/burn/engine/condition.cpp
@@ -928,7 +928,7 @@ static HRESULT CompareStringValues(
928 ) 928 )
929{ 929{
930 HRESULT hr = S_OK; 930 HRESULT hr = S_OK;
931 DWORD dwCompareString = (comparison & INSENSITIVE) ? NORM_IGNORECASE : 0; 931 BOOL fIgnoreCase = (comparison & INSENSITIVE) ? TRUE : FALSE;
932 size_t cchLeftSize = 0; 932 size_t cchLeftSize = 0;
933 size_t cchRightSize = 0; 933 size_t cchRightSize = 0;
934 int cchLeft = 0; 934 int cchLeft = 0;
@@ -958,7 +958,7 @@ static HRESULT CompareStringValues(
958 case BURN_SYMBOL_TYPE_EQ_I: 958 case BURN_SYMBOL_TYPE_EQ_I:
959 case BURN_SYMBOL_TYPE_NE_I: 959 case BURN_SYMBOL_TYPE_NE_I:
960 { 960 {
961 int i = ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand, cchLeft, wzRightOperand, cchRight); 961 int i = ::CompareStringOrdinal(wzLeftOperand, cchLeft, wzRightOperand, cchRight, fIgnoreCase);
962 hr = CompareIntegerValues(comparison, i, CSTR_EQUAL, pfResult); 962 hr = CompareIntegerValues(comparison, i, CSTR_EQUAL, pfResult);
963 } 963 }
964 break; 964 break;
@@ -967,7 +967,7 @@ static HRESULT CompareStringValues(
967 // test if left string contains right string 967 // test if left string contains right string
968 for (int i = 0; (i + cchRight) <= cchLeft; ++i) 968 for (int i = 0; (i + cchRight) <= cchLeft; ++i)
969 { 969 {
970 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand + i, cchRight, wzRightOperand, cchRight)) 970 if (CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand + i, cchRight, wzRightOperand, cchRight, fIgnoreCase))
971 { 971 {
972 *pfResult = TRUE; 972 *pfResult = TRUE;
973 ExitFunction(); 973 ExitFunction();
@@ -978,12 +978,12 @@ static HRESULT CompareStringValues(
978 case BURN_SYMBOL_TYPE_HIEQ: 978 case BURN_SYMBOL_TYPE_HIEQ:
979 case BURN_SYMBOL_TYPE_HIEQ_I: 979 case BURN_SYMBOL_TYPE_HIEQ_I:
980 // test if left string starts with right string 980 // test if left string starts with right string
981 *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand, cchRight, wzRightOperand, cchRight); 981 *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand, cchRight, wzRightOperand, cchRight, fIgnoreCase);
982 break; 982 break;
983 case BURN_SYMBOL_TYPE_LOEQ: 983 case BURN_SYMBOL_TYPE_LOEQ:
984 case BURN_SYMBOL_TYPE_LOEQ_I: 984 case BURN_SYMBOL_TYPE_LOEQ_I:
985 // test if left string ends with right string 985 // test if left string ends with right string
986 *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand + (cchLeft - cchRight), cchRight, wzRightOperand, cchRight); 986 *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand + (cchLeft - cchRight), cchRight, wzRightOperand, cchRight, fIgnoreCase);
987 break; 987 break;
988 default: 988 default:
989 ExitFunction1(hr = E_INVALIDARG); 989 ExitFunction1(hr = E_INVALIDARG);
diff --git a/src/burn/engine/container.cpp b/src/burn/engine/container.cpp
index fad010cf..41ab0919 100644
--- a/src/burn/engine/container.cpp
+++ b/src/burn/engine/container.cpp
@@ -400,7 +400,7 @@ extern "C" HRESULT ContainerFindById(
400 { 400 {
401 pContainer = &pContainers->rgContainers[i]; 401 pContainer = &pContainers->rgContainers[i];
402 402
403 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pContainer->sczId, -1, wzId, -1)) 403 if (CSTR_EQUAL == ::CompareStringOrdinal(pContainer->sczId, -1, wzId, -1, FALSE))
404 { 404 {
405 *ppContainer = pContainer; 405 *ppContainer = pContainer;
406 ExitFunction1(hr = S_OK); 406 ExitFunction1(hr = S_OK);
diff --git a/src/burn/engine/exeengine.cpp b/src/burn/engine/exeengine.cpp
index 3a2816dd..4df762da 100644
--- a/src/burn/engine/exeengine.cpp
+++ b/src/burn/engine/exeengine.cpp
@@ -25,15 +25,15 @@ extern "C" HRESULT ExeEngineParsePackageFromXml(
25 hr = XmlGetAttributeEx(pixnExePackage, L"DetectionType", &scz); 25 hr = XmlGetAttributeEx(pixnExePackage, L"DetectionType", &scz);
26 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @DetectionType."); 26 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @DetectionType.");
27 27
28 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"condition", -1)) 28 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"condition", -1, FALSE))
29 { 29 {
30 pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_CONDITION; 30 pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_CONDITION;
31 } 31 }
32 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"arp", -1)) 32 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"arp", -1, FALSE))
33 { 33 {
34 pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_ARP; 34 pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_ARP;
35 } 35 }
36 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"none", -1)) 36 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"none", -1, FALSE))
37 { 37 {
38 pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_NONE; 38 pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_NONE;
39 } 39 }
@@ -114,15 +114,15 @@ extern "C" HRESULT ExeEngineParsePackageFromXml(
114 114
115 if (fFoundXml) 115 if (fFoundXml)
116 { 116 {
117 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"burn", -1)) 117 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"burn", -1, FALSE))
118 { 118 {
119 pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_BURN; 119 pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_BURN;
120 } 120 }
121 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"netfx4", -1)) 121 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"netfx4", -1, FALSE))
122 { 122 {
123 pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NETFX4; 123 pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NETFX4;
124 } 124 }
125 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"none", -1)) 125 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"none", -1, FALSE))
126 { 126 {
127 pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NONE; 127 pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NONE;
128 } 128 }
diff --git a/src/burn/engine/logging.cpp b/src/burn/engine/logging.cpp
index 60c16c01..51b546ad 100644
--- a/src/burn/engine/logging.cpp
+++ b/src/burn/engine/logging.cpp
@@ -1052,7 +1052,7 @@ static HRESULT GetNonSessionSpecificTempFolder(
1052 hr = ::StringCchLengthW(sczSessionId, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchSessionId)); 1052 hr = ::StringCchLengthW(sczSessionId, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchSessionId));
1053 ExitOnFailure(hr, "Failed to get length of session id string."); 1053 ExitOnFailure(hr, "Failed to get length of session id string.");
1054 1054
1055 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, sczTempFolder + cchTempFolder - cchSessionId, static_cast<DWORD>(cchSessionId), sczSessionId, static_cast<DWORD>(cchSessionId))) 1055 if (CSTR_EQUAL == ::CompareStringOrdinal(sczTempFolder + cchTempFolder - cchSessionId, static_cast<DWORD>(cchSessionId), sczSessionId, static_cast<DWORD>(cchSessionId), FALSE))
1056 { 1056 {
1057 cchTempFolder -= cchSessionId; 1057 cchTempFolder -= cchSessionId;
1058 } 1058 }
diff --git a/src/burn/engine/manifest.cpp b/src/burn/engine/manifest.cpp
index 266d1987..b2680387 100644
--- a/src/burn/engine/manifest.cpp
+++ b/src/burn/engine/manifest.cpp
@@ -177,7 +177,7 @@ static void ValidateHarvestingAttributes(
177 hr = XmlGetYesNoAttribute(pixeBundle, L"Win64", &fWin64); 177 hr = XmlGetYesNoAttribute(pixeBundle, L"Win64", &fWin64);
178 ExitOnRequiredXmlQueryFailure(hr, "Failed to get BurnManifest/@Win64 attribute."); 178 ExitOnRequiredXmlQueryFailure(hr, "Failed to get BurnManifest/@Win64 attribute.");
179 179
180 Assert(CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczEngineVersion, -1, wzVerMajorMinorBuild, -1)); 180 Assert(CSTR_EQUAL == ::CompareStringOrdinal(sczEngineVersion, -1, wzVerMajorMinorBuild, -1, FALSE));
181 181
182 Assert(BURN_PROTOCOL_VERSION == dwProtocolVersion); 182 Assert(BURN_PROTOCOL_VERSION == dwProtocolVersion);
183 183
diff --git a/src/burn/engine/mspengine.cpp b/src/burn/engine/mspengine.cpp
index c057c06d..e8ef7fcb 100644
--- a/src/burn/engine/mspengine.cpp
+++ b/src/burn/engine/mspengine.cpp
@@ -771,7 +771,7 @@ extern "C" void MspEngineUpdateInstallRegistrationState(
771 { 771 {
772 pTargetProduct = pPackage->Msp.rgTargetProducts + j; 772 pTargetProduct = pPackage->Msp.rgTargetProducts + j;
773 if (pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) && 773 if (pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) &&
774 CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1)) 774 CSTR_EQUAL == ::CompareStringOrdinal(pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1, FALSE))
775 { 775 {
776 break; 776 break;
777 } 777 }
@@ -1069,7 +1069,7 @@ static HRESULT DeterminePatchChainedTarget(
1069 { 1069 {
1070 BURN_PACKAGE* pPackage = pPackages->rgPackages + iPackage; 1070 BURN_PACKAGE* pPackage = pPackages->rgPackages + iPackage;
1071 1071
1072 if (BURN_PACKAGE_TYPE_MSI == pPackage->type && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzTargetProductCode, -1, pPackage->Msi.sczProductCode, -1)) 1072 if (BURN_PACKAGE_TYPE_MSI == pPackage->type && CSTR_EQUAL == ::CompareStringOrdinal(wzTargetProductCode, -1, pPackage->Msi.sczProductCode, -1, FALSE))
1073 { 1073 {
1074 pTargetProduct->pChainedTargetPackage = pPackage; 1074 pTargetProduct->pChainedTargetPackage = pPackage;
1075 1075
@@ -1123,7 +1123,7 @@ static HRESULT PlanTargetProduct(
1123 if (BURN_EXECUTE_ACTION_TYPE_MSP_TARGET == pAction->type && 1123 if (BURN_EXECUTE_ACTION_TYPE_MSP_TARGET == pAction->type &&
1124 pAction->mspTarget.action == actionState && 1124 pAction->mspTarget.action == actionState &&
1125 pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) && 1125 pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) &&
1126 CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1)) 1126 CSTR_EQUAL == ::CompareStringOrdinal(pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1, FALSE))
1127 { 1127 {
1128 dwInsertSequence = i; 1128 dwInsertSequence = i;
1129 break; 1129 break;
diff --git a/src/burn/engine/package.cpp b/src/burn/engine/package.cpp
index fe8af497..3bf676ba 100644
--- a/src/burn/engine/package.cpp
+++ b/src/burn/engine/package.cpp
@@ -123,15 +123,15 @@ extern "C" HRESULT PackagesParseFromXml(
123 123
124 if (fFoundXml) 124 if (fFoundXml)
125 { 125 {
126 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"remove", -1)) 126 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"remove", -1, FALSE))
127 { 127 {
128 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE; 128 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE;
129 } 129 }
130 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"keep", -1)) 130 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"keep", -1, FALSE))
131 { 131 {
132 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP; 132 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP;
133 } 133 }
134 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"force", -1)) 134 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"force", -1, FALSE))
135 { 135 {
136 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE; 136 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE;
137 } 137 }
@@ -210,28 +210,28 @@ extern "C" HRESULT PackagesParseFromXml(
210 } 210 }
211 211
212 // read type specific attributes 212 // read type specific attributes
213 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"BundlePackage", -1)) 213 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"BundlePackage", -1, FALSE))
214 { 214 {
215 pPackage->type = BURN_PACKAGE_TYPE_BUNDLE; 215 pPackage->type = BURN_PACKAGE_TYPE_BUNDLE;
216 216
217 hr = BundlePackageEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization 217 hr = BundlePackageEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization
218 ExitOnFailure(hr, "Failed to parse BUNDLE package."); 218 ExitOnFailure(hr, "Failed to parse BUNDLE package.");
219 } 219 }
220 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"ExePackage", -1)) 220 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"ExePackage", -1, FALSE))
221 { 221 {
222 pPackage->type = BURN_PACKAGE_TYPE_EXE; 222 pPackage->type = BURN_PACKAGE_TYPE_EXE;
223 223
224 hr = ExeEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization 224 hr = ExeEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization
225 ExitOnFailure(hr, "Failed to parse EXE package."); 225 ExitOnFailure(hr, "Failed to parse EXE package.");
226 } 226 }
227 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiPackage", -1)) 227 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiPackage", -1, FALSE))
228 { 228 {
229 pPackage->type = BURN_PACKAGE_TYPE_MSI; 229 pPackage->type = BURN_PACKAGE_TYPE_MSI;
230 230
231 hr = MsiEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization 231 hr = MsiEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization
232 ExitOnFailure(hr, "Failed to parse MSI package."); 232 ExitOnFailure(hr, "Failed to parse MSI package.");
233 } 233 }
234 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MspPackage", -1)) 234 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MspPackage", -1, FALSE))
235 { 235 {
236 pPackage->type = BURN_PACKAGE_TYPE_MSP; 236 pPackage->type = BURN_PACKAGE_TYPE_MSP;
237 237
@@ -240,7 +240,7 @@ extern "C" HRESULT PackagesParseFromXml(
240 240
241 ++cMspPackages; 241 ++cMspPackages;
242 } 242 }
243 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsuPackage", -1)) 243 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsuPackage", -1, FALSE))
244 { 244 {
245 pPackage->type = BURN_PACKAGE_TYPE_MSU; 245 pPackage->type = BURN_PACKAGE_TYPE_MSU;
246 246
@@ -315,7 +315,7 @@ extern "C" HRESULT PackagesParseFromXml(
315 { 315 {
316 for (DWORD k = 0; k < pMsiPackage->Msi.cSlipstreamMspPackages; ++k) 316 for (DWORD k = 0; k < pMsiPackage->Msi.cSlipstreamMspPackages; ++k)
317 { 317 {
318 if (pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k] && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k], -1)) 318 if (pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k] && CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k], -1, FALSE))
319 { 319 {
320 BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pMsiPackage->Msi.rgSlipstreamMsps + k; 320 BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pMsiPackage->Msi.rgSlipstreamMsps + k;
321 pSlipstreamMsp->pMspPackage = pPackage; 321 pSlipstreamMsp->pMspPackage = pPackage;
@@ -486,7 +486,7 @@ extern "C" HRESULT PackageFindById(
486 { 486 {
487 pPackage = &pPackages->rgPackages[i]; 487 pPackage = &pPackages->rgPackages[i];
488 488
489 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, wzId, -1)) 489 if (CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, wzId, -1, FALSE))
490 { 490 {
491 *ppPackage = pPackage; 491 *ppPackage = pPackage;
492 ExitFunction1(hr = S_OK); 492 ExitFunction1(hr = S_OK);
@@ -508,7 +508,7 @@ extern "C" HRESULT PackageFindRelatedById(
508{ 508{
509 HRESULT hr = S_OK; 509 HRESULT hr = S_OK;
510 BURN_RELATED_BUNDLE* pRelatedBundle = NULL; 510 BURN_RELATED_BUNDLE* pRelatedBundle = NULL;
511 511
512 hr = RelatedBundleFindById(pRelatedBundles, wzId, &pRelatedBundle); 512 hr = RelatedBundleFindById(pRelatedBundles, wzId, &pRelatedBundle);
513 *ppPackage = FAILED(hr) ? NULL : &pRelatedBundle->package; 513 *ppPackage = FAILED(hr) ? NULL : &pRelatedBundle->package;
514 514
@@ -551,7 +551,7 @@ extern "C" HRESULT PackageGetProperty(
551 { 551 {
552 const BURN_MSIPROPERTY* pProperty = &rgProperties[i]; 552 const BURN_MSIPROPERTY* pProperty = &rgProperties[i];
553 553
554 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pProperty->sczId, -1, wzProperty, -1)) 554 if (CSTR_EQUAL == ::CompareStringOrdinal(pProperty->sczId, -1, wzProperty, -1, FALSE))
555 { 555 {
556 if (psczValue) 556 if (psczValue)
557 { 557 {
@@ -580,7 +580,7 @@ extern "C" HRESULT PackageFindRollbackBoundaryById(
580 { 580 {
581 pRollbackBoundary = &pPackages->rgRollbackBoundaries[i]; 581 pRollbackBoundary = &pPackages->rgRollbackBoundaries[i];
582 582
583 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pRollbackBoundary->sczId, -1, wzId, -1)) 583 if (CSTR_EQUAL == ::CompareStringOrdinal(pRollbackBoundary->sczId, -1, wzId, -1, FALSE))
584 { 584 {
585 *ppRollbackBoundary = pRollbackBoundary; 585 *ppRollbackBoundary = pRollbackBoundary;
586 ExitFunction1(hr = S_OK); 586 ExitFunction1(hr = S_OK);
@@ -730,7 +730,7 @@ static HRESULT FindRollbackBoundaryById(
730 { 730 {
731 pRollbackBoundary = &pPackages->rgRollbackBoundaries[i]; 731 pRollbackBoundary = &pPackages->rgRollbackBoundaries[i];
732 732
733 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pRollbackBoundary->sczId, -1, wzId, -1)) 733 if (CSTR_EQUAL == ::CompareStringOrdinal(pRollbackBoundary->sczId, -1, wzId, -1, FALSE))
734 { 734 {
735 *ppRollbackBoundary = pRollbackBoundary; 735 *ppRollbackBoundary = pRollbackBoundary;
736 ExitFunction1(hr = S_OK); 736 ExitFunction1(hr = S_OK);
diff --git a/src/burn/engine/payload.cpp b/src/burn/engine/payload.cpp
index 270da6aa..a2649f97 100644
--- a/src/burn/engine/payload.cpp
+++ b/src/burn/engine/payload.cpp
@@ -80,11 +80,11 @@ extern "C" HRESULT PayloadsParseFromXml(
80 hr = XmlGetAttributeEx(pixnNode, L"Packaging", &scz); 80 hr = XmlGetAttributeEx(pixnNode, L"Packaging", &scz);
81 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Packaging."); 81 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Packaging.");
82 82
83 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"embedded", -1)) 83 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"embedded", -1, FALSE))
84 { 84 {
85 pPayload->packaging = BURN_PAYLOAD_PACKAGING_EMBEDDED; 85 pPayload->packaging = BURN_PAYLOAD_PACKAGING_EMBEDDED;
86 } 86 }
87 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"external", -1)) 87 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"external", -1, FALSE))
88 { 88 {
89 pPayload->packaging = BURN_PAYLOAD_PACKAGING_EXTERNAL; 89 pPayload->packaging = BURN_PAYLOAD_PACKAGING_EXTERNAL;
90 } 90 }
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp
index 966fc849..9733e92c 100644
--- a/src/burn/engine/registration.cpp
+++ b/src/burn/engine/registration.cpp
@@ -223,15 +223,15 @@ extern "C" HRESULT RegistrationParseFromXml(
223 223
224 if (fFoundXml) 224 if (fFoundXml)
225 { 225 {
226 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"button", -1)) 226 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"button", -1, FALSE))
227 { 227 {
228 pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE_BUTTON; 228 pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE_BUTTON;
229 } 229 }
230 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"yes", -1)) 230 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"yes", -1, FALSE))
231 { 231 {
232 pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE; 232 pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE;
233 } 233 }
234 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"no", -1)) 234 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"no", -1, FALSE))
235 { 235 {
236 pRegistration->modify = BURN_REGISTRATION_MODIFY_ENABLED; 236 pRegistration->modify = BURN_REGISTRATION_MODIFY_ENABLED;
237 } 237 }
@@ -1512,7 +1512,7 @@ static HRESULT RemoveUpdateRegistration(
1512 hr = RegReadString(hkKey, L"PackageVersion", &sczPackageVersion); 1512 hr = RegReadString(hkKey, L"PackageVersion", &sczPackageVersion);
1513 if (SUCCEEDED(hr)) 1513 if (SUCCEEDED(hr))
1514 { 1514 {
1515 if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, sczPackageVersion, -1, pRegistration->sczDisplayVersion, -1)) 1515 if (CSTR_EQUAL != ::CompareStringOrdinal(sczPackageVersion, -1, pRegistration->sczDisplayVersion, -1, FALSE))
1516 { 1516 {
1517 fDeleteRegKey = FALSE; 1517 fDeleteRegKey = FALSE;
1518 } 1518 }
diff --git a/src/burn/engine/relatedbundle.cpp b/src/burn/engine/relatedbundle.cpp
index d426dc53..c9aa7170 100644
--- a/src/burn/engine/relatedbundle.cpp
+++ b/src/burn/engine/relatedbundle.cpp
@@ -116,7 +116,7 @@ extern "C" HRESULT RelatedBundleFindById(
116 pRelatedBundle = pRelatedBundles->rgRelatedBundles + i; 116 pRelatedBundle = pRelatedBundles->rgRelatedBundles + i;
117 pPackage = &pRelatedBundle->package; 117 pPackage = &pRelatedBundle->package;
118 118
119 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, wzId, -1)) 119 if (CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, wzId, -1, FALSE))
120 { 120 {
121 *ppRelatedBundle = pRelatedBundle; 121 *ppRelatedBundle = pRelatedBundle;
122 ExitFunction1(hr = S_OK); 122 ExitFunction1(hr = S_OK);
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 }
diff --git a/src/burn/engine/variable.cpp b/src/burn/engine/variable.cpp
index dc59916a..a795d76c 100644
--- a/src/burn/engine/variable.cpp
+++ b/src/burn/engine/variable.cpp
@@ -397,7 +397,7 @@ extern "C" HRESULT VariablesParseFromXml(
397 hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); 397 hr = XmlGetAttributeEx(pixnNode, L"Type", &scz);
398 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); 398 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type.");
399 399
400 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) 400 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE))
401 { 401 {
402 if (!fHidden) 402 if (!fHidden)
403 { 403 {
@@ -405,7 +405,7 @@ extern "C" HRESULT VariablesParseFromXml(
405 } 405 }
406 valueType = BURN_VARIANT_TYPE_FORMATTED; 406 valueType = BURN_VARIANT_TYPE_FORMATTED;
407 } 407 }
408 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) 408 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE))
409 { 409 {
410 if (!fHidden) 410 if (!fHidden)
411 { 411 {
@@ -413,7 +413,7 @@ extern "C" HRESULT VariablesParseFromXml(
413 } 413 }
414 valueType = BURN_VARIANT_TYPE_NUMERIC; 414 valueType = BURN_VARIANT_TYPE_NUMERIC;
415 } 415 }
416 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) 416 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE))
417 { 417 {
418 if (!fHidden) 418 if (!fHidden)
419 { 419 {
@@ -421,7 +421,7 @@ extern "C" HRESULT VariablesParseFromXml(
421 } 421 }
422 valueType = BURN_VARIANT_TYPE_STRING; 422 valueType = BURN_VARIANT_TYPE_STRING;
423 } 423 }
424 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) 424 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE))
425 { 425 {
426 if (!fHidden) 426 if (!fHidden)
427 { 427 {
@@ -1556,7 +1556,7 @@ static HRESULT FindVariableIndexByName(
1556 DWORD iPosition = cRangeLength / 2; 1556 DWORD iPosition = cRangeLength / 2;
1557 BURN_VARIABLE* pVariable = &pVariables->rgVariables[iRangeFirst + iPosition]; 1557 BURN_VARIABLE* pVariable = &pVariables->rgVariables[iRangeFirst + iPosition];
1558 1558
1559 switch (::CompareStringW(LOCALE_INVARIANT, SORT_STRINGSORT, wzVariable, -1, pVariable->sczName, -1)) 1559 switch (::CompareStringOrdinal(wzVariable, -1, pVariable->sczName, -1, FALSE))
1560 { 1560 {
1561 case CSTR_LESS_THAN: 1561 case CSTR_LESS_THAN:
1562 // restrict range to elements before the current 1562 // restrict range to elements before the current
@@ -1591,7 +1591,7 @@ static HRESULT InsertUserVariable(
1591{ 1591{
1592 HRESULT hr = S_OK; 1592 HRESULT hr = S_OK;
1593 1593
1594 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, wzVariable, 3, L"Wix", 3)) 1594 if (CSTR_EQUAL == ::CompareStringOrdinal(wzVariable, 3, L"Wix", 3, FALSE))
1595 { 1595 {
1596 ExitWithRootFailure(hr, E_INVALIDARG, "Attempted to insert variable with reserved prefix: %ls", wzVariable); 1596 ExitWithRootFailure(hr, E_INVALIDARG, "Attempted to insert variable with reserved prefix: %ls", wzVariable);
1597 } 1597 }
diff --git a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp
index 9ddab7c0..6cfe0b4c 100644
--- a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp
+++ b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp
@@ -614,7 +614,7 @@ public: // IBootstrapperApplication
614 { 614 {
615 // After restart we need to finish the dependency registration for our package so allow the package 615 // After restart we need to finish the dependency registration for our package so allow the package
616 // to go present. 616 // to go present.
617 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, m_sczAfterForcedRestartPackage, -1)) 617 if (CSTR_EQUAL == ::CompareStringOrdinal(wzPackageId, -1, m_sczAfterForcedRestartPackage, -1, FALSE))
618 { 618 {
619 // Do not allow a repair because that could put us in a perpetual restart loop. 619 // Do not allow a repair because that could put us in a perpetual restart loop.
620 if (BOOTSTRAPPER_REQUEST_STATE_REPAIR == *pRequestState) 620 if (BOOTSTRAPPER_REQUEST_STATE_REPAIR == *pRequestState)
@@ -3570,7 +3570,7 @@ private:
3570 for (DWORD iAssignControl = 0; iAssignControl < countof(m_rgInitControls); ++iAssignControl) 3570 for (DWORD iAssignControl = 0; iAssignControl < countof(m_rgInitControls); ++iAssignControl)
3571 { 3571 {
3572 THEME_ASSIGN_CONTROL_ID* pAssignControl = m_rgInitControls + iAssignControl; 3572 THEME_ASSIGN_CONTROL_ID* pAssignControl = m_rgInitControls + iAssignControl;
3573 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, pAssignControl->wzName, -1)) 3573 if (CSTR_EQUAL == ::CompareStringOrdinal(pArgs->pThemeControl->sczName, -1, pAssignControl->wzName, -1, FALSE))
3574 { 3574 {
3575 if (!pAssignControl->ppControl) 3575 if (!pAssignControl->ppControl)
3576 { 3576 {
diff --git a/src/ext/Iis/ca/scafilter.cpp b/src/ext/Iis/ca/scafilter.cpp
index 9d9014fd..294e002e 100644
--- a/src/ext/Iis/ca/scafilter.cpp
+++ b/src/ext/Iis/ca/scafilter.cpp
@@ -158,7 +158,7 @@ HRESULT ScaFiltersInstall(
158 { 158 {
159 if (WcaIsInstalling(psf->isInstalled, psf->isAction)) 159 if (WcaIsInstalling(psf->isInstalled, psf->isAction))
160 { 160 {
161 if (!wzPreviousFilterRoot || CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, wzPreviousFilterRoot, -1, psf->wzFilterRoot, -1)) 161 if (!wzPreviousFilterRoot || CSTR_EQUAL != ::CompareStringOrdinal(wzPreviousFilterRoot, -1, psf->wzFilterRoot, -1, FALSE))
162 { 162 {
163 if (pwzLoadOrder) 163 if (pwzLoadOrder)
164 { 164 {
@@ -234,7 +234,7 @@ HRESULT ScaFiltersUninstall(
234 { 234 {
235 if (WcaIsUninstalling(psf->isInstalled, psf->isAction)) 235 if (WcaIsUninstalling(psf->isInstalled, psf->isAction))
236 { 236 {
237 if (!wzPreviousFilterRoot || CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, wzPreviousFilterRoot, -1, psf->wzFilterRoot, -1)) 237 if (!wzPreviousFilterRoot || CSTR_EQUAL != ::CompareStringOrdinal(wzPreviousFilterRoot, -1, psf->wzFilterRoot, -1, FALSE))
238 { 238 {
239 if (pwzLoadOrder) 239 if (pwzLoadOrder)
240 { 240 {
diff --git a/src/ext/NetFx/be/netfxsearch.cpp b/src/ext/NetFx/be/netfxsearch.cpp
index 38c34e3c..6f3373d9 100644
--- a/src/ext/NetFx/be/netfxsearch.cpp
+++ b/src/ext/NetFx/be/netfxsearch.cpp
@@ -46,7 +46,7 @@ STDMETHODIMP NetfxSearchParseFromXml(
46 BextExitOnFailure(hr, "Failed to get @Id."); 46 BextExitOnFailure(hr, "Failed to get @Id.");
47 47
48 // Read type specific attributes. 48 // Read type specific attributes.
49 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"NetFxNetCoreSearch", -1)) 49 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"NetFxNetCoreSearch", -1, FALSE))
50 { 50 {
51 pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SEARCH; 51 pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SEARCH;
52 52
@@ -63,7 +63,7 @@ STDMETHODIMP NetfxSearchParseFromXml(
63 hr = XmlGetAttributeEx(pixnNode, L"MajorVersion", &netCoreSearch.sczMajorVersion); 63 hr = XmlGetAttributeEx(pixnNode, L"MajorVersion", &netCoreSearch.sczMajorVersion);
64 BextExitOnFailure(hr, "Failed to get @MajorVersion."); 64 BextExitOnFailure(hr, "Failed to get @MajorVersion.");
65 } 65 }
66 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"NetFxNetCoreSdkSearch", -1)) 66 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"NetFxNetCoreSdkSearch", -1, FALSE))
67 { 67 {
68 pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SDK_SEARCH; 68 pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SDK_SEARCH;
69 69
@@ -76,7 +76,7 @@ STDMETHODIMP NetfxSearchParseFromXml(
76 hr = XmlGetAttributeEx(pixnNode, L"MajorVersion", &netCoreSdkSearch.sczMajorVersion); 76 hr = XmlGetAttributeEx(pixnNode, L"MajorVersion", &netCoreSdkSearch.sczMajorVersion);
77 BextExitOnFailure(hr, "Failed to get @MajorVersion."); 77 BextExitOnFailure(hr, "Failed to get @MajorVersion.");
78 } 78 }
79 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"NetFxNetCoreSdkFeatureBandSearch", -1)) 79 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"NetFxNetCoreSdkFeatureBandSearch", -1, FALSE))
80 { 80 {
81 pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SDK_FEATURE_BAND_SEARCH; 81 pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SDK_FEATURE_BAND_SEARCH;
82 82
@@ -176,7 +176,7 @@ STDMETHODIMP NetfxSearchFindById(
176 { 176 {
177 NETFX_SEARCH* pSearch = &pSearches->rgSearches[i]; 177 NETFX_SEARCH* pSearch = &pSearches->rgSearches[i];
178 178
179 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pSearch->sczId, -1, wzId, -1)) 179 if (CSTR_EQUAL == ::CompareStringOrdinal(pSearch->sczId, -1, wzId, -1, FALSE))
180 { 180 {
181 *ppSearch = pSearch; 181 *ppSearch = pSearch;
182 ExitFunction1(hr = S_OK); 182 ExitFunction1(hr = S_OK);
diff --git a/src/ext/Util/be/utilsearch.cpp b/src/ext/Util/be/utilsearch.cpp
index 59c497e3..a0818963 100644
--- a/src/ext/Util/be/utilsearch.cpp
+++ b/src/ext/Util/be/utilsearch.cpp
@@ -47,7 +47,7 @@ STDMETHODIMP UtilSearchParseFromXml(
47 BextExitOnFailure(hr, "Failed to get @Id."); 47 BextExitOnFailure(hr, "Failed to get @Id.");
48 48
49 // Read type specific attributes. 49 // Read type specific attributes.
50 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"WixWindowsFeatureSearch", -1)) 50 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"WixWindowsFeatureSearch", -1, FALSE))
51 { 51 {
52 pSearch->Type = UTIL_SEARCH_TYPE_WINDOWS_FEATURE_SEARCH; 52 pSearch->Type = UTIL_SEARCH_TYPE_WINDOWS_FEATURE_SEARCH;
53 53
@@ -55,7 +55,7 @@ STDMETHODIMP UtilSearchParseFromXml(
55 hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); 55 hr = XmlGetAttributeEx(pixnNode, L"Type", &scz);
56 BextExitOnFailure(hr, "Failed to get @Type."); 56 BextExitOnFailure(hr, "Failed to get @Type.");
57 57
58 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"sha2CodeSigning", -1)) 58 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"sha2CodeSigning", -1, FALSE))
59 { 59 {
60 pSearch->WindowsFeatureSearch.type = UTIL_WINDOWS_FEATURE_SEARCH_TYPE_SHA2_CODE_SIGNING; 60 pSearch->WindowsFeatureSearch.type = UTIL_WINDOWS_FEATURE_SEARCH_TYPE_SHA2_CODE_SIGNING;
61 } 61 }
@@ -144,7 +144,7 @@ STDMETHODIMP UtilSearchFindById(
144 { 144 {
145 UTIL_SEARCH* pSearch = &pSearches->rgSearches[i]; 145 UTIL_SEARCH* pSearch = &pSearches->rgSearches[i];
146 146
147 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pSearch->sczId, -1, wzId, -1)) 147 if (CSTR_EQUAL == ::CompareStringOrdinal(pSearch->sczId, -1, wzId, -1, FALSE))
148 { 148 {
149 *ppSearch = pSearch; 149 *ppSearch = pSearch;
150 ExitFunction1(hr = S_OK); 150 ExitFunction1(hr = S_OK);
diff --git a/src/libs/dutil/WixToolset.DUtil/apuputil.cpp b/src/libs/dutil/WixToolset.DUtil/apuputil.cpp
index 62cf4d06..848aac15 100644
--- a/src/libs/dutil/WixToolset.DUtil/apuputil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/apuputil.cpp
@@ -70,16 +70,16 @@ extern "C" HRESULT DAPI ApupAllocChainFromAtom(
70 // First search the ATOM feed's custom elements to try and find the default application identity. 70 // First search the ATOM feed's custom elements to try and find the default application identity.
71 for (ATOM_UNKNOWN_ELEMENT* pElement = pFeed->pUnknownElements; pElement; pElement = pElement->pNext) 71 for (ATOM_UNKNOWN_ELEMENT* pElement = pFeed->pUnknownElements; pElement; pElement = pElement->pNext)
72 { 72 {
73 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) 73 if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE))
74 { 74 {
75 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"application", -1)) 75 if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"application", -1, FALSE))
76 { 76 {
77 hr = StrAllocString(&pChain->wzDefaultApplicationId, pElement->wzValue, 0); 77 hr = StrAllocString(&pChain->wzDefaultApplicationId, pElement->wzValue, 0);
78 ApupExitOnFailure(hr, "Failed to allocate default application id."); 78 ApupExitOnFailure(hr, "Failed to allocate default application id.");
79 79
80 for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) 80 for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext)
81 { 81 {
82 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"type", -1)) 82 if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"type", -1, FALSE))
83 { 83 {
84 hr = StrAllocString(&pChain->wzDefaultApplicationType, pAttribute->wzValue, 0); 84 hr = StrAllocString(&pChain->wzDefaultApplicationType, pAttribute->wzValue, 0);
85 ApupExitOnFailure(hr, "Failed to allocate default application type."); 85 ApupExitOnFailure(hr, "Failed to allocate default application type.");
@@ -213,44 +213,44 @@ static HRESULT ProcessEntry(
213 // First search the ATOM entry's custom elements to try and find the application update information. 213 // First search the ATOM entry's custom elements to try and find the application update information.
214 for (ATOM_UNKNOWN_ELEMENT* pElement = pAtomEntry->pUnknownElements; pElement; pElement = pElement->pNext) 214 for (ATOM_UNKNOWN_ELEMENT* pElement = pAtomEntry->pUnknownElements; pElement; pElement = pElement->pNext)
215 { 215 {
216 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) 216 if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE))
217 { 217 {
218 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"application", -1)) 218 if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"application", -1, FALSE))
219 { 219 {
220 hr = StrAllocString(&pApupEntry->wzApplicationId, pElement->wzValue, 0); 220 hr = StrAllocString(&pApupEntry->wzApplicationId, pElement->wzValue, 0);
221 ApupExitOnFailure(hr, "Failed to allocate application identity."); 221 ApupExitOnFailure(hr, "Failed to allocate application identity.");
222 222
223 for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) 223 for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext)
224 { 224 {
225 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"type", -1)) 225 if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"type", -1, FALSE))
226 { 226 {
227 hr = StrAllocString(&pApupEntry->wzApplicationType, pAttribute->wzValue, 0); 227 hr = StrAllocString(&pApupEntry->wzApplicationType, pAttribute->wzValue, 0);
228 ApupExitOnFailure(hr, "Failed to allocate application type."); 228 ApupExitOnFailure(hr, "Failed to allocate application type.");
229 } 229 }
230 } 230 }
231 } 231 }
232 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"upgrade", -1)) 232 else if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"upgrade", -1, FALSE))
233 { 233 {
234 hr = StrAllocString(&pApupEntry->wzUpgradeId, pElement->wzValue, 0); 234 hr = StrAllocString(&pApupEntry->wzUpgradeId, pElement->wzValue, 0);
235 ApupExitOnFailure(hr, "Failed to allocate upgrade id."); 235 ApupExitOnFailure(hr, "Failed to allocate upgrade id.");
236 236
237 for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) 237 for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext)
238 { 238 {
239 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"version", -1)) 239 if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"version", -1, FALSE))
240 { 240 {
241 hr = VerParseVersion(pAttribute->wzValue, 0, FALSE, &pApupEntry->pUpgradeVersion); 241 hr = VerParseVersion(pAttribute->wzValue, 0, FALSE, &pApupEntry->pUpgradeVersion);
242 ApupExitOnFailure(hr, "Failed to parse upgrade version string '%ls' from ATOM entry.", pAttribute->wzValue); 242 ApupExitOnFailure(hr, "Failed to parse upgrade version string '%ls' from ATOM entry.", pAttribute->wzValue);
243 } 243 }
244 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"exclusive", -1)) 244 else if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"exclusive", -1, FALSE))
245 { 245 {
246 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzValue, -1, L"true", -1)) 246 if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzValue, -1, L"true", -1, FALSE))
247 { 247 {
248 pApupEntry->fUpgradeExclusive = TRUE; 248 pApupEntry->fUpgradeExclusive = TRUE;
249 } 249 }
250 } 250 }
251 } 251 }
252 } 252 }
253 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"version", -1)) 253 else if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"version", -1, FALSE))
254 { 254 {
255 hr = VerParseVersion(pElement->wzValue, 0, FALSE, &pApupEntry->pVersion); 255 hr = VerParseVersion(pElement->wzValue, 0, FALSE, &pApupEntry->pVersion);
256 ApupExitOnFailure(hr, "Failed to parse version string '%ls' from ATOM entry.", pElement->wzValue); 256 ApupExitOnFailure(hr, "Failed to parse version string '%ls' from ATOM entry.", pElement->wzValue);
@@ -309,7 +309,7 @@ static HRESULT ProcessEntry(
309 for (DWORD i = 0; i < pAtomEntry->cLinks; ++i) 309 for (DWORD i = 0; i < pAtomEntry->cLinks; ++i)
310 { 310 {
311 ATOM_LINK* pLink = pAtomEntry->rgLinks + i; 311 ATOM_LINK* pLink = pAtomEntry->rgLinks + i;
312 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pLink->wzRel, -1, L"enclosure", -1)) 312 if (CSTR_EQUAL == ::CompareStringOrdinal(pLink->wzRel, -1, L"enclosure", -1, FALSE))
313 { 313 {
314 hr = ParseEnclosure(pLink, pApupEntry->rgEnclosures + pApupEntry->cEnclosures); 314 hr = ParseEnclosure(pLink, pApupEntry->rgEnclosures + pApupEntry->cEnclosures);
315 ApupExitOnFailure(hr, "Failed to parse enclosure."); 315 ApupExitOnFailure(hr, "Failed to parse enclosure.");
@@ -344,15 +344,15 @@ static HRESULT ParseEnclosure(
344 // First search the ATOM link's custom elements to try and find the application update enclosure information. 344 // First search the ATOM link's custom elements to try and find the application update enclosure information.
345 for (ATOM_UNKNOWN_ELEMENT* pElement = pLink->pUnknownElements; pElement; pElement = pElement->pNext) 345 for (ATOM_UNKNOWN_ELEMENT* pElement = pLink->pUnknownElements; pElement; pElement = pElement->pNext)
346 { 346 {
347 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) 347 if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE))
348 { 348 {
349 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"digest", -1, pElement->wzElement, -1)) 349 if (CSTR_EQUAL == ::CompareStringOrdinal(L"digest", -1, pElement->wzElement, -1, FALSE))
350 { 350 {
351 // Find the digest[@algorithm] which is required. Everything else is ignored. 351 // Find the digest[@algorithm] which is required. Everything else is ignored.
352 for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) 352 for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext)
353 { 353 {
354 dwDigestLength = 0; 354 dwDigestLength = 0;
355 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"algorithm", -1, pAttribute->wzAttribute, -1)) 355 if (CSTR_EQUAL == ::CompareStringOrdinal(L"algorithm", -1, pAttribute->wzAttribute, -1, FALSE))
356 { 356 {
357 if (CSTR_EQUAL == ::CompareStringOrdinal(L"md5", -1, pAttribute->wzValue, -1, TRUE)) 357 if (CSTR_EQUAL == ::CompareStringOrdinal(L"md5", -1, pAttribute->wzValue, -1, TRUE))
358 { 358 {
@@ -406,7 +406,7 @@ static HRESULT ParseEnclosure(
406 406
407 break; 407 break;
408 } 408 }
409 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"name", -1, pElement->wzElement, -1)) 409 else if (CSTR_EQUAL == ::CompareStringOrdinal(L"name", -1, pElement->wzElement, -1, FALSE))
410 { 410 {
411 hr = StrAllocString(&pEnclosure->wzLocalName, pElement->wzValue, 0); 411 hr = StrAllocString(&pEnclosure->wzLocalName, pElement->wzValue, 0);
412 ApupExitOnFailure(hr, "Failed to copy local name."); 412 ApupExitOnFailure(hr, "Failed to copy local name.");
diff --git a/src/libs/dutil/WixToolset.DUtil/atomutil.cpp b/src/libs/dutil/WixToolset.DUtil/atomutil.cpp
index d6fd3890..df5bb424 100644
--- a/src/libs/dutil/WixToolset.DUtil/atomutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/atomutil.cpp
@@ -341,63 +341,63 @@ static HRESULT ParseAtomFeed(
341 341
342 while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName))) 342 while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName)))
343 { 343 {
344 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"generator", -1)) 344 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"generator", -1, FALSE))
345 { 345 {
346 hr = AssignString(&pNewFeed->wzGenerator, pNode); 346 hr = AssignString(&pNewFeed->wzGenerator, pNode);
347 AtomExitOnFailure(hr, "Failed to allocate ATOM feed generator."); 347 AtomExitOnFailure(hr, "Failed to allocate ATOM feed generator.");
348 } 348 }
349 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"icon", -1)) 349 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"icon", -1, FALSE))
350 { 350 {
351 hr = AssignString(&pNewFeed->wzIcon, pNode); 351 hr = AssignString(&pNewFeed->wzIcon, pNode);
352 AtomExitOnFailure(hr, "Failed to allocate ATOM feed icon."); 352 AtomExitOnFailure(hr, "Failed to allocate ATOM feed icon.");
353 } 353 }
354 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"id", -1)) 354 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"id", -1, FALSE))
355 { 355 {
356 hr = AssignString(&pNewFeed->wzId, pNode); 356 hr = AssignString(&pNewFeed->wzId, pNode);
357 AtomExitOnFailure(hr, "Failed to allocate ATOM feed id."); 357 AtomExitOnFailure(hr, "Failed to allocate ATOM feed id.");
358 } 358 }
359 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"logo", -1)) 359 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"logo", -1, FALSE))
360 { 360 {
361 hr = AssignString(&pNewFeed->wzLogo, pNode); 361 hr = AssignString(&pNewFeed->wzLogo, pNode);
362 AtomExitOnFailure(hr, "Failed to allocate ATOM feed logo."); 362 AtomExitOnFailure(hr, "Failed to allocate ATOM feed logo.");
363 } 363 }
364 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"subtitle", -1)) 364 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"subtitle", -1, FALSE))
365 { 365 {
366 hr = AssignString(&pNewFeed->wzSubtitle, pNode); 366 hr = AssignString(&pNewFeed->wzSubtitle, pNode);
367 AtomExitOnFailure(hr, "Failed to allocate ATOM feed subtitle."); 367 AtomExitOnFailure(hr, "Failed to allocate ATOM feed subtitle.");
368 } 368 }
369 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"title", -1)) 369 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"title", -1, FALSE))
370 { 370 {
371 hr = AssignString(&pNewFeed->wzTitle, pNode); 371 hr = AssignString(&pNewFeed->wzTitle, pNode);
372 AtomExitOnFailure(hr, "Failed to allocate ATOM feed title."); 372 AtomExitOnFailure(hr, "Failed to allocate ATOM feed title.");
373 } 373 }
374 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"updated", -1)) 374 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"updated", -1, FALSE))
375 { 375 {
376 hr = AssignDateTime(&pNewFeed->ftUpdated, pNode); 376 hr = AssignDateTime(&pNewFeed->ftUpdated, pNode);
377 AtomExitOnFailure(hr, "Failed to allocate ATOM feed updated."); 377 AtomExitOnFailure(hr, "Failed to allocate ATOM feed updated.");
378 } 378 }
379 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"author", -1)) 379 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"author", -1, FALSE))
380 { 380 {
381 hr = ParseAtomAuthor(pNode, &pNewFeed->rgAuthors[cAuthors]); 381 hr = ParseAtomAuthor(pNode, &pNewFeed->rgAuthors[cAuthors]);
382 AtomExitOnFailure(hr, "Failed to parse ATOM author."); 382 AtomExitOnFailure(hr, "Failed to parse ATOM author.");
383 383
384 ++cAuthors; 384 ++cAuthors;
385 } 385 }
386 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"category", -1)) 386 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"category", -1, FALSE))
387 { 387 {
388 hr = ParseAtomCategory(pNode, &pNewFeed->rgCategories[cCategories]); 388 hr = ParseAtomCategory(pNode, &pNewFeed->rgCategories[cCategories]);
389 AtomExitOnFailure(hr, "Failed to parse ATOM category."); 389 AtomExitOnFailure(hr, "Failed to parse ATOM category.");
390 390
391 ++cCategories; 391 ++cCategories;
392 } 392 }
393 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"entry", -1)) 393 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"entry", -1, FALSE))
394 { 394 {
395 hr = ParseAtomEntry(pNode, &pNewFeed->rgEntries[cEntries]); 395 hr = ParseAtomEntry(pNode, &pNewFeed->rgEntries[cEntries]);
396 AtomExitOnFailure(hr, "Failed to parse ATOM entry."); 396 AtomExitOnFailure(hr, "Failed to parse ATOM entry.");
397 397
398 ++cEntries; 398 ++cEntries;
399 } 399 }
400 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"link", -1)) 400 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"link", -1, FALSE))
401 { 401 {
402 hr = ParseAtomLink(pNode, &pNewFeed->rgLinks[cLinks]); 402 hr = ParseAtomLink(pNode, &pNewFeed->rgLinks[cLinks]);
403 AtomExitOnFailure(hr, "Failed to parse ATOM link."); 403 AtomExitOnFailure(hr, "Failed to parse ATOM link.");
@@ -516,17 +516,17 @@ static HRESULT ParseAtomAuthor(
516 516
517 while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName))) 517 while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName)))
518 { 518 {
519 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"name", -1)) 519 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"name", -1, FALSE))
520 { 520 {
521 hr = AssignString(&pAuthor->wzName, pNode); 521 hr = AssignString(&pAuthor->wzName, pNode);
522 AtomExitOnFailure(hr, "Failed to allocate ATOM author name."); 522 AtomExitOnFailure(hr, "Failed to allocate ATOM author name.");
523 } 523 }
524 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"email", -1)) 524 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"email", -1, FALSE))
525 { 525 {
526 hr = AssignString(&pAuthor->wzEmail, pNode); 526 hr = AssignString(&pAuthor->wzEmail, pNode);
527 AtomExitOnFailure(hr, "Failed to allocate ATOM author email."); 527 AtomExitOnFailure(hr, "Failed to allocate ATOM author email.");
528 } 528 }
529 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"uri", -1)) 529 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"uri", -1, FALSE))
530 { 530 {
531 hr = AssignString(&pAuthor->wzUrl, pNode); 531 hr = AssignString(&pAuthor->wzUrl, pNode);
532 AtomExitOnFailure(hr, "Failed to allocate ATOM author uri."); 532 AtomExitOnFailure(hr, "Failed to allocate ATOM author uri.");
@@ -570,17 +570,17 @@ static HRESULT ParseAtomCategory(
570 570
571 while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName))) 571 while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName)))
572 { 572 {
573 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"label", -1)) 573 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"label", -1, FALSE))
574 { 574 {
575 hr = AssignString(&pCategory->wzLabel, pNode); 575 hr = AssignString(&pCategory->wzLabel, pNode);
576 AtomExitOnFailure(hr, "Failed to allocate ATOM category label."); 576 AtomExitOnFailure(hr, "Failed to allocate ATOM category label.");
577 } 577 }
578 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"scheme", -1)) 578 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"scheme", -1, FALSE))
579 { 579 {
580 hr = AssignString(&pCategory->wzScheme, pNode); 580 hr = AssignString(&pCategory->wzScheme, pNode);
581 AtomExitOnFailure(hr, "Failed to allocate ATOM category scheme."); 581 AtomExitOnFailure(hr, "Failed to allocate ATOM category scheme.");
582 } 582 }
583 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"term", -1)) 583 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"term", -1, FALSE))
584 { 584 {
585 hr = AssignString(&pCategory->wzTerm, pNode); 585 hr = AssignString(&pCategory->wzTerm, pNode);
586 AtomExitOnFailure(hr, "Failed to allocate ATOM category term."); 586 AtomExitOnFailure(hr, "Failed to allocate ATOM category term.");
@@ -639,12 +639,12 @@ static HRESULT ParseAtomContent(
639 639
640 while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName))) 640 while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName)))
641 { 641 {
642 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"type", -1)) 642 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"type", -1, FALSE))
643 { 643 {
644 hr = AssignString(&pContent->wzType, pNode); 644 hr = AssignString(&pContent->wzType, pNode);
645 AtomExitOnFailure(hr, "Failed to allocate ATOM content type."); 645 AtomExitOnFailure(hr, "Failed to allocate ATOM content type.");
646 } 646 }
647 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"url", -1)) 647 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"url", -1, FALSE))
648 { 648 {
649 hr = AssignString(&pContent->wzUrl, pNode); 649 hr = AssignString(&pContent->wzUrl, pNode);
650 AtomExitOnFailure(hr, "Failed to allocate ATOM content scheme."); 650 AtomExitOnFailure(hr, "Failed to allocate ATOM content scheme.");
@@ -721,46 +721,46 @@ static HRESULT ParseAtomEntry(
721 721
722 while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName))) 722 while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName)))
723 { 723 {
724 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"id", -1)) 724 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"id", -1, FALSE))
725 { 725 {
726 hr = AssignString(&pEntry->wzId, pNode); 726 hr = AssignString(&pEntry->wzId, pNode);
727 AtomExitOnFailure(hr, "Failed to allocate ATOM entry id."); 727 AtomExitOnFailure(hr, "Failed to allocate ATOM entry id.");
728 } 728 }
729 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"summary", -1)) 729 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"summary", -1, FALSE))
730 { 730 {
731 hr = AssignString(&pEntry->wzSummary, pNode); 731 hr = AssignString(&pEntry->wzSummary, pNode);
732 AtomExitOnFailure(hr, "Failed to allocate ATOM entry summary."); 732 AtomExitOnFailure(hr, "Failed to allocate ATOM entry summary.");
733 } 733 }
734 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"title", -1)) 734 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"title", -1, FALSE))
735 { 735 {
736 hr = AssignString(&pEntry->wzTitle, pNode); 736 hr = AssignString(&pEntry->wzTitle, pNode);
737 AtomExitOnFailure(hr, "Failed to allocate ATOM entry title."); 737 AtomExitOnFailure(hr, "Failed to allocate ATOM entry title.");
738 } 738 }
739 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"published", -1)) 739 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"published", -1, FALSE))
740 { 740 {
741 hr = AssignDateTime(&pEntry->ftPublished, pNode); 741 hr = AssignDateTime(&pEntry->ftPublished, pNode);
742 AtomExitOnFailure(hr, "Failed to allocate ATOM entry published."); 742 AtomExitOnFailure(hr, "Failed to allocate ATOM entry published.");
743 } 743 }
744 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"updated", -1)) 744 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"updated", -1, FALSE))
745 { 745 {
746 hr = AssignDateTime(&pEntry->ftUpdated, pNode); 746 hr = AssignDateTime(&pEntry->ftUpdated, pNode);
747 AtomExitOnFailure(hr, "Failed to allocate ATOM entry updated."); 747 AtomExitOnFailure(hr, "Failed to allocate ATOM entry updated.");
748 } 748 }
749 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"author", -1)) 749 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"author", -1, FALSE))
750 { 750 {
751 hr = ParseAtomAuthor(pNode, &pEntry->rgAuthors[cAuthors]); 751 hr = ParseAtomAuthor(pNode, &pEntry->rgAuthors[cAuthors]);
752 AtomExitOnFailure(hr, "Failed to parse ATOM entry author."); 752 AtomExitOnFailure(hr, "Failed to parse ATOM entry author.");
753 753
754 ++cAuthors; 754 ++cAuthors;
755 } 755 }
756 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"category", -1)) 756 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"category", -1, FALSE))
757 { 757 {
758 hr = ParseAtomCategory(pNode, &pEntry->rgCategories[cCategories]); 758 hr = ParseAtomCategory(pNode, &pEntry->rgCategories[cCategories]);
759 AtomExitOnFailure(hr, "Failed to parse ATOM entry category."); 759 AtomExitOnFailure(hr, "Failed to parse ATOM entry category.");
760 760
761 ++cCategories; 761 ++cCategories;
762 } 762 }
763 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"content", -1)) 763 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"content", -1, FALSE))
764 { 764 {
765 if (NULL != pEntry->pContent) 765 if (NULL != pEntry->pContent)
766 { 766 {
@@ -774,7 +774,7 @@ static HRESULT ParseAtomEntry(
774 hr = ParseAtomContent(pNode, pEntry->pContent); 774 hr = ParseAtomContent(pNode, pEntry->pContent);
775 AtomExitOnFailure(hr, "Failed to parse ATOM entry content."); 775 AtomExitOnFailure(hr, "Failed to parse ATOM entry content.");
776 } 776 }
777 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"link", -1)) 777 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"link", -1, FALSE))
778 { 778 {
779 hr = ParseAtomLink(pNode, &pEntry->rgLinks[cLinks]); 779 hr = ParseAtomLink(pNode, &pEntry->rgLinks[cLinks]);
780 AtomExitOnFailure(hr, "Failed to parse ATOM entry link."); 780 AtomExitOnFailure(hr, "Failed to parse ATOM entry link.");
@@ -842,17 +842,17 @@ static HRESULT ParseAtomLink(
842 842
843 while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName))) 843 while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName)))
844 { 844 {
845 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"rel", -1)) 845 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"rel", -1, FALSE))
846 { 846 {
847 hr = AssignString(&pLink->wzRel, pNode); 847 hr = AssignString(&pLink->wzRel, pNode);
848 AtomExitOnFailure(hr, "Failed to allocate ATOM link rel."); 848 AtomExitOnFailure(hr, "Failed to allocate ATOM link rel.");
849 } 849 }
850 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"href", -1)) 850 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"href", -1, FALSE))
851 { 851 {
852 hr = AssignString(&pLink->wzUrl, pNode); 852 hr = AssignString(&pLink->wzUrl, pNode);
853 AtomExitOnFailure(hr, "Failed to allocate ATOM link href."); 853 AtomExitOnFailure(hr, "Failed to allocate ATOM link href.");
854 } 854 }
855 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"length", -1)) 855 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"length", -1, FALSE))
856 { 856 {
857 hr = XmlGetAttributeUInt64(pixnLink, bstrNodeName, &pLink->dw64Length); 857 hr = XmlGetAttributeUInt64(pixnLink, bstrNodeName, &pLink->dw64Length);
858 if (E_INVALIDARG == hr) 858 if (E_INVALIDARG == hr)
@@ -861,12 +861,12 @@ static HRESULT ParseAtomLink(
861 } 861 }
862 AtomExitOnFailure(hr, "Failed to parse ATOM link length."); 862 AtomExitOnFailure(hr, "Failed to parse ATOM link length.");
863 } 863 }
864 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"title", -1)) 864 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"title", -1, FALSE))
865 { 865 {
866 hr = AssignString(&pLink->wzTitle, pNode); 866 hr = AssignString(&pLink->wzTitle, pNode);
867 AtomExitOnFailure(hr, "Failed to allocate ATOM link title."); 867 AtomExitOnFailure(hr, "Failed to allocate ATOM link title.");
868 } 868 }
869 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"type", -1)) 869 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"type", -1, FALSE))
870 { 870 {
871 hr = AssignString(&pLink->wzType, pNode); 871 hr = AssignString(&pLink->wzType, pNode);
872 AtomExitOnFailure(hr, "Failed to allocate ATOM link type."); 872 AtomExitOnFailure(hr, "Failed to allocate ATOM link type.");
diff --git a/src/libs/dutil/WixToolset.DUtil/dictutil.cpp b/src/libs/dutil/WixToolset.DUtil/dictutil.cpp
index 09b150df..247b7b43 100644
--- a/src/libs/dutil/WixToolset.DUtil/dictutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/dictutil.cpp
@@ -499,14 +499,9 @@ static BOOL IsMatchExact(
499 ) 499 )
500{ 500{
501 LPCWSTR wzMatchString = GetKey(psd, TranslateOffsetToValue(psd, psd->ppvBuckets[dwMatchIndex])); 501 LPCWSTR wzMatchString = GetKey(psd, TranslateOffsetToValue(psd, psd->ppvBuckets[dwMatchIndex]));
502 DWORD dwFlags = 0; 502 BOOL fIgnoreCase = (DICT_FLAG_CASEINSENSITIVE & psd->dfFlags) ? TRUE : FALSE;
503 503
504 if (DICT_FLAG_CASEINSENSITIVE & psd->dfFlags) 504 if (CSTR_EQUAL == ::CompareStringOrdinal(wzOriginalString, -1, wzMatchString, -1, fIgnoreCase))
505 {
506 dwFlags |= NORM_IGNORECASE;
507 }
508
509 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwFlags, wzOriginalString, -1, wzMatchString, -1))
510 { 505 {
511 return TRUE; 506 return TRUE;
512 } 507 }
@@ -605,7 +600,7 @@ static HRESULT GetInsertIndex(
605 // If we wrapped all the way back around to our original index, the dict is full - throw an error 600 // If we wrapped all the way back around to our original index, the dict is full - throw an error
606 if (dwIndexCandidate == dwOriginalIndexCandidate) 601 if (dwIndexCandidate == dwOriginalIndexCandidate)
607 { 602 {
608 // The dict table is full - this error seems to be a reasonably close match 603 // The dict table is full - this error seems to be a reasonably close match
609 hr = HRESULT_FROM_WIN32(ERROR_DATABASE_FULL); 604 hr = HRESULT_FROM_WIN32(ERROR_DATABASE_FULL);
610 DictExitOnRootFailure(hr, "Failed to add item '%ls' to dict table because dict table is full of items", pszString); 605 DictExitOnRootFailure(hr, "Failed to add item '%ls' to dict table because dict table is full of items", pszString);
611 } 606 }
diff --git a/src/libs/dutil/WixToolset.DUtil/iniutil.cpp b/src/libs/dutil/WixToolset.DUtil/iniutil.cpp
index 46f6e380..12af6fb2 100644
--- a/src/libs/dutil/WixToolset.DUtil/iniutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/iniutil.cpp
@@ -441,7 +441,7 @@ extern "C" HRESULT DAPI IniGetValue(
441 441
442 for (DWORD i = 0; i < pi->cValues; ++i) 442 for (DWORD i = 0; i < pi->cValues; ++i)
443 { 443 {
444 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pi->rgivValues[i].wzName, -1, wzValueName, -1)) 444 if (CSTR_EQUAL == ::CompareStringOrdinal(pi->rgivValues[i].wzName, -1, wzValueName, -1, FALSE))
445 { 445 {
446 pValue = pi->rgivValues + i; 446 pValue = pi->rgivValues + i;
447 break; 447 break;
@@ -483,7 +483,7 @@ extern "C" HRESULT DAPI IniSetValue(
483 483
484 for (DWORD i = 0; i < pi->cValues; ++i) 484 for (DWORD i = 0; i < pi->cValues; ++i)
485 { 485 {
486 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pi->rgivValues[i].wzName, -1, wzValueName, -1)) 486 if (CSTR_EQUAL == ::CompareStringOrdinal(pi->rgivValues[i].wzName, -1, wzValueName, -1, FALSE))
487 { 487 {
488 pValue = pi->rgivValues + i; 488 pValue = pi->rgivValues + i;
489 break; 489 break;
@@ -507,7 +507,7 @@ extern "C" HRESULT DAPI IniSetValue(
507 { 507 {
508 if (pValue) 508 if (pValue)
509 { 509 {
510 if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, pValue->wzValue, -1, wzValue, -1)) 510 if (CSTR_EQUAL != ::CompareStringOrdinal(pValue->wzValue, -1, wzValue, -1, FALSE))
511 { 511 {
512 pi->fModified = TRUE; 512 pi->fModified = TRUE;
513 hr = StrAllocString(const_cast<LPWSTR *>(&pValue->wzValue), wzValue, 0); 513 hr = StrAllocString(const_cast<LPWSTR *>(&pValue->wzValue), wzValue, 0);
@@ -660,7 +660,7 @@ extern "C" HRESULT DAPI IniWriteFile(
660 IniExitOnFailure(hr, "Failed to get section prefix from name: %ls", pi->rgivValues[i].wzName); 660 IniExitOnFailure(hr, "Failed to get section prefix from name: %ls", pi->rgivValues[i].wzName);
661 661
662 // If the new section prefix is different, write a section out for it 662 // If the new section prefix is different, write a section out for it
663 if (fSections && sczNewSectionPrefix && (NULL == sczCurrentSectionPrefix || CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, sczNewSectionPrefix, -1, sczCurrentSectionPrefix, -1))) 663 if (fSections && sczNewSectionPrefix && (NULL == sczCurrentSectionPrefix || CSTR_EQUAL != ::CompareStringOrdinal(sczNewSectionPrefix, -1, sczCurrentSectionPrefix, -1, FALSE)))
664 { 664 {
665 hr = StrAllocConcat(&sczContents, pi->sczOpenTagPrefix, 0); 665 hr = StrAllocConcat(&sczContents, pi->sczOpenTagPrefix, 0);
666 IniExitOnFailure(hr, "Failed to concat open tag prefix to string"); 666 IniExitOnFailure(hr, "Failed to concat open tag prefix to string");
@@ -674,7 +674,7 @@ extern "C" HRESULT DAPI IniWriteFile(
674 674
675 hr = StrAllocConcat(&sczContents, L"\r\n", 2); 675 hr = StrAllocConcat(&sczContents, L"\r\n", 2);
676 IniExitOnFailure(hr, "Failed to add endline to ini output buffer in-memory"); 676 IniExitOnFailure(hr, "Failed to add endline to ini output buffer in-memory");
677 677
678 ReleaseNullStr(sczCurrentSectionPrefix); 678 ReleaseNullStr(sczCurrentSectionPrefix);
679 sczCurrentSectionPrefix = sczNewSectionPrefix; 679 sczCurrentSectionPrefix = sczNewSectionPrefix;
680 sczNewSectionPrefix = NULL; 680 sczNewSectionPrefix = NULL;
diff --git a/src/libs/dutil/WixToolset.DUtil/locutil.cpp b/src/libs/dutil/WixToolset.DUtil/locutil.cpp
index 008d0367..0e897186 100644
--- a/src/libs/dutil/WixToolset.DUtil/locutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/locutil.cpp
@@ -315,7 +315,7 @@ extern "C" HRESULT DAPI LocGetControl(
315 { 315 {
316 pLocControl = &pWixLoc->rgLocControls[i]; 316 pLocControl = &pWixLoc->rgLocControls[i];
317 317
318 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pLocControl->wzControl, -1, wzId, -1)) 318 if (CSTR_EQUAL == ::CompareStringOrdinal(pLocControl->wzControl, -1, wzId, -1, FALSE))
319 { 319 {
320 *ppLocControl = pLocControl; 320 *ppLocControl = pLocControl;
321 ExitFunction1(hr = S_OK); 321 ExitFunction1(hr = S_OK);
@@ -341,7 +341,7 @@ extern "C" HRESULT DAPI LocGetString(
341 { 341 {
342 pLocString = pWixLoc->rgLocStrings + i; 342 pLocString = pWixLoc->rgLocStrings + i;
343 343
344 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pLocString->wzId, -1, wzId, -1)) 344 if (CSTR_EQUAL == ::CompareStringOrdinal(pLocString->wzId, -1, wzId, -1, FALSE))
345 { 345 {
346 *ppLocString = pLocString; 346 *ppLocString = pLocString;
347 hr = S_OK; 347 hr = S_OK;
@@ -555,7 +555,7 @@ static HRESULT ParseWxlString(
555 555
556 if (S_OK == hr) 556 if (S_OK == hr)
557 { 557 {
558 pLocString->bOverridable = CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrText, -1, L"yes", -1); 558 pLocString->bOverridable = CSTR_EQUAL == ::CompareStringOrdinal(bstrText, -1, L"yes", -1, FALSE);
559 } 559 }
560 560
561 ReleaseNullBSTR(bstrText); 561 ReleaseNullBSTR(bstrText);
diff --git a/src/libs/dutil/WixToolset.DUtil/monutil.cpp b/src/libs/dutil/WixToolset.DUtil/monutil.cpp
index b42332ef..d6437b39 100644
--- a/src/libs/dutil/WixToolset.DUtil/monutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/monutil.cpp
@@ -1598,14 +1598,14 @@ static HRESULT FindRequestIndex(
1598 switch (pWaiterContext->rgRequests[i].type) 1598 switch (pWaiterContext->rgRequests[i].type)
1599 { 1599 {
1600 case MON_DIRECTORY: 1600 case MON_DIRECTORY:
1601 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pWaiterContext->rgRequests[i].rgsczPathHierarchy[pWaiterContext->rgRequests[i].cPathHierarchy - 1], -1, pMessage->directory.sczDirectory, -1) && pWaiterContext->rgRequests[i].fRecursive == pMessage->fRecursive) 1601 if (CSTR_EQUAL == ::CompareStringOrdinal(pWaiterContext->rgRequests[i].rgsczPathHierarchy[pWaiterContext->rgRequests[i].cPathHierarchy - 1], -1, pMessage->directory.sczDirectory, -1, FALSE) && pWaiterContext->rgRequests[i].fRecursive == pMessage->fRecursive)
1602 { 1602 {
1603 *pdwIndex = i; 1603 *pdwIndex = i;
1604 ExitFunction1(hr = S_OK); 1604 ExitFunction1(hr = S_OK);
1605 } 1605 }
1606 break; 1606 break;
1607 case MON_REGKEY: 1607 case MON_REGKEY:
1608 if (reinterpret_cast<DWORD_PTR>(pMessage->regkey.hkRoot) == reinterpret_cast<DWORD_PTR>(pWaiterContext->rgRequests[i].regkey.hkRoot) && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pWaiterContext->rgRequests[i].rgsczPathHierarchy[pWaiterContext->rgRequests[i].cPathHierarchy - 1], -1, pMessage->regkey.sczSubKey, -1) && pWaiterContext->rgRequests[i].fRecursive == pMessage->fRecursive && pWaiterContext->rgRequests[i].regkey.kbKeyBitness == pMessage->regkey.kbKeyBitness) 1608 if (reinterpret_cast<DWORD_PTR>(pMessage->regkey.hkRoot) == reinterpret_cast<DWORD_PTR>(pWaiterContext->rgRequests[i].regkey.hkRoot) && CSTR_EQUAL == ::CompareStringOrdinal(pWaiterContext->rgRequests[i].rgsczPathHierarchy[pWaiterContext->rgRequests[i].cPathHierarchy - 1], -1, pMessage->regkey.sczSubKey, -1, FALSE) && pWaiterContext->rgRequests[i].fRecursive == pMessage->fRecursive && pWaiterContext->rgRequests[i].regkey.kbKeyBitness == pMessage->regkey.kbKeyBitness)
1609 { 1609 {
1610 *pdwIndex = i; 1610 *pdwIndex = i;
1611 ExitFunction1(hr = S_OK); 1611 ExitFunction1(hr = S_OK);
diff --git a/src/libs/dutil/WixToolset.DUtil/sceutil.cpp b/src/libs/dutil/WixToolset.DUtil/sceutil.cpp
index 590c937a..98b5e2d8 100644
--- a/src/libs/dutil/WixToolset.DUtil/sceutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/sceutil.cpp
@@ -224,7 +224,7 @@ extern "C" HRESULT DAPI SceCreateDatabase(
224 LPWSTR sczDirectory = NULL; 224 LPWSTR sczDirectory = NULL;
225 SCE_DATABASE *pNewSceDatabase = NULL; 225 SCE_DATABASE *pNewSceDatabase = NULL;
226 SCE_DATABASE_INTERNAL *pNewSceDatabaseInternal = NULL; 226 SCE_DATABASE_INTERNAL *pNewSceDatabaseInternal = NULL;
227 IDBDataSourceAdmin *pIDBDataSourceAdmin = NULL; 227 IDBDataSourceAdmin *pIDBDataSourceAdmin = NULL;
228 DBPROPSET rgdbpDataSourcePropSet[2] = { }; 228 DBPROPSET rgdbpDataSourcePropSet[2] = { };
229 DBPROP rgdbpDataSourceProp[2] = { }; 229 DBPROP rgdbpDataSourceProp[2] = { };
230 DBPROP rgdbpDataSourceSsceProp[1] = { }; 230 DBPROP rgdbpDataSourceSsceProp[1] = { };
@@ -239,7 +239,7 @@ extern "C" HRESULT DAPI SceCreateDatabase(
239 239
240 hr = CreateSqlCe(wzSqlCeDllPath, &pNewSceDatabaseInternal->pIDBInitialize, &pNewSceDatabaseInternal->hSqlCeDll); 240 hr = CreateSqlCe(wzSqlCeDllPath, &pNewSceDatabaseInternal->pIDBInitialize, &pNewSceDatabaseInternal->hSqlCeDll);
241 ExitOnFailure(hr, "Failed to get IDBInitialize interface"); 241 ExitOnFailure(hr, "Failed to get IDBInitialize interface");
242 242
243 hr = pNewSceDatabaseInternal->pIDBInitialize->QueryInterface(IID_IDBDataSourceAdmin, reinterpret_cast<void **>(&pIDBDataSourceAdmin)); 243 hr = pNewSceDatabaseInternal->pIDBInitialize->QueryInterface(IID_IDBDataSourceAdmin, reinterpret_cast<void **>(&pIDBDataSourceAdmin));
244 ExitOnFailure(hr, "Failed to get IDBDataSourceAdmin interface"); 244 ExitOnFailure(hr, "Failed to get IDBDataSourceAdmin interface");
245 245
@@ -259,7 +259,7 @@ extern "C" HRESULT DAPI SceCreateDatabase(
259 rgdbpDataSourceProp[1].vValue.vt = VT_I4; 259 rgdbpDataSourceProp[1].vValue.vt = VT_I4;
260 rgdbpDataSourceProp[1].vValue.lVal = DB_MODE_SHARE_DENY_NONE; 260 rgdbpDataSourceProp[1].vValue.lVal = DB_MODE_SHARE_DENY_NONE;
261 261
262 // SQL CE doesn't seem to allow us to specify DBPROP_INIT_PROMPT if we include any properties from DBPROPSET_SSCE_DBINIT 262 // SQL CE doesn't seem to allow us to specify DBPROP_INIT_PROMPT if we include any properties from DBPROPSET_SSCE_DBINIT
263 rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_DBINIT; 263 rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_DBINIT;
264 rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp; 264 rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp;
265 rgdbpDataSourcePropSet[0].cProperties = _countof(rgdbpDataSourceProp); 265 rgdbpDataSourcePropSet[0].cProperties = _countof(rgdbpDataSourceProp);
@@ -336,7 +336,7 @@ extern "C" HRESULT DAPI SceOpenDatabase(
336 336
337 hr = CreateSqlCe(wzSqlCeDllPath, &pNewSceDatabaseInternal->pIDBInitialize, &pNewSceDatabaseInternal->hSqlCeDll); 337 hr = CreateSqlCe(wzSqlCeDllPath, &pNewSceDatabaseInternal->pIDBInitialize, &pNewSceDatabaseInternal->hSqlCeDll);
338 ExitOnFailure(hr, "Failed to get IDBInitialize interface"); 338 ExitOnFailure(hr, "Failed to get IDBInitialize interface");
339 339
340 hr = pNewSceDatabaseInternal->pIDBInitialize->QueryInterface(IID_IDBProperties, reinterpret_cast<void **>(&pNewSceDatabaseInternal->pIDBProperties)); 340 hr = pNewSceDatabaseInternal->pIDBInitialize->QueryInterface(IID_IDBProperties, reinterpret_cast<void **>(&pNewSceDatabaseInternal->pIDBProperties));
341 ExitOnFailure(hr, "Failed to get IDBProperties interface"); 341 ExitOnFailure(hr, "Failed to get IDBProperties interface");
342 342
@@ -369,7 +369,7 @@ extern "C" HRESULT DAPI SceOpenDatabase(
369 rgdbpDataSourceProp[1].vValue.vt = VT_I4; 369 rgdbpDataSourceProp[1].vValue.vt = VT_I4;
370 rgdbpDataSourceProp[1].vValue.lVal = DB_MODE_SHARE_DENY_NONE; 370 rgdbpDataSourceProp[1].vValue.lVal = DB_MODE_SHARE_DENY_NONE;
371 371
372 // SQL CE doesn't seem to allow us to specify DBPROP_INIT_PROMPT if we include any properties from DBPROPSET_SSCE_DBINIT 372 // SQL CE doesn't seem to allow us to specify DBPROP_INIT_PROMPT if we include any properties from DBPROPSET_SSCE_DBINIT
373 rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_DBINIT; 373 rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_DBINIT;
374 rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp; 374 rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp;
375 rgdbpDataSourcePropSet[0].cProperties = _countof(rgdbpDataSourceProp); 375 rgdbpDataSourcePropSet[0].cProperties = _countof(rgdbpDataSourceProp);
@@ -407,7 +407,7 @@ extern "C" HRESULT DAPI SceOpenDatabase(
407 hr = GetDatabaseSchemaInfo(pNewSceDatabase, &sczSchemaType, &dwVersionFound); 407 hr = GetDatabaseSchemaInfo(pNewSceDatabase, &sczSchemaType, &dwVersionFound);
408 ExitOnFailure(hr, "Failed to find schema version of database"); 408 ExitOnFailure(hr, "Failed to find schema version of database");
409 409
410 if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, sczSchemaType, -1, wzExpectedSchemaType, -1)) 410 if (CSTR_EQUAL != ::CompareStringOrdinal(sczSchemaType, -1, wzExpectedSchemaType, -1, FALSE))
411 { 411 {
412 hr = HRESULT_FROM_WIN32(ERROR_BAD_FILE_TYPE); 412 hr = HRESULT_FROM_WIN32(ERROR_BAD_FILE_TYPE);
413 ExitOnRootFailure(hr, "Tried to open wrong database type - expected type %ls, found type %ls", wzExpectedSchemaType, sczSchemaType); 413 ExitOnRootFailure(hr, "Tried to open wrong database type - expected type %ls, found type %ls", wzExpectedSchemaType, sczSchemaType);
@@ -2306,8 +2306,8 @@ static HRESULT SetSessionProperties(
2306 rgdbpDataSourceProp[0].dwPropertyID = DBPROP_SSCE_TRANSACTION_COMMIT_MODE; 2306 rgdbpDataSourceProp[0].dwPropertyID = DBPROP_SSCE_TRANSACTION_COMMIT_MODE;
2307 rgdbpDataSourceProp[0].dwOptions = DBPROPOPTIONS_REQUIRED; 2307 rgdbpDataSourceProp[0].dwOptions = DBPROPOPTIONS_REQUIRED;
2308 rgdbpDataSourceProp[0].vValue.vt = VT_I4; 2308 rgdbpDataSourceProp[0].vValue.vt = VT_I4;
2309 rgdbpDataSourceProp[0].vValue.lVal = DBPROPVAL_SSCE_TCM_FLUSH; 2309 rgdbpDataSourceProp[0].vValue.lVal = DBPROPVAL_SSCE_TCM_FLUSH;
2310 2310
2311 rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_SSCE_SESSION; 2311 rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_SSCE_SESSION;
2312 rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp; 2312 rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp;
2313 rgdbpDataSourcePropSet[0].cProperties = 1; 2313 rgdbpDataSourcePropSet[0].cProperties = 1;
diff --git a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp
index 36b187a7..a7a7e45b 100644
--- a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp
@@ -1145,7 +1145,7 @@ DAPI_(void) ThemeGetPageIds(
1145 for (DWORD j = 0; j < pTheme->cPages; ++j) 1145 for (DWORD j = 0; j < pTheme->cPages; ++j)
1146 { 1146 {
1147 LPCWSTR wzPageName = pTheme->rgPages[j].sczName; 1147 LPCWSTR wzPageName = pTheme->rgPages[j].sczName;
1148 if (wzPageName && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPageName, -1, wzFindName, -1)) 1148 if (wzPageName && CSTR_EQUAL == ::CompareStringOrdinal(wzPageName, -1, wzFindName, -1, FALSE))
1149 { 1149 {
1150 rgdwPageIds[i] = j + 1; // add one to make the page ids 1-based (so zero is invalid). 1150 rgdwPageIds[i] = j + 1; // add one to make the page ids 1-based (so zero is invalid).
1151 break; 1151 break;
@@ -2082,7 +2082,7 @@ static HRESULT ParseButtonImages(
2082 ThmExitOnFailure(hr, "Null element encountered!"); 2082 ThmExitOnFailure(hr, "Null element encountered!");
2083 } 2083 }
2084 2084
2085 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ButtonFocusImage", -1)) 2085 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ButtonFocusImage", -1, FALSE))
2086 { 2086 {
2087 if (pFocusImageRef) 2087 if (pFocusImageRef)
2088 { 2088 {
@@ -2091,7 +2091,7 @@ static HRESULT ParseButtonImages(
2091 2091
2092 pImageRef = pFocusImageRef = pControl->Button.rgImageRef + 3; 2092 pImageRef = pFocusImageRef = pControl->Button.rgImageRef + 3;
2093 } 2093 }
2094 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ButtonHoverImage", -1)) 2094 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ButtonHoverImage", -1, FALSE))
2095 { 2095 {
2096 if (pHoverImageRef) 2096 if (pHoverImageRef)
2097 { 2097 {
@@ -2100,7 +2100,7 @@ static HRESULT ParseButtonImages(
2100 2100
2101 pImageRef = pHoverImageRef = pControl->Button.rgImageRef + 1; 2101 pImageRef = pHoverImageRef = pControl->Button.rgImageRef + 1;
2102 } 2102 }
2103 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ButtonSelectedImage", -1)) 2103 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ButtonSelectedImage", -1, FALSE))
2104 { 2104 {
2105 if (pSelectedImageRef) 2105 if (pSelectedImageRef)
2106 { 2106 {
@@ -2776,35 +2776,35 @@ static HRESULT GetFontColor(
2776 2776
2777 if (pdwSystemColor) 2777 if (pdwSystemColor)
2778 { 2778 {
2779 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"btnface", -1)) 2779 if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"btnface", -1, FALSE))
2780 { 2780 {
2781 *pdwSystemColor = COLOR_BTNFACE; 2781 *pdwSystemColor = COLOR_BTNFACE;
2782 } 2782 }
2783 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"btntext", -1)) 2783 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"btntext", -1, FALSE))
2784 { 2784 {
2785 *pdwSystemColor = COLOR_BTNTEXT; 2785 *pdwSystemColor = COLOR_BTNTEXT;
2786 } 2786 }
2787 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"graytext", -1)) 2787 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"graytext", -1, FALSE))
2788 { 2788 {
2789 *pdwSystemColor = COLOR_GRAYTEXT; 2789 *pdwSystemColor = COLOR_GRAYTEXT;
2790 } 2790 }
2791 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"highlight", -1)) 2791 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"highlight", -1, FALSE))
2792 { 2792 {
2793 *pdwSystemColor = COLOR_HIGHLIGHT; 2793 *pdwSystemColor = COLOR_HIGHLIGHT;
2794 } 2794 }
2795 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"highlighttext", -1)) 2795 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"highlighttext", -1, FALSE))
2796 { 2796 {
2797 *pdwSystemColor = COLOR_HIGHLIGHTTEXT; 2797 *pdwSystemColor = COLOR_HIGHLIGHTTEXT;
2798 } 2798 }
2799 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"hotlight", -1)) 2799 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"hotlight", -1, FALSE))
2800 { 2800 {
2801 *pdwSystemColor = COLOR_HOTLIGHT; 2801 *pdwSystemColor = COLOR_HOTLIGHT;
2802 } 2802 }
2803 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"window", -1)) 2803 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"window", -1, FALSE))
2804 { 2804 {
2805 *pdwSystemColor = COLOR_WINDOW; 2805 *pdwSystemColor = COLOR_WINDOW;
2806 } 2806 }
2807 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"windowtext", -1)) 2807 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"windowtext", -1, FALSE))
2808 { 2808 {
2809 *pdwSystemColor = COLOR_WINDOWTEXT; 2809 *pdwSystemColor = COLOR_WINDOWTEXT;
2810 } 2810 }
@@ -3229,71 +3229,71 @@ static HRESULT ParseControls(
3229 ThmExitOnFailure(hr, "Null element encountered!"); 3229 ThmExitOnFailure(hr, "Null element encountered!");
3230 } 3230 }
3231 3231
3232 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Billboard", -1)) 3232 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Billboard", -1, FALSE))
3233 { 3233 {
3234 type = THEME_CONTROL_TYPE_BILLBOARD; 3234 type = THEME_CONTROL_TYPE_BILLBOARD;
3235 } 3235 }
3236 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Button", -1)) 3236 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Button", -1, FALSE))
3237 { 3237 {
3238 type = THEME_CONTROL_TYPE_BUTTON; 3238 type = THEME_CONTROL_TYPE_BUTTON;
3239 } 3239 }
3240 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Checkbox", -1)) 3240 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Checkbox", -1, FALSE))
3241 { 3241 {
3242 type = THEME_CONTROL_TYPE_CHECKBOX; 3242 type = THEME_CONTROL_TYPE_CHECKBOX;
3243 } 3243 }
3244 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Combobox", -1)) 3244 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Combobox", -1, FALSE))
3245 { 3245 {
3246 type = THEME_CONTROL_TYPE_COMBOBOX; 3246 type = THEME_CONTROL_TYPE_COMBOBOX;
3247 } 3247 }
3248 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"CommandLink", -1)) 3248 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"CommandLink", -1, FALSE))
3249 { 3249 {
3250 type = THEME_CONTROL_TYPE_COMMANDLINK; 3250 type = THEME_CONTROL_TYPE_COMMANDLINK;
3251 } 3251 }
3252 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Editbox", -1)) 3252 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Editbox", -1, FALSE))
3253 { 3253 {
3254 type = THEME_CONTROL_TYPE_EDITBOX; 3254 type = THEME_CONTROL_TYPE_EDITBOX;
3255 } 3255 }
3256 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Hyperlink", -1)) 3256 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Hyperlink", -1, FALSE))
3257 { 3257 {
3258 type = THEME_CONTROL_TYPE_HYPERLINK; 3258 type = THEME_CONTROL_TYPE_HYPERLINK;
3259 } 3259 }
3260 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Hypertext", -1)) 3260 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Hypertext", -1, FALSE))
3261 { 3261 {
3262 type = THEME_CONTROL_TYPE_HYPERTEXT; 3262 type = THEME_CONTROL_TYPE_HYPERTEXT;
3263 } 3263 }
3264 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ImageControl", -1)) 3264 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ImageControl", -1, FALSE))
3265 { 3265 {
3266 type = THEME_CONTROL_TYPE_IMAGE; 3266 type = THEME_CONTROL_TYPE_IMAGE;
3267 } 3267 }
3268 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Label", -1)) 3268 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Label", -1, FALSE))
3269 { 3269 {
3270 type = THEME_CONTROL_TYPE_LABEL; 3270 type = THEME_CONTROL_TYPE_LABEL;
3271 } 3271 }
3272 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ListView", -1)) 3272 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ListView", -1, FALSE))
3273 { 3273 {
3274 type = THEME_CONTROL_TYPE_LISTVIEW; 3274 type = THEME_CONTROL_TYPE_LISTVIEW;
3275 } 3275 }
3276 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Panel", -1)) 3276 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Panel", -1, FALSE))
3277 { 3277 {
3278 type = THEME_CONTROL_TYPE_PANEL; 3278 type = THEME_CONTROL_TYPE_PANEL;
3279 } 3279 }
3280 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Progressbar", -1)) 3280 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Progressbar", -1, FALSE))
3281 { 3281 {
3282 type = THEME_CONTROL_TYPE_PROGRESSBAR; 3282 type = THEME_CONTROL_TYPE_PROGRESSBAR;
3283 } 3283 }
3284 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Richedit", -1)) 3284 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Richedit", -1, FALSE))
3285 { 3285 {
3286 type = THEME_CONTROL_TYPE_RICHEDIT; 3286 type = THEME_CONTROL_TYPE_RICHEDIT;
3287 } 3287 }
3288 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Static", -1)) 3288 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Static", -1, FALSE))
3289 { 3289 {
3290 type = THEME_CONTROL_TYPE_STATIC; 3290 type = THEME_CONTROL_TYPE_STATIC;
3291 } 3291 }
3292 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Tabs", -1)) 3292 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Tabs", -1, FALSE))
3293 { 3293 {
3294 type = THEME_CONTROL_TYPE_TAB; 3294 type = THEME_CONTROL_TYPE_TAB;
3295 } 3295 }
3296 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"TreeView", -1)) 3296 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"TreeView", -1, FALSE))
3297 { 3297 {
3298 type = THEME_CONTROL_TYPE_TREEVIEW; 3298 type = THEME_CONTROL_TYPE_TREEVIEW;
3299 } 3299 }
@@ -3705,14 +3705,14 @@ static HRESULT ParseActions(
3705 3705
3706 THEME_ACTION* pAction = pControl->rgActions + i; 3706 THEME_ACTION* pAction = pControl->rgActions + i;
3707 3707
3708 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"BrowseDirectoryAction", -1)) 3708 if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"BrowseDirectoryAction", -1, FALSE))
3709 { 3709 {
3710 pAction->type = THEME_ACTION_TYPE_BROWSE_DIRECTORY; 3710 pAction->type = THEME_ACTION_TYPE_BROWSE_DIRECTORY;
3711 3711
3712 hr = XmlGetAttributeEx(pixnChild, L"VariableName", &pAction->BrowseDirectory.sczVariableName); 3712 hr = XmlGetAttributeEx(pixnChild, L"VariableName", &pAction->BrowseDirectory.sczVariableName);
3713 ThmExitOnFailure(hr, "Failed when querying BrowseDirectoryAction/@VariableName attribute."); 3713 ThmExitOnFailure(hr, "Failed when querying BrowseDirectoryAction/@VariableName attribute.");
3714 } 3714 }
3715 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ChangePageAction", -1)) 3715 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ChangePageAction", -1, FALSE))
3716 { 3716 {
3717 pAction->type = THEME_ACTION_TYPE_CHANGE_PAGE; 3717 pAction->type = THEME_ACTION_TYPE_CHANGE_PAGE;
3718 3718
@@ -3725,7 +3725,7 @@ static HRESULT ParseActions(
3725 ThmExitOnFailure(hr, "Failed when querying ChangePageAction/@Cancel attribute."); 3725 ThmExitOnFailure(hr, "Failed when querying ChangePageAction/@Cancel attribute.");
3726 } 3726 }
3727 } 3727 }
3728 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"CloseWindowAction", -1)) 3728 else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"CloseWindowAction", -1, FALSE))
3729 { 3729 {
3730 pAction->type = THEME_ACTION_TYPE_CLOSE_WINDOW; 3730 pAction->type = THEME_ACTION_TYPE_CLOSE_WINDOW;
3731 } 3731 }
@@ -4367,7 +4367,7 @@ static HRESULT FindImageList(
4367 4367
4368 for (DWORD i = 0; i < pTheme->cImageLists; ++i) 4368 for (DWORD i = 0; i < pTheme->cImageLists; ++i)
4369 { 4369 {
4370 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pTheme->rgImageLists[i].sczName, -1, wzImageListName, -1)) 4370 if (CSTR_EQUAL == ::CompareStringOrdinal(pTheme->rgImageLists[i].sczName, -1, wzImageListName, -1, FALSE))
4371 { 4371 {
4372 *phImageList = pTheme->rgImageLists[i].hImageList; 4372 *phImageList = pTheme->rgImageLists[i].hImageList;
4373 ExitFunction1(hr = S_OK); 4373 ExitFunction1(hr = S_OK);
@@ -5027,7 +5027,7 @@ static void OnBrowseDirectory(
5027 THEME_CONTROL* pControl = pTheme->rgControls + i; 5027 THEME_CONTROL* pControl = pTheme->rgControls + i;
5028 5028
5029 if ((!pControl->wPageId || pControl->wPageId == pTheme->dwCurrentPageId) && 5029 if ((!pControl->wPageId || pControl->wPageId == pTheme->dwCurrentPageId) &&
5030 CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pControl->sczName, -1, pAction->BrowseDirectory.sczVariableName, -1)) 5030 CSTR_EQUAL == ::CompareStringOrdinal(pControl->sczName, -1, pAction->BrowseDirectory.sczVariableName, -1, FALSE))
5031 { 5031 {
5032 pTargetControl = pControl; 5032 pTargetControl = pControl;
5033 break; 5033 break;
@@ -5790,7 +5790,7 @@ static HRESULT ShowControl(
5790 5790
5791 hr = S_OK; 5791 hr = S_OK;
5792 5792
5793 Button_SetCheck(hWnd, (!sczText && !pControl->sczValue) || (sczText && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczText, -1, pControl->sczValue, -1))); 5793 Button_SetCheck(hWnd, (!sczText && !pControl->sczValue) || (sczText && CSTR_EQUAL == ::CompareStringOrdinal(sczText, -1, pControl->sczValue, -1, FALSE)));
5794 } 5794 }
5795 } 5795 }
5796 5796
diff --git a/src/libs/dutil/WixToolset.DUtil/xmlutil.cpp b/src/libs/dutil/WixToolset.DUtil/xmlutil.cpp
index 2e1a2200..c4273c2e 100644
--- a/src/libs/dutil/WixToolset.DUtil/xmlutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/xmlutil.cpp
@@ -98,7 +98,7 @@ extern "C" void DAPI XmlUninitialize(
98 { 98 {
99 ::CoUninitialize(); 99 ::CoUninitialize();
100 } 100 }
101 } 101 }
102} 102}
103 103
104extern "C" HRESULT DAPI XmlCreateElement( 104extern "C" HRESULT DAPI XmlCreateElement(
@@ -738,7 +738,7 @@ HRESULT DAPI XmlGetYesNoAttribute(
738 { 738 {
739 XmlExitOnFailure(hr, "Failed to get attribute."); 739 XmlExitOnFailure(hr, "Failed to get attribute.");
740 740
741 *pfYes = CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczValue, -1, L"yes", -1); 741 *pfYes = CSTR_EQUAL == ::CompareStringOrdinal(sczValue, -1, L"yes", -1, FALSE);
742 } 742 }
743 743
744LExit: 744LExit:
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
index 29a5d7d5..2577d509 100644
--- a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
+++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
@@ -61,7 +61,7 @@ public: // IBAFunctions
61 __inout DWORD* /*pdwAutomaticBehaviorType*/ 61 __inout DWORD* /*pdwAutomaticBehaviorType*/
62 ) 62 )
63 { 63 {
64 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzName, -1, L"InstallTestButton", -1)) 64 if (CSTR_EQUAL == ::CompareStringOrdinal(wzName, -1, L"InstallTestButton", -1, FALSE))
65 { 65 {
66 *pfProcessed = TRUE; 66 *pfProcessed = TRUE;
67 *pwId = BAF_CONTROL_INSTALL_TEST_BUTTON; 67 *pwId = BAF_CONTROL_INSTALL_TEST_BUTTON;
@@ -343,7 +343,7 @@ private:
343 343
344 for (DWORD iAssignControl = 0; iAssignControl < countof(vrgInitControls); ++iAssignControl) 344 for (DWORD iAssignControl = 0; iAssignControl < countof(vrgInitControls); ++iAssignControl)
345 { 345 {
346 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, vrgInitControls[iAssignControl].wzName, -1)) 346 if (CSTR_EQUAL == ::CompareStringOrdinal(pArgs->pThemeControl->sczName, -1, vrgInitControls[iAssignControl].wzName, -1, FALSE))
347 { 347 {
348 fProcessed = TRUE; 348 fProcessed = TRUE;
349 pResults->wId = vrgInitControls[iAssignControl].wId; 349 pResults->wId = vrgInitControls[iAssignControl].wId;
diff --git a/src/tools/thmviewer/thmviewer.cpp b/src/tools/thmviewer/thmviewer.cpp
index 69a9920b..12d311af 100644
--- a/src/tools/thmviewer/thmviewer.cpp
+++ b/src/tools/thmviewer/thmviewer.cpp
@@ -495,14 +495,14 @@ static void OnNewTheme(
495 tvi.item.lParam = i + 1; //prgdwPageIds[i]; - TODO: do the right thing here by calling ThemeGetPageIds(), should not assume we know how the page ids will be calculated. 495 tvi.item.lParam = i + 1; //prgdwPageIds[i]; - TODO: do the right thing here by calling ThemeGetPageIds(), should not assume we know how the page ids will be calculated.
496 496
497 HTREEITEM hti = reinterpret_cast<HTREEITEM>(::SendMessage(pTreeControl->hWnd, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi))); 497 HTREEITEM hti = reinterpret_cast<HTREEITEM>(::SendMessage(pTreeControl->hWnd, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi)));
498 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pPage->sczName, -1, wzSelectedPage, -1)) 498 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringOrdinal(pPage->sczName, -1, wzSelectedPage, -1, FALSE))
499 { 499 {
500 htiSelected = hti; 500 htiSelected = hti;
501 } 501 }
502 } 502 }
503 } 503 }
504 504
505 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Application", -1, wzSelectedPage, -1)) 505 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringOrdinal(L"Application", -1, wzSelectedPage, -1, FALSE))
506 { 506 {
507 htiSelected = tvi.hParent; 507 htiSelected = tvi.hParent;
508 } 508 }
@@ -519,7 +519,7 @@ static BOOL OnThemeLoadingControl(
519 __in THEME_LOADINGCONTROL_RESULTS* pResults 519 __in THEME_LOADINGCONTROL_RESULTS* pResults
520 ) 520 )
521{ 521{
522 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, L"Tree", -1)) 522 if (CSTR_EQUAL == ::CompareStringOrdinal(pArgs->pThemeControl->sczName, -1, L"Tree", -1, FALSE))
523 { 523 {
524 pResults->wId = THMVWR_CONTROL_TREE; 524 pResults->wId = THMVWR_CONTROL_TREE;
525 } 525 }