From 4d626c294c4783d454e27ea4e5614037dac8576e Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 1 Nov 2025 20:24:25 -0700 Subject: 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 --- src/ext/VisualStudio/ca/vsca.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ext/VisualStudio') 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( { const LPCWSTR wzProduct = rgwzProducts[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, bstrId, -1, wzProduct, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrId, -1, wzProduct, -1, TRUE)) { hr = S_OK; ExitFunction(); @@ -579,7 +579,7 @@ static HRESULT SetPropertyForComponent( { const VS_COMPONENT_PROPERTY* pComponent = &rgComponents[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pComponent->pwzComponent, -1, wzComponent, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pComponent->pwzComponent, -1, wzComponent, -1, TRUE)) { hr = WcaSetIntProperty(pComponent->pwzProperty, 1); ExitOnFailure(hr, "Failed to set property: %ls", pComponent->pwzProperty); -- cgit v1.2.3-55-g6feb