diff options
| author | Rob Mensching <rob@firegiant.com> | 2025-11-01 20:24:25 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2025-11-03 14:49:39 -0800 |
| commit | 4d626c294c4783d454e27ea4e5614037dac8576e (patch) | |
| tree | 51d822f48716e4c5ef2a51ca28925896f221b521 /src/ext | |
| parent | 33c12fa386aa7ace7a6bd06a45bc3ecf17e9c8f5 (diff) | |
| download | wix-4d626c294c4783d454e27ea4e5614037dac8576e.tar.gz wix-4d626c294c4783d454e27ea4e5614037dac8576e.tar.bz2 wix-4d626c294c4783d454e27ea4e5614037dac8576e.zip | |
Use CompareStringOrdinal() instead of CompareString() case-insensitive
This commit moves to the modern CompareStringOrdinal() for all case-insensitve
uses of CompareString() with the invariant locale.
Partially resolves 6947
Diffstat (limited to 'src/ext')
| -rw-r--r-- | src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | 4 | ||||
| -rw-r--r-- | src/ext/Bal/test/examples/TestEngine/ExampleTestEngine.cpp | 6 | ||||
| -rw-r--r-- | src/ext/Iis/ca/scaapppool.cpp | 18 | ||||
| -rw-r--r-- | src/ext/Iis/ca/scaexecIIS7.cpp | 18 | ||||
| -rw-r--r-- | src/ext/Iis/ca/scawebappext.cpp | 2 | ||||
| -rw-r--r-- | src/ext/NetFx/netcoresearch/netcoresearch.cpp | 8 | ||||
| -rw-r--r-- | src/ext/VisualStudio/ca/vsca.cpp | 4 |
7 files changed, 30 insertions, 30 deletions
diff --git a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp index 59b2d8de..9ddab7c0 100644 --- a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | |||
| @@ -2928,7 +2928,7 @@ private: | |||
| 2928 | 2928 | ||
| 2929 | if (argv[i][0] == L'-' || argv[i][0] == L'/') | 2929 | if (argv[i][0] == L'-' || argv[i][0] == L'/') |
| 2930 | { | 2930 | { |
| 2931 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"lang", -1)) | 2931 | if (CSTR_EQUAL == ::CompareStringOrdinal(&argv[i][1], -1, L"lang", -1, TRUE)) |
| 2932 | { | 2932 | { |
| 2933 | if (i + 1 >= argc) | 2933 | if (i + 1 >= argc) |
| 2934 | { | 2934 | { |
| @@ -2941,7 +2941,7 @@ private: | |||
| 2941 | hr = StrAllocString(psczLanguage, &argv[i][0], 0); | 2941 | hr = StrAllocString(psczLanguage, &argv[i][0], 0); |
| 2942 | BalExitOnFailure(hr, "Failed to copy language."); | 2942 | BalExitOnFailure(hr, "Failed to copy language."); |
| 2943 | } | 2943 | } |
| 2944 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"cache", -1)) | 2944 | else if (CSTR_EQUAL == ::CompareStringOrdinal(&argv[i][1], -1, L"cache", -1, TRUE)) |
| 2945 | { | 2945 | { |
| 2946 | m_fRequestedCacheOnly = TRUE; | 2946 | m_fRequestedCacheOnly = TRUE; |
| 2947 | } | 2947 | } |
diff --git a/src/ext/Bal/test/examples/TestEngine/ExampleTestEngine.cpp b/src/ext/Bal/test/examples/TestEngine/ExampleTestEngine.cpp index fc1938fe..9ad4e91f 100644 --- a/src/ext/Bal/test/examples/TestEngine/ExampleTestEngine.cpp +++ b/src/ext/Bal/test/examples/TestEngine/ExampleTestEngine.cpp | |||
| @@ -19,15 +19,15 @@ int __cdecl wmain(int argc, LPWSTR argv[]) | |||
| 19 | { | 19 | { |
| 20 | fShowUsage = TRUE; | 20 | fShowUsage = TRUE; |
| 21 | } | 21 | } |
| 22 | else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"reload", -1)) | 22 | else if (CSTR_EQUAL == ::CompareStringOrdinal(argv[1], -1, L"reload", -1, TRUE)) |
| 23 | { | 23 | { |
| 24 | hr = RunReloadEngine(argv[2], argv[3]); | 24 | hr = RunReloadEngine(argv[2], argv[3]); |
| 25 | } | 25 | } |
| 26 | else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"shutdown", -1)) | 26 | else if (CSTR_EQUAL == ::CompareStringOrdinal(argv[1], -1, L"shutdown", -1, TRUE)) |
| 27 | { | 27 | { |
| 28 | hr = RunShutdownEngine(argv[2], argv[3]); | 28 | hr = RunShutdownEngine(argv[2], argv[3]); |
| 29 | } | 29 | } |
| 30 | else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"waitforquit", -1)) | 30 | else if (CSTR_EQUAL == ::CompareStringOrdinal(argv[1], -1, L"waitforquit", -1, TRUE)) |
| 31 | { | 31 | { |
| 32 | hr = RunWaitForQuitEngine(argv[2], argv[3]); | 32 | hr = RunWaitForQuitEngine(argv[2], argv[3]); |
| 33 | } | 33 | } |
diff --git a/src/ext/Iis/ca/scaapppool.cpp b/src/ext/Iis/ca/scaapppool.cpp index 781c55ca..951f2d4b 100644 --- a/src/ext/Iis/ca/scaapppool.cpp +++ b/src/ext/Iis/ca/scaapppool.cpp | |||
| @@ -80,7 +80,7 @@ HRESULT ScaAppPoolRead( | |||
| 80 | WcaLog(LOGMSG_VERBOSE, "Skipping ScaAppPoolRead() - required table not present"); | 80 | WcaLog(LOGMSG_VERBOSE, "Skipping ScaAppPoolRead() - required table not present"); |
| 81 | ExitFunction1(hr = S_FALSE); | 81 | ExitFunction1(hr = S_FALSE); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | hr = WcaBeginUnwrapQuery(&hComponentQuery, ppwzCustomActionData); | 84 | hr = WcaBeginUnwrapQuery(&hComponentQuery, ppwzCustomActionData); |
| 85 | ExitOnFailure(hr, "Failed to unwrap query for ScaAppPoolRead"); | 85 | ExitOnFailure(hr, "Failed to unwrap query for ScaAppPoolRead"); |
| 86 | 86 | ||
| @@ -478,17 +478,17 @@ HRESULT ScaWriteAppPool( | |||
| 478 | } | 478 | } |
| 479 | else if (psap->iAttributes & APATTR_OTHERUSER) | 479 | else if (psap->iAttributes & APATTR_OTHERUSER) |
| 480 | { | 480 | { |
| 481 | if (!*psap->suUser.wzDomain || CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzDomain, -1, L".", -1)) | 481 | if (!*psap->suUser.wzDomain || CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzDomain, -1, L".", -1, TRUE)) |
| 482 | { | 482 | { |
| 483 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"NetworkService", -1)) | 483 | if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"NetworkService", -1, TRUE)) |
| 484 | { | 484 | { |
| 485 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; | 485 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; |
| 486 | } | 486 | } |
| 487 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"LocalService", -1)) | 487 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"LocalService", -1, TRUE)) |
| 488 | { | 488 | { |
| 489 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; | 489 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; |
| 490 | } | 490 | } |
| 491 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"LocalSystem", -1)) | 491 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"LocalSystem", -1, TRUE)) |
| 492 | { | 492 | { |
| 493 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; | 493 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; |
| 494 | } | 494 | } |
| @@ -497,17 +497,17 @@ HRESULT ScaWriteAppPool( | |||
| 497 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER; | 497 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER; |
| 498 | } | 498 | } |
| 499 | } | 499 | } |
| 500 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzDomain, -1, L"NT AUTHORITY", -1)) | 500 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzDomain, -1, L"NT AUTHORITY", -1, TRUE)) |
| 501 | { | 501 | { |
| 502 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"NETWORK SERVICE", -1)) | 502 | if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"NETWORK SERVICE", -1, TRUE)) |
| 503 | { | 503 | { |
| 504 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; | 504 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE; |
| 505 | } | 505 | } |
| 506 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"SERVICE", -1)) | 506 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"SERVICE", -1, TRUE)) |
| 507 | { | 507 | { |
| 508 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; | 508 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE; |
| 509 | } | 509 | } |
| 510 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, psap->suUser.wzName, -1, L"SYSTEM", -1)) | 510 | else if (CSTR_EQUAL == ::CompareStringOrdinal(psap->suUser.wzName, -1, L"SYSTEM", -1, TRUE)) |
| 511 | { | 511 | { |
| 512 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; | 512 | dwIdentity = MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM; |
| 513 | } | 513 | } |
diff --git a/src/ext/Iis/ca/scaexecIIS7.cpp b/src/ext/Iis/ca/scaexecIIS7.cpp index 108007a1..52378d34 100644 --- a/src/ext/Iis/ca/scaexecIIS7.cpp +++ b/src/ext/Iis/ca/scaexecIIS7.cpp | |||
| @@ -566,7 +566,7 @@ HRESULT IIS7AspProperty( | |||
| 566 | // | 566 | // |
| 567 | //Do not append trailing '/' for default vDir | 567 | //Do not append trailing '/' for default vDir |
| 568 | // | 568 | // |
| 569 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pwzPathName, -1, L"/", -1)) | 569 | if (CSTR_EQUAL != ::CompareStringOrdinal(pwzPathName, -1, L"/", -1, TRUE)) |
| 570 | { | 570 | { |
| 571 | hr = StrAllocConcat(&pwzLocationPath, L"/", 0); | 571 | hr = StrAllocConcat(&pwzLocationPath, L"/", 0); |
| 572 | ExitOnFailure(hr, "failed to copy location WebDir '/'"); | 572 | ExitOnFailure(hr, "failed to copy location WebDir '/'"); |
| @@ -742,7 +742,7 @@ HRESULT IIS7WebDir( | |||
| 742 | // | 742 | // |
| 743 | //Do not append trailing '/' for default vDir | 743 | //Do not append trailing '/' for default vDir |
| 744 | // | 744 | // |
| 745 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pwzPathName, -1, L"/", -1)) | 745 | if (CSTR_EQUAL != ::CompareStringOrdinal(pwzPathName, -1, L"/", -1, TRUE)) |
| 746 | { | 746 | { |
| 747 | hr = StrAllocConcat(&pwzLocationPath, L"/", 0); | 747 | hr = StrAllocConcat(&pwzLocationPath, L"/", 0); |
| 748 | ExitOnFailure(hr, "failed to copy location WebDir '/'"); | 748 | ExitOnFailure(hr, "failed to copy location WebDir '/'"); |
| @@ -998,7 +998,7 @@ HRESULT IIS7WebError( | |||
| 998 | hr = StrAllocFormatted(&pwzConfigPath, L"%s/%s", IIS_CONFIG_APPHOST_ROOT, pwzSiteName); | 998 | hr = StrAllocFormatted(&pwzConfigPath, L"%s/%s", IIS_CONFIG_APPHOST_ROOT, pwzSiteName); |
| 999 | ExitOnFailure(hr, "failed to format web error config path"); | 999 | ExitOnFailure(hr, "failed to format web error config path"); |
| 1000 | 1000 | ||
| 1001 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pwzAppName, -1, L"/", -1)) | 1001 | if (CSTR_EQUAL != ::CompareStringOrdinal(pwzAppName, -1, L"/", -1, TRUE)) |
| 1002 | { | 1002 | { |
| 1003 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); | 1003 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); |
| 1004 | ExitOnFailure(hr, "failed to copy web error config path delim"); | 1004 | ExitOnFailure(hr, "failed to copy web error config path delim"); |
| @@ -1325,7 +1325,7 @@ HRESULT IIS7HttpHeader( | |||
| 1325 | hr = StrAllocFormatted(&pwzConfigPath, L"%s/%s", IIS_CONFIG_APPHOST_ROOT, pwzSiteName); | 1325 | hr = StrAllocFormatted(&pwzConfigPath, L"%s/%s", IIS_CONFIG_APPHOST_ROOT, pwzSiteName); |
| 1326 | ExitOnFailure(hr, "failed to format web error config path"); | 1326 | ExitOnFailure(hr, "failed to format web error config path"); |
| 1327 | 1327 | ||
| 1328 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pwzAppName, -1, L"/", -1)) | 1328 | if (CSTR_EQUAL != ::CompareStringOrdinal(pwzAppName, -1, L"/", -1, TRUE)) |
| 1329 | { | 1329 | { |
| 1330 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); | 1330 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); |
| 1331 | ExitOnFailure(hr, "failed to copy web error config path delim"); | 1331 | ExitOnFailure(hr, "failed to copy web error config path delim"); |
| @@ -2340,7 +2340,7 @@ HRESULT IIS7AppExtension( | |||
| 2340 | // | 2340 | // |
| 2341 | //Do not append trailing '/' for default vDir | 2341 | //Do not append trailing '/' for default vDir |
| 2342 | // | 2342 | // |
| 2343 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pwzWebRoot, -1, L"/", -1)) | 2343 | if (CSTR_EQUAL != ::CompareStringOrdinal(pwzWebRoot, -1, L"/", -1, TRUE)) |
| 2344 | { | 2344 | { |
| 2345 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); | 2345 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); |
| 2346 | ExitOnFailure(hr, "failed to copy appext config path delim"); | 2346 | ExitOnFailure(hr, "failed to copy appext config path delim"); |
| @@ -2495,7 +2495,7 @@ LExit: | |||
| 2495 | // | 2495 | // |
| 2496 | //Do not append trailing '/' for default vDir | 2496 | //Do not append trailing '/' for default vDir |
| 2497 | // | 2497 | // |
| 2498 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pwzWebRoot, -1, L"/", -1)) | 2498 | if (CSTR_EQUAL != ::CompareStringOrdinal(pwzWebRoot, -1, L"/", -1, TRUE)) |
| 2499 | { | 2499 | { |
| 2500 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); | 2500 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); |
| 2501 | ExitOnFailure(hr, "failed to copy appext config path delim"); | 2501 | ExitOnFailure(hr, "failed to copy appext config path delim"); |
| @@ -2627,7 +2627,7 @@ HRESULT IIS7DirProperties( | |||
| 2627 | // | 2627 | // |
| 2628 | //Do not append trailing '/' for default vDir | 2628 | //Do not append trailing '/' for default vDir |
| 2629 | // | 2629 | // |
| 2630 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pwzWebRoot, -1, L"/", -1)) | 2630 | if (CSTR_EQUAL != ::CompareStringOrdinal(pwzWebRoot, -1, L"/", -1, TRUE)) |
| 2631 | { | 2631 | { |
| 2632 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); | 2632 | hr = StrAllocConcat(&pwzConfigPath, L"/", 0); |
| 2633 | ExitOnFailure(hr, "failed to copy appext config path delim"); | 2633 | ExitOnFailure(hr, "failed to copy appext config path delim"); |
| @@ -3337,7 +3337,7 @@ static HRESULT CreateWebLog( | |||
| 3337 | ExitOnFailure(hr, "Failed get logfile element"); | 3337 | ExitOnFailure(hr, "Failed get logfile element"); |
| 3338 | ReleaseVariant(vtProp); | 3338 | ReleaseVariant(vtProp); |
| 3339 | 3339 | ||
| 3340 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pwzFormat, -1, L"none", -1)) | 3340 | if (CSTR_EQUAL != ::CompareStringOrdinal(pwzFormat, -1, L"none", -1, TRUE)) |
| 3341 | { | 3341 | { |
| 3342 | hr = Iis7PutPropertyString(pLogFile, IIS_CONFIG_LOGFORMAT, pwzFormat); | 3342 | hr = Iis7PutPropertyString(pLogFile, IIS_CONFIG_LOGFORMAT, pwzFormat); |
| 3343 | ExitOnFailure(hr, "Failed set logfile format property"); | 3343 | ExitOnFailure(hr, "Failed set logfile format property"); |
| @@ -4118,7 +4118,7 @@ static HRESULT ClearLocationTag( | |||
| 4118 | ExitOnFailure(hr, "Failed to get IIS location collection count"); | 4118 | ExitOnFailure(hr, "Failed to get IIS location collection count"); |
| 4119 | 4119 | ||
| 4120 | hr = pLocation->get_Path(&bstrLocationPath); | 4120 | hr = pLocation->get_Path(&bstrLocationPath); |
| 4121 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, swLocationPath, -1, bstrLocationPath, -1)) | 4121 | if (CSTR_EQUAL == ::CompareStringOrdinal(swLocationPath, -1, bstrLocationPath, -1, TRUE)) |
| 4122 | { | 4122 | { |
| 4123 | hr = pLocationCollection->DeleteLocation(vtIndex); | 4123 | hr = pLocationCollection->DeleteLocation(vtIndex); |
| 4124 | ExitOnFailure(hr, "Failed to delete IIS location tag %ls",swLocationPath); | 4124 | ExitOnFailure(hr, "Failed to delete IIS location tag %ls",swLocationPath); |
diff --git a/src/ext/Iis/ca/scawebappext.cpp b/src/ext/Iis/ca/scawebappext.cpp index cf3b9dd3..2f74871c 100644 --- a/src/ext/Iis/ca/scawebappext.cpp +++ b/src/ext/Iis/ca/scawebappext.cpp | |||
| @@ -124,7 +124,7 @@ HRESULT ScaWebAppExtensionsWrite( | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | // if verbs were specified and not the keyword "all" | 126 | // if verbs were specified and not the keyword "all" |
| 127 | if (pswappext->wzVerbs[0] && CSTR_EQUAL != CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pswappext->wzVerbs, -1, L"all", -1)) | 127 | if (pswappext->wzVerbs[0] && CSTR_EQUAL != CompareStringOrdinal(pswappext->wzVerbs, -1, L"all", -1, TRUE)) |
| 128 | { | 128 | { |
| 129 | hr = ::StringCchCatW(wzAppExtension, countof(wzAppExtension), L","); | 129 | hr = ::StringCchCatW(wzAppExtension, countof(wzAppExtension), L","); |
| 130 | ExitOnFailure(hr, "Failed to concatenate comma to app extension string"); | 130 | ExitOnFailure(hr, "Failed to concatenate comma to app extension string"); |
diff --git a/src/ext/NetFx/netcoresearch/netcoresearch.cpp b/src/ext/NetFx/netcoresearch/netcoresearch.cpp index 8c788461..1b151d8f 100644 --- a/src/ext/NetFx/netcoresearch/netcoresearch.cpp +++ b/src/ext/NetFx/netcoresearch/netcoresearch.cpp | |||
| @@ -86,7 +86,7 @@ HRESULT GetSearchStateFromArguments( | |||
| 86 | 86 | ||
| 87 | wzSearchKind = argv[1]; | 87 | wzSearchKind = argv[1]; |
| 88 | 88 | ||
| 89 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, wzSearchKind, -1, L"runtime", -1)) | 89 | if (CSTR_EQUAL == ::CompareStringOrdinal(wzSearchKind, -1, L"runtime", -1, TRUE)) |
| 90 | { | 90 | { |
| 91 | if (argc != 4) | 91 | if (argc != 4) |
| 92 | { | 92 | { |
| @@ -103,7 +103,7 @@ HRESULT GetSearchStateFromArguments( | |||
| 103 | 103 | ||
| 104 | pSearchState->Runtime.wzTargetName = wzTargetName; | 104 | pSearchState->Runtime.wzTargetName = wzTargetName; |
| 105 | } | 105 | } |
| 106 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, wzSearchKind, -1, L"sdk", -1)) | 106 | else if (CSTR_EQUAL == ::CompareStringOrdinal(wzSearchKind, -1, L"sdk", -1, TRUE)) |
| 107 | { | 107 | { |
| 108 | if (argc != 3) | 108 | if (argc != 3) |
| 109 | { | 109 | { |
| @@ -117,7 +117,7 @@ HRESULT GetSearchStateFromArguments( | |||
| 117 | hr = StrStringToUInt32(wzMajorVersion, 0, reinterpret_cast<UINT*>(&pSearchState->Sdk.dwMajorVersion)); | 117 | hr = StrStringToUInt32(wzMajorVersion, 0, reinterpret_cast<UINT*>(&pSearchState->Sdk.dwMajorVersion)); |
| 118 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to get sdk major version from: %ls", wzMajorVersion); | 118 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to get sdk major version from: %ls", wzMajorVersion); |
| 119 | } | 119 | } |
| 120 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, wzSearchKind, -1, L"sdkfeatureband", -1)) | 120 | else if (CSTR_EQUAL == ::CompareStringOrdinal(wzSearchKind, -1, L"sdkfeatureband", -1, TRUE)) |
| 121 | { | 121 | { |
| 122 | if (argc != 5) | 122 | if (argc != 5) |
| 123 | { | 123 | { |
| @@ -208,7 +208,7 @@ static HRESULT PerformRuntimeSearch( | |||
| 208 | const hostfxr_dotnet_environment_framework_info* pFrameworkInfo = pInfo->frameworks + i; | 208 | const hostfxr_dotnet_environment_framework_info* pFrameworkInfo = pInfo->frameworks + i; |
| 209 | ReleaseVerutilVersion(pFrameworkVersion); | 209 | ReleaseVerutilVersion(pFrameworkVersion); |
| 210 | 210 | ||
| 211 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, wzTargetName, -1, pFrameworkInfo->name, -1)) | 211 | if (CSTR_EQUAL != ::CompareStringOrdinal(wzTargetName, -1, pFrameworkInfo->name, -1, TRUE)) |
| 212 | { | 212 | { |
| 213 | continue; | 213 | continue; |
| 214 | } | 214 | } |
diff --git a/src/ext/VisualStudio/ca/vsca.cpp b/src/ext/VisualStudio/ca/vsca.cpp index 736add1f..681187d6 100644 --- a/src/ext/VisualStudio/ca/vsca.cpp +++ b/src/ext/VisualStudio/ca/vsca.cpp | |||
| @@ -219,7 +219,7 @@ static HRESULT InstanceInProducts( | |||
| 219 | { | 219 | { |
| 220 | const LPCWSTR wzProduct = rgwzProducts[i]; | 220 | const LPCWSTR wzProduct = rgwzProducts[i]; |
| 221 | 221 | ||
| 222 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, bstrId, -1, wzProduct, -1)) | 222 | if (CSTR_EQUAL == ::CompareStringOrdinal(bstrId, -1, wzProduct, -1, TRUE)) |
| 223 | { | 223 | { |
| 224 | hr = S_OK; | 224 | hr = S_OK; |
| 225 | ExitFunction(); | 225 | ExitFunction(); |
| @@ -579,7 +579,7 @@ static HRESULT SetPropertyForComponent( | |||
| 579 | { | 579 | { |
| 580 | const VS_COMPONENT_PROPERTY* pComponent = &rgComponents[i]; | 580 | const VS_COMPONENT_PROPERTY* pComponent = &rgComponents[i]; |
| 581 | 581 | ||
| 582 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pComponent->pwzComponent, -1, wzComponent, -1)) | 582 | if (CSTR_EQUAL == ::CompareStringOrdinal(pComponent->pwzComponent, -1, wzComponent, -1, TRUE)) |
| 583 | { | 583 | { |
| 584 | hr = WcaSetIntProperty(pComponent->pwzProperty, 1); | 584 | hr = WcaSetIntProperty(pComponent->pwzProperty, 1); |
| 585 | ExitOnFailure(hr, "Failed to set property: %ls", pComponent->pwzProperty); | 585 | ExitOnFailure(hr, "Failed to set property: %ls", pComponent->pwzProperty); |
