aboutsummaryrefslogtreecommitdiff
path: root/src/libs
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/libs
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/libs')
-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
9 files changed, 107 insertions, 112 deletions
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: