From d2ba0da55725f2908b67e1470afc7cfd71cb3d1f Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 1 Nov 2025 21:52:31 -0700 Subject: 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 --- src/api/burn/balutil/balinfo.cpp | 34 +++++------ src/api/burn/balutil/balretry.cpp | 2 +- src/api/burn/bextutil/bextutil.cpp | 2 +- src/burn/engine/approvedexe.cpp | 2 +- src/burn/engine/bundlepackageengine.cpp | 8 +-- src/burn/engine/burnextension.cpp | 2 +- src/burn/engine/burnpipe.cpp | 2 +- src/burn/engine/condition.cpp | 10 ++-- src/burn/engine/container.cpp | 2 +- src/burn/engine/exeengine.cpp | 12 ++-- src/burn/engine/logging.cpp | 2 +- src/burn/engine/manifest.cpp | 2 +- src/burn/engine/mspengine.cpp | 6 +- src/burn/engine/package.cpp | 28 ++++----- src/burn/engine/payload.cpp | 4 +- src/burn/engine/registration.cpp | 8 +-- src/burn/engine/relatedbundle.cpp | 2 +- src/burn/engine/search.cpp | 66 ++++++++++---------- src/burn/engine/variable.cpp | 12 ++-- .../stdbas/WixStandardBootstrapperApplication.cpp | 4 +- src/ext/Iis/ca/scafilter.cpp | 4 +- src/ext/NetFx/be/netfxsearch.cpp | 8 +-- src/ext/Util/be/utilsearch.cpp | 6 +- src/libs/dutil/WixToolset.DUtil/apuputil.cpp | 32 +++++----- src/libs/dutil/WixToolset.DUtil/atomutil.cpp | 66 ++++++++++---------- src/libs/dutil/WixToolset.DUtil/dictutil.cpp | 11 +--- src/libs/dutil/WixToolset.DUtil/iniutil.cpp | 10 ++-- src/libs/dutil/WixToolset.DUtil/locutil.cpp | 6 +- src/libs/dutil/WixToolset.DUtil/monutil.cpp | 4 +- src/libs/dutil/WixToolset.DUtil/sceutil.cpp | 16 ++--- src/libs/dutil/WixToolset.DUtil/thmutil.cpp | 70 +++++++++++----------- src/libs/dutil/WixToolset.DUtil/xmlutil.cpp | 4 +- .../Manual/BafThmutilTesting/BafThmUtilTesting.cpp | 4 +- src/tools/thmviewer/thmviewer.cpp | 6 +- 34 files changed, 226 insertions(+), 231 deletions(-) (limited to 'src') 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( // Check to see if the bundle is already in the list of packages. for (DWORD i = 0; i < pPackages->cPackages; ++i) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzId, -1, pPackages->rgPackages[i].sczId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(wzId, -1, pPackages->rgPackages[i].sczId, -1, FALSE)) { ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)); } @@ -232,7 +232,7 @@ DAPI_(HRESULT) BalInfoAddUpdateBundleAsPackage( // Check to see if the bundle is already in the list of packages. for (DWORD i = 0; i < pPackages->cPackages; ++i) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzId, -1, pPackages->rgPackages[i].sczId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(wzId, -1, pPackages->rgPackages[i].sczId, -1, FALSE)) { ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)); } @@ -270,7 +270,7 @@ DAPI_(HRESULT) BalInfoFindPackageById( for (DWORD i = 0; i < pPackages->cPackages; ++i) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzId, -1, pPackages->rgPackages[i].sczId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(wzId, -1, pPackages->rgPackages[i].sczId, -1, FALSE)) { *ppPackage = pPackages->rgPackages + i; break; @@ -409,23 +409,23 @@ static HRESULT ParsePackagesFromXml( hr = XmlGetAttributeEx(pNode, L"PackageType", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get package type for package."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Bundle", -1, scz, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(L"Bundle", -1, scz, -1, FALSE)) { prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_BUNDLE_CHAIN; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Exe", -1, scz, -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(L"Exe", -1, scz, -1, FALSE)) { prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_EXE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Msi", -1, scz, -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(L"Msi", -1, scz, -1, FALSE)) { prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSI; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Msp", -1, scz, -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(L"Msp", -1, scz, -1, FALSE)) { prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSP; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Msu", -1, scz, -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(L"Msu", -1, scz, -1, FALSE)) { prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_MSU; } @@ -454,15 +454,15 @@ static HRESULT ParsePackagesFromXml( hr = XmlGetAttributeEx(pNode, L"Cache", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get cache type for package."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"remove", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"remove", -1, FALSE)) { prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"keep", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"keep", -1, FALSE)) { prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"force", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"force", -1, FALSE)) { prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE; } @@ -522,19 +522,19 @@ static HRESULT ParseBalPackageInfoFromXml( if (fXmlFound) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"default", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"default", -1, FALSE)) { pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_DEFAULT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"x86", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"x86", -1, FALSE)) { pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X86; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"x64", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"x64", -1, FALSE)) { pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_X64; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"arm64", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"arm64", -1, FALSE)) { pPackage->primaryPackageType = BAL_INFO_PRIMARY_PACKAGE_TYPE_ARM64; } @@ -611,11 +611,11 @@ static HRESULT ParseOverridableVariablesFromXml( hr = XmlGetAttributeEx(pCommandLineNode, L"VariableType", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get command line variable type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"caseInsensitive", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"caseInsensitive", -1, FALSE)) { pOverridableVariables->commandLineType = BAL_INFO_VARIABLE_COMMAND_LINE_TYPE_CASE_INSENSITIVE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"caseSensitive", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"caseSensitive", -1, FALSE)) { pOverridableVariables->commandLineType = BAL_INFO_VARIABLE_COMMAND_LINE_TYPE_CASE_SENSITIVE; } 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( { BOOL fActive = FALSE; - fActive = vrgRetryInfo[type].sczId && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, sczId, -1, vrgRetryInfo[type].sczId, -1); + fActive = vrgRetryInfo[type].sczId && CSTR_EQUAL == ::CompareStringOrdinal(sczId, -1, vrgRetryInfo[type].sczId, -1, FALSE); return fActive; } 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( hr = XmlGetAttributeEx(pixnNode, L"Id", &sczId); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Id."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczId, -1, wzExtensionId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(sczId, -1, wzExtensionId, -1, FALSE)) { *ppixnBootstrapperExtension = pixnNode; 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( { pApprovedExe = &pApprovedExes->rgApprovedExes[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pApprovedExe->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pApprovedExe->sczId, -1, wzId, -1, FALSE)) { *ppApprovedExe = pApprovedExe; 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( hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode); ExitOnFailure(hr, "Failed to get @Code."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Detect", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Detect", -1, FALSE)) { hr = MemEnsureArraySizeForNewItems(reinterpret_cast(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5); ExitOnFailure(hr, "Failed to resize Detect code array"); @@ -155,7 +155,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( sczCode = NULL; *pcDetectCodes += 1; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Upgrade", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Upgrade", -1, FALSE)) { hr = MemEnsureArraySizeForNewItems(reinterpret_cast(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5); ExitOnFailure(hr, "Failed to resize Upgrade code array"); @@ -164,7 +164,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( sczCode = NULL; *pcUpgradeCodes += 1; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Addon", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Addon", -1, FALSE)) { hr = MemEnsureArraySizeForNewItems(reinterpret_cast(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5); ExitOnFailure(hr, "Failed to resize Addon code array"); @@ -173,7 +173,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( sczCode = NULL; *pcAddonCodes += 1; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Patch", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Patch", -1, FALSE)) { hr = MemEnsureArraySizeForNewItems(reinterpret_cast(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5); 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( { pExtension = &pBurnExtensions->rgExtensions[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pExtension->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pExtension->sczId, -1, wzId, -1, FALSE)) { *ppExtension = pExtension; 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( ExitOnFailure(hr, "Failed to read verification secret from parent pipe."); // Verify the secrets match. - if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, 0, sczVerificationSecret, -1, wzSecret, -1)) + if (CSTR_EQUAL != ::CompareStringOrdinal(sczVerificationSecret, -1, wzSecret, -1, FALSE)) { hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA); 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( ) { HRESULT hr = S_OK; - DWORD dwCompareString = (comparison & INSENSITIVE) ? NORM_IGNORECASE : 0; + BOOL fIgnoreCase = (comparison & INSENSITIVE) ? TRUE : FALSE; size_t cchLeftSize = 0; size_t cchRightSize = 0; int cchLeft = 0; @@ -958,7 +958,7 @@ static HRESULT CompareStringValues( case BURN_SYMBOL_TYPE_EQ_I: case BURN_SYMBOL_TYPE_NE_I: { - int i = ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand, cchLeft, wzRightOperand, cchRight); + int i = ::CompareStringOrdinal(wzLeftOperand, cchLeft, wzRightOperand, cchRight, fIgnoreCase); hr = CompareIntegerValues(comparison, i, CSTR_EQUAL, pfResult); } break; @@ -967,7 +967,7 @@ static HRESULT CompareStringValues( // test if left string contains right string for (int i = 0; (i + cchRight) <= cchLeft; ++i) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand + i, cchRight, wzRightOperand, cchRight)) + if (CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand + i, cchRight, wzRightOperand, cchRight, fIgnoreCase)) { *pfResult = TRUE; ExitFunction(); @@ -978,12 +978,12 @@ static HRESULT CompareStringValues( case BURN_SYMBOL_TYPE_HIEQ: case BURN_SYMBOL_TYPE_HIEQ_I: // test if left string starts with right string - *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand, cchRight, wzRightOperand, cchRight); + *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand, cchRight, wzRightOperand, cchRight, fIgnoreCase); break; case BURN_SYMBOL_TYPE_LOEQ: case BURN_SYMBOL_TYPE_LOEQ_I: // test if left string ends with right string - *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand + (cchLeft - cchRight), cchRight, wzRightOperand, cchRight); + *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand + (cchLeft - cchRight), cchRight, wzRightOperand, cchRight, fIgnoreCase); break; default: 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( { pContainer = &pContainers->rgContainers[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pContainer->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pContainer->sczId, -1, wzId, -1, FALSE)) { *ppContainer = pContainer; 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( hr = XmlGetAttributeEx(pixnExePackage, L"DetectionType", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @DetectionType."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"condition", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"condition", -1, FALSE)) { pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_CONDITION; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"arp", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"arp", -1, FALSE)) { pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_ARP; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"none", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"none", -1, FALSE)) { pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_NONE; } @@ -114,15 +114,15 @@ extern "C" HRESULT ExeEngineParsePackageFromXml( if (fFoundXml) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"burn", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"burn", -1, FALSE)) { pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_BURN; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"netfx4", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"netfx4", -1, FALSE)) { pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NETFX4; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"none", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"none", -1, FALSE)) { pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NONE; } 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( hr = ::StringCchLengthW(sczSessionId, STRSAFE_MAX_CCH, reinterpret_cast(&cchSessionId)); ExitOnFailure(hr, "Failed to get length of session id string."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, sczTempFolder + cchTempFolder - cchSessionId, static_cast(cchSessionId), sczSessionId, static_cast(cchSessionId))) + if (CSTR_EQUAL == ::CompareStringOrdinal(sczTempFolder + cchTempFolder - cchSessionId, static_cast(cchSessionId), sczSessionId, static_cast(cchSessionId), FALSE)) { cchTempFolder -= cchSessionId; } 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( hr = XmlGetYesNoAttribute(pixeBundle, L"Win64", &fWin64); ExitOnRequiredXmlQueryFailure(hr, "Failed to get BurnManifest/@Win64 attribute."); - Assert(CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczEngineVersion, -1, wzVerMajorMinorBuild, -1)); + Assert(CSTR_EQUAL == ::CompareStringOrdinal(sczEngineVersion, -1, wzVerMajorMinorBuild, -1, FALSE)); Assert(BURN_PROTOCOL_VERSION == dwProtocolVersion); 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( { pTargetProduct = pPackage->Msp.rgTargetProducts + j; if (pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) && - CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1)) + CSTR_EQUAL == ::CompareStringOrdinal(pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1, FALSE)) { break; } @@ -1069,7 +1069,7 @@ static HRESULT DeterminePatchChainedTarget( { BURN_PACKAGE* pPackage = pPackages->rgPackages + iPackage; - if (BURN_PACKAGE_TYPE_MSI == pPackage->type && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzTargetProductCode, -1, pPackage->Msi.sczProductCode, -1)) + if (BURN_PACKAGE_TYPE_MSI == pPackage->type && CSTR_EQUAL == ::CompareStringOrdinal(wzTargetProductCode, -1, pPackage->Msi.sczProductCode, -1, FALSE)) { pTargetProduct->pChainedTargetPackage = pPackage; @@ -1123,7 +1123,7 @@ static HRESULT PlanTargetProduct( if (BURN_EXECUTE_ACTION_TYPE_MSP_TARGET == pAction->type && pAction->mspTarget.action == actionState && pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) && - CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1)) + CSTR_EQUAL == ::CompareStringOrdinal(pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1, FALSE)) { dwInsertSequence = i; 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( if (fFoundXml) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"remove", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"remove", -1, FALSE)) { pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"keep", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"keep", -1, FALSE)) { pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"force", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"force", -1, FALSE)) { pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE; } @@ -210,28 +210,28 @@ extern "C" HRESULT PackagesParseFromXml( } // read type specific attributes - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"BundlePackage", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"BundlePackage", -1, FALSE)) { pPackage->type = BURN_PACKAGE_TYPE_BUNDLE; hr = BundlePackageEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization ExitOnFailure(hr, "Failed to parse BUNDLE package."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"ExePackage", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"ExePackage", -1, FALSE)) { pPackage->type = BURN_PACKAGE_TYPE_EXE; hr = ExeEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization ExitOnFailure(hr, "Failed to parse EXE package."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiPackage", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiPackage", -1, FALSE)) { pPackage->type = BURN_PACKAGE_TYPE_MSI; hr = MsiEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization ExitOnFailure(hr, "Failed to parse MSI package."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MspPackage", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MspPackage", -1, FALSE)) { pPackage->type = BURN_PACKAGE_TYPE_MSP; @@ -240,7 +240,7 @@ extern "C" HRESULT PackagesParseFromXml( ++cMspPackages; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsuPackage", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsuPackage", -1, FALSE)) { pPackage->type = BURN_PACKAGE_TYPE_MSU; @@ -315,7 +315,7 @@ extern "C" HRESULT PackagesParseFromXml( { for (DWORD k = 0; k < pMsiPackage->Msi.cSlipstreamMspPackages; ++k) { - if (pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k] && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k], -1)) + if (pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k] && CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k], -1, FALSE)) { BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pMsiPackage->Msi.rgSlipstreamMsps + k; pSlipstreamMsp->pMspPackage = pPackage; @@ -486,7 +486,7 @@ extern "C" HRESULT PackageFindById( { pPackage = &pPackages->rgPackages[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, wzId, -1, FALSE)) { *ppPackage = pPackage; ExitFunction1(hr = S_OK); @@ -508,7 +508,7 @@ extern "C" HRESULT PackageFindRelatedById( { HRESULT hr = S_OK; BURN_RELATED_BUNDLE* pRelatedBundle = NULL; - + hr = RelatedBundleFindById(pRelatedBundles, wzId, &pRelatedBundle); *ppPackage = FAILED(hr) ? NULL : &pRelatedBundle->package; @@ -551,7 +551,7 @@ extern "C" HRESULT PackageGetProperty( { const BURN_MSIPROPERTY* pProperty = &rgProperties[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pProperty->sczId, -1, wzProperty, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pProperty->sczId, -1, wzProperty, -1, FALSE)) { if (psczValue) { @@ -580,7 +580,7 @@ extern "C" HRESULT PackageFindRollbackBoundaryById( { pRollbackBoundary = &pPackages->rgRollbackBoundaries[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pRollbackBoundary->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pRollbackBoundary->sczId, -1, wzId, -1, FALSE)) { *ppRollbackBoundary = pRollbackBoundary; ExitFunction1(hr = S_OK); @@ -730,7 +730,7 @@ static HRESULT FindRollbackBoundaryById( { pRollbackBoundary = &pPackages->rgRollbackBoundaries[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pRollbackBoundary->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pRollbackBoundary->sczId, -1, wzId, -1, FALSE)) { *ppRollbackBoundary = pRollbackBoundary; 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( hr = XmlGetAttributeEx(pixnNode, L"Packaging", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Packaging."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"embedded", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"embedded", -1, FALSE)) { pPayload->packaging = BURN_PAYLOAD_PACKAGING_EMBEDDED; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"external", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"external", -1, FALSE)) { pPayload->packaging = BURN_PAYLOAD_PACKAGING_EXTERNAL; } 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( if (fFoundXml) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"button", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"button", -1, FALSE)) { pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE_BUTTON; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"yes", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"yes", -1, FALSE)) { pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"no", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"no", -1, FALSE)) { pRegistration->modify = BURN_REGISTRATION_MODIFY_ENABLED; } @@ -1512,7 +1512,7 @@ static HRESULT RemoveUpdateRegistration( hr = RegReadString(hkKey, L"PackageVersion", &sczPackageVersion); if (SUCCEEDED(hr)) { - if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, sczPackageVersion, -1, pRegistration->sczDisplayVersion, -1)) + if (CSTR_EQUAL != ::CompareStringOrdinal(sczPackageVersion, -1, pRegistration->sczDisplayVersion, -1, FALSE)) { fDeleteRegKey = FALSE; } 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( pRelatedBundle = pRelatedBundles->rgRelatedBundles + i; pPackage = &pRelatedBundle->package; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, wzId, -1, FALSE)) { *ppRelatedBundle = pRelatedBundle; 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( ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get @Condition."); // read type specific attributes - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"DirectorySearch", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"DirectorySearch", -1, FALSE)) { pSearch->Type = BURN_SEARCH_TYPE_DIRECTORY; @@ -118,11 +118,11 @@ extern "C" HRESULT SearchesParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) { pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_EXISTS; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"path", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"path", -1, FALSE)) { pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_PATH; } @@ -131,7 +131,7 @@ extern "C" HRESULT SearchesParseFromXml( ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"FileSearch", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"FileSearch", -1, FALSE)) { pSearch->Type = BURN_SEARCH_TYPE_FILE; @@ -147,15 +147,15 @@ extern "C" HRESULT SearchesParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) { pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_EXISTS; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) { pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_VERSION; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"path", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"path", -1, FALSE)) { pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_PATH; } @@ -164,7 +164,7 @@ extern "C" HRESULT SearchesParseFromXml( ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"RegistrySearch", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"RegistrySearch", -1, FALSE)) { pSearch->Type = BURN_SEARCH_TYPE_REGISTRY; @@ -172,19 +172,19 @@ extern "C" HRESULT SearchesParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"Root", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Root."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKCR", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKCR", -1, FALSE)) { pSearch->RegistrySearch.hRoot = HKEY_CLASSES_ROOT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKCU", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKCU", -1, FALSE)) { pSearch->RegistrySearch.hRoot = HKEY_CURRENT_USER; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKLM", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKLM", -1, FALSE)) { pSearch->RegistrySearch.hRoot = HKEY_LOCAL_MACHINE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKU", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKU", -1, FALSE)) { pSearch->RegistrySearch.hRoot = HKEY_USERS; } @@ -208,11 +208,11 @@ extern "C" HRESULT SearchesParseFromXml( hr = XmlGetYesNoAttribute(pixnNode, L"Win64", &pSearch->RegistrySearch.fWin64); ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get Win64 attribute."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) { pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_EXISTS; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"value", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"value", -1, FALSE)) { pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_VALUE; @@ -224,19 +224,19 @@ extern "C" HRESULT SearchesParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"VariableType", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @VariableType."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE)) { pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_FORMATTED; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE)) { pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_NUMERIC; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE)) { pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_STRING; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) { pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_VERSION; } @@ -250,7 +250,7 @@ extern "C" HRESULT SearchesParseFromXml( ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiComponentSearch", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiComponentSearch", -1, FALSE)) { pSearch->Type = BURN_SEARCH_TYPE_MSI_COMPONENT; @@ -266,15 +266,15 @@ extern "C" HRESULT SearchesParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"keyPath", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"keyPath", -1, FALSE)) { pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_KEYPATH; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"state", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"state", -1, FALSE)) { pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_STATE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"directory", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"directory", -1, FALSE)) { pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_DIRECTORY; } @@ -283,7 +283,7 @@ extern "C" HRESULT SearchesParseFromXml( ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiProductSearch", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiProductSearch", -1, FALSE)) { pSearch->Type = BURN_SEARCH_TYPE_MSI_PRODUCT; pSearch->MsiProductSearch.GuidType = BURN_MSI_PRODUCT_SEARCH_GUID_TYPE_NONE; @@ -318,19 +318,19 @@ extern "C" HRESULT SearchesParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) { pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_VERSION; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"language", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"language", -1, FALSE)) { pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_LANGUAGE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"state", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"state", -1, FALSE)) { pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_STATE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"assignment", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"assignment", -1, FALSE)) { pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_ASSIGNMENT; } @@ -339,7 +339,7 @@ extern "C" HRESULT SearchesParseFromXml( ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"ExtensionSearch", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"ExtensionSearch", -1, FALSE)) { pSearch->Type = BURN_SEARCH_TYPE_EXTENSION; @@ -350,7 +350,7 @@ extern "C" HRESULT SearchesParseFromXml( hr = BurnExtensionFindById(pBurnExtensions, scz, &pSearch->ExtensionSearch.pExtension); ExitOnRootFailure(hr, "Failed to find extension '%ls' for search '%ls'", scz, pSearch->sczKey); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"SetVariable", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"SetVariable", -1, FALSE)) { pSearch->Type = BURN_SEARCH_TYPE_SET_VARIABLE; @@ -367,19 +367,19 @@ extern "C" HRESULT SearchesParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE)) { pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_FORMATTED; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE)) { pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_NUMERIC; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE)) { pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_STRING; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) { pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_VERSION; } 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( hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE)) { if (!fHidden) { @@ -405,7 +405,7 @@ extern "C" HRESULT VariablesParseFromXml( } valueType = BURN_VARIANT_TYPE_FORMATTED; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE)) { if (!fHidden) { @@ -413,7 +413,7 @@ extern "C" HRESULT VariablesParseFromXml( } valueType = BURN_VARIANT_TYPE_NUMERIC; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE)) { if (!fHidden) { @@ -421,7 +421,7 @@ extern "C" HRESULT VariablesParseFromXml( } valueType = BURN_VARIANT_TYPE_STRING; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) { if (!fHidden) { @@ -1556,7 +1556,7 @@ static HRESULT FindVariableIndexByName( DWORD iPosition = cRangeLength / 2; BURN_VARIABLE* pVariable = &pVariables->rgVariables[iRangeFirst + iPosition]; - switch (::CompareStringW(LOCALE_INVARIANT, SORT_STRINGSORT, wzVariable, -1, pVariable->sczName, -1)) + switch (::CompareStringOrdinal(wzVariable, -1, pVariable->sczName, -1, FALSE)) { case CSTR_LESS_THAN: // restrict range to elements before the current @@ -1591,7 +1591,7 @@ static HRESULT InsertUserVariable( { HRESULT hr = S_OK; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, wzVariable, 3, L"Wix", 3)) + if (CSTR_EQUAL == ::CompareStringOrdinal(wzVariable, 3, L"Wix", 3, FALSE)) { ExitWithRootFailure(hr, E_INVALIDARG, "Attempted to insert variable with reserved prefix: %ls", wzVariable); } 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 { // After restart we need to finish the dependency registration for our package so allow the package // to go present. - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, m_sczAfterForcedRestartPackage, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(wzPackageId, -1, m_sczAfterForcedRestartPackage, -1, FALSE)) { // Do not allow a repair because that could put us in a perpetual restart loop. if (BOOTSTRAPPER_REQUEST_STATE_REPAIR == *pRequestState) @@ -3570,7 +3570,7 @@ private: for (DWORD iAssignControl = 0; iAssignControl < countof(m_rgInitControls); ++iAssignControl) { THEME_ASSIGN_CONTROL_ID* pAssignControl = m_rgInitControls + iAssignControl; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, pAssignControl->wzName, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pArgs->pThemeControl->sczName, -1, pAssignControl->wzName, -1, FALSE)) { if (!pAssignControl->ppControl) { 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( { if (WcaIsInstalling(psf->isInstalled, psf->isAction)) { - if (!wzPreviousFilterRoot || CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, wzPreviousFilterRoot, -1, psf->wzFilterRoot, -1)) + if (!wzPreviousFilterRoot || CSTR_EQUAL != ::CompareStringOrdinal(wzPreviousFilterRoot, -1, psf->wzFilterRoot, -1, FALSE)) { if (pwzLoadOrder) { @@ -234,7 +234,7 @@ HRESULT ScaFiltersUninstall( { if (WcaIsUninstalling(psf->isInstalled, psf->isAction)) { - if (!wzPreviousFilterRoot || CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, wzPreviousFilterRoot, -1, psf->wzFilterRoot, -1)) + if (!wzPreviousFilterRoot || CSTR_EQUAL != ::CompareStringOrdinal(wzPreviousFilterRoot, -1, psf->wzFilterRoot, -1, FALSE)) { if (pwzLoadOrder) { 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( BextExitOnFailure(hr, "Failed to get @Id."); // Read type specific attributes. - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"NetFxNetCoreSearch", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"NetFxNetCoreSearch", -1, FALSE)) { pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SEARCH; @@ -63,7 +63,7 @@ STDMETHODIMP NetfxSearchParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"MajorVersion", &netCoreSearch.sczMajorVersion); BextExitOnFailure(hr, "Failed to get @MajorVersion."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"NetFxNetCoreSdkSearch", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"NetFxNetCoreSdkSearch", -1, FALSE)) { pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SDK_SEARCH; @@ -76,7 +76,7 @@ STDMETHODIMP NetfxSearchParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"MajorVersion", &netCoreSdkSearch.sczMajorVersion); BextExitOnFailure(hr, "Failed to get @MajorVersion."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"NetFxNetCoreSdkFeatureBandSearch", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"NetFxNetCoreSdkFeatureBandSearch", -1, FALSE)) { pSearch->Type = NETFX_SEARCH_TYPE_NET_CORE_SDK_FEATURE_BAND_SEARCH; @@ -176,7 +176,7 @@ STDMETHODIMP NetfxSearchFindById( { NETFX_SEARCH* pSearch = &pSearches->rgSearches[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pSearch->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pSearch->sczId, -1, wzId, -1, FALSE)) { *ppSearch = pSearch; 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( BextExitOnFailure(hr, "Failed to get @Id."); // Read type specific attributes. - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"WixWindowsFeatureSearch", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"WixWindowsFeatureSearch", -1, FALSE)) { pSearch->Type = UTIL_SEARCH_TYPE_WINDOWS_FEATURE_SEARCH; @@ -55,7 +55,7 @@ STDMETHODIMP UtilSearchParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); BextExitOnFailure(hr, "Failed to get @Type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"sha2CodeSigning", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"sha2CodeSigning", -1, FALSE)) { pSearch->WindowsFeatureSearch.type = UTIL_WINDOWS_FEATURE_SEARCH_TYPE_SHA2_CODE_SIGNING; } @@ -144,7 +144,7 @@ STDMETHODIMP UtilSearchFindById( { UTIL_SEARCH* pSearch = &pSearches->rgSearches[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pSearch->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pSearch->sczId, -1, wzId, -1, FALSE)) { *ppSearch = pSearch; 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( // First search the ATOM feed's custom elements to try and find the default application identity. for (ATOM_UNKNOWN_ELEMENT* pElement = pFeed->pUnknownElements; pElement; pElement = pElement->pNext) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE)) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"application", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"application", -1, FALSE)) { hr = StrAllocString(&pChain->wzDefaultApplicationId, pElement->wzValue, 0); ApupExitOnFailure(hr, "Failed to allocate default application id."); for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"type", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"type", -1, FALSE)) { hr = StrAllocString(&pChain->wzDefaultApplicationType, pAttribute->wzValue, 0); ApupExitOnFailure(hr, "Failed to allocate default application type."); @@ -213,44 +213,44 @@ static HRESULT ProcessEntry( // First search the ATOM entry's custom elements to try and find the application update information. for (ATOM_UNKNOWN_ELEMENT* pElement = pAtomEntry->pUnknownElements; pElement; pElement = pElement->pNext) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE)) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"application", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"application", -1, FALSE)) { hr = StrAllocString(&pApupEntry->wzApplicationId, pElement->wzValue, 0); ApupExitOnFailure(hr, "Failed to allocate application identity."); for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"type", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"type", -1, FALSE)) { hr = StrAllocString(&pApupEntry->wzApplicationType, pAttribute->wzValue, 0); ApupExitOnFailure(hr, "Failed to allocate application type."); } } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"upgrade", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"upgrade", -1, FALSE)) { hr = StrAllocString(&pApupEntry->wzUpgradeId, pElement->wzValue, 0); ApupExitOnFailure(hr, "Failed to allocate upgrade id."); for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"version", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"version", -1, FALSE)) { hr = VerParseVersion(pAttribute->wzValue, 0, FALSE, &pApupEntry->pUpgradeVersion); ApupExitOnFailure(hr, "Failed to parse upgrade version string '%ls' from ATOM entry.", pAttribute->wzValue); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"exclusive", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"exclusive", -1, FALSE)) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzValue, -1, L"true", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzValue, -1, L"true", -1, FALSE)) { pApupEntry->fUpgradeExclusive = TRUE; } } } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"version", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"version", -1, FALSE)) { hr = VerParseVersion(pElement->wzValue, 0, FALSE, &pApupEntry->pVersion); ApupExitOnFailure(hr, "Failed to parse version string '%ls' from ATOM entry.", pElement->wzValue); @@ -309,7 +309,7 @@ static HRESULT ProcessEntry( for (DWORD i = 0; i < pAtomEntry->cLinks; ++i) { ATOM_LINK* pLink = pAtomEntry->rgLinks + i; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pLink->wzRel, -1, L"enclosure", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pLink->wzRel, -1, L"enclosure", -1, FALSE)) { hr = ParseEnclosure(pLink, pApupEntry->rgEnclosures + pApupEntry->cEnclosures); ApupExitOnFailure(hr, "Failed to parse enclosure."); @@ -344,15 +344,15 @@ static HRESULT ParseEnclosure( // First search the ATOM link's custom elements to try and find the application update enclosure information. for (ATOM_UNKNOWN_ELEMENT* pElement = pLink->pUnknownElements; pElement; pElement = pElement->pNext) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE)) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"digest", -1, pElement->wzElement, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(L"digest", -1, pElement->wzElement, -1, FALSE)) { // Find the digest[@algorithm] which is required. Everything else is ignored. for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) { dwDigestLength = 0; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"algorithm", -1, pAttribute->wzAttribute, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(L"algorithm", -1, pAttribute->wzAttribute, -1, FALSE)) { if (CSTR_EQUAL == ::CompareStringOrdinal(L"md5", -1, pAttribute->wzValue, -1, TRUE)) { @@ -406,7 +406,7 @@ static HRESULT ParseEnclosure( break; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"name", -1, pElement->wzElement, -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(L"name", -1, pElement->wzElement, -1, FALSE)) { hr = StrAllocString(&pEnclosure->wzLocalName, pElement->wzValue, 0); 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( while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName))) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"generator", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"generator", -1, FALSE)) { hr = AssignString(&pNewFeed->wzGenerator, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM feed generator."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"icon", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"icon", -1, FALSE)) { hr = AssignString(&pNewFeed->wzIcon, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM feed icon."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"id", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"id", -1, FALSE)) { hr = AssignString(&pNewFeed->wzId, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM feed id."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"logo", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"logo", -1, FALSE)) { hr = AssignString(&pNewFeed->wzLogo, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM feed logo."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"subtitle", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"subtitle", -1, FALSE)) { hr = AssignString(&pNewFeed->wzSubtitle, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM feed subtitle."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"title", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"title", -1, FALSE)) { hr = AssignString(&pNewFeed->wzTitle, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM feed title."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"updated", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"updated", -1, FALSE)) { hr = AssignDateTime(&pNewFeed->ftUpdated, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM feed updated."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"author", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"author", -1, FALSE)) { hr = ParseAtomAuthor(pNode, &pNewFeed->rgAuthors[cAuthors]); AtomExitOnFailure(hr, "Failed to parse ATOM author."); ++cAuthors; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"category", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"category", -1, FALSE)) { hr = ParseAtomCategory(pNode, &pNewFeed->rgCategories[cCategories]); AtomExitOnFailure(hr, "Failed to parse ATOM category."); ++cCategories; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"entry", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"entry", -1, FALSE)) { hr = ParseAtomEntry(pNode, &pNewFeed->rgEntries[cEntries]); AtomExitOnFailure(hr, "Failed to parse ATOM entry."); ++cEntries; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"link", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"link", -1, FALSE)) { hr = ParseAtomLink(pNode, &pNewFeed->rgLinks[cLinks]); AtomExitOnFailure(hr, "Failed to parse ATOM link."); @@ -516,17 +516,17 @@ static HRESULT ParseAtomAuthor( while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName))) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"name", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"name", -1, FALSE)) { hr = AssignString(&pAuthor->wzName, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM author name."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"email", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"email", -1, FALSE)) { hr = AssignString(&pAuthor->wzEmail, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM author email."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"uri", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"uri", -1, FALSE)) { hr = AssignString(&pAuthor->wzUrl, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM author uri."); @@ -570,17 +570,17 @@ static HRESULT ParseAtomCategory( while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName))) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"label", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"label", -1, FALSE)) { hr = AssignString(&pCategory->wzLabel, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM category label."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"scheme", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"scheme", -1, FALSE)) { hr = AssignString(&pCategory->wzScheme, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM category scheme."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"term", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"term", -1, FALSE)) { hr = AssignString(&pCategory->wzTerm, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM category term."); @@ -639,12 +639,12 @@ static HRESULT ParseAtomContent( while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName))) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"type", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"type", -1, FALSE)) { hr = AssignString(&pContent->wzType, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM content type."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"url", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"url", -1, FALSE)) { hr = AssignString(&pContent->wzUrl, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM content scheme."); @@ -721,46 +721,46 @@ static HRESULT ParseAtomEntry( while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, &bstrNodeName))) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"id", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"id", -1, FALSE)) { hr = AssignString(&pEntry->wzId, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM entry id."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"summary", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"summary", -1, FALSE)) { hr = AssignString(&pEntry->wzSummary, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM entry summary."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"title", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"title", -1, FALSE)) { hr = AssignString(&pEntry->wzTitle, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM entry title."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"published", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"published", -1, FALSE)) { hr = AssignDateTime(&pEntry->ftPublished, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM entry published."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"updated", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"updated", -1, FALSE)) { hr = AssignDateTime(&pEntry->ftUpdated, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM entry updated."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"author", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"author", -1, FALSE)) { hr = ParseAtomAuthor(pNode, &pEntry->rgAuthors[cAuthors]); AtomExitOnFailure(hr, "Failed to parse ATOM entry author."); ++cAuthors; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"category", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"category", -1, FALSE)) { hr = ParseAtomCategory(pNode, &pEntry->rgCategories[cCategories]); AtomExitOnFailure(hr, "Failed to parse ATOM entry category."); ++cCategories; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"content", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"content", -1, FALSE)) { if (NULL != pEntry->pContent) { @@ -774,7 +774,7 @@ static HRESULT ParseAtomEntry( hr = ParseAtomContent(pNode, pEntry->pContent); AtomExitOnFailure(hr, "Failed to parse ATOM entry content."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"link", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"link", -1, FALSE)) { hr = ParseAtomLink(pNode, &pEntry->rgLinks[cLinks]); AtomExitOnFailure(hr, "Failed to parse ATOM entry link."); @@ -842,17 +842,17 @@ static HRESULT ParseAtomLink( while (S_OK == (hr = XmlNextAttribute(pixnnmAttributes, &pNode, &bstrNodeName))) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"rel", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"rel", -1, FALSE)) { hr = AssignString(&pLink->wzRel, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM link rel."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"href", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"href", -1, FALSE)) { hr = AssignString(&pLink->wzUrl, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM link href."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"length", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"length", -1, FALSE)) { hr = XmlGetAttributeUInt64(pixnLink, bstrNodeName, &pLink->dw64Length); if (E_INVALIDARG == hr) @@ -861,12 +861,12 @@ static HRESULT ParseAtomLink( } AtomExitOnFailure(hr, "Failed to parse ATOM link length."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"title", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"title", -1, FALSE)) { hr = AssignString(&pLink->wzTitle, pNode); AtomExitOnFailure(hr, "Failed to allocate ATOM link title."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"type", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"type", -1, FALSE)) { hr = AssignString(&pLink->wzType, pNode); 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( ) { LPCWSTR wzMatchString = GetKey(psd, TranslateOffsetToValue(psd, psd->ppvBuckets[dwMatchIndex])); - DWORD dwFlags = 0; + BOOL fIgnoreCase = (DICT_FLAG_CASEINSENSITIVE & psd->dfFlags) ? TRUE : FALSE; - if (DICT_FLAG_CASEINSENSITIVE & psd->dfFlags) - { - dwFlags |= NORM_IGNORECASE; - } - - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwFlags, wzOriginalString, -1, wzMatchString, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(wzOriginalString, -1, wzMatchString, -1, fIgnoreCase)) { return TRUE; } @@ -605,7 +600,7 @@ static HRESULT GetInsertIndex( // If we wrapped all the way back around to our original index, the dict is full - throw an error if (dwIndexCandidate == dwOriginalIndexCandidate) { - // The dict table is full - this error seems to be a reasonably close match + // The dict table is full - this error seems to be a reasonably close match hr = HRESULT_FROM_WIN32(ERROR_DATABASE_FULL); DictExitOnRootFailure(hr, "Failed to add item '%ls' to dict table because dict table is full of items", pszString); } 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( for (DWORD i = 0; i < pi->cValues; ++i) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pi->rgivValues[i].wzName, -1, wzValueName, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pi->rgivValues[i].wzName, -1, wzValueName, -1, FALSE)) { pValue = pi->rgivValues + i; break; @@ -483,7 +483,7 @@ extern "C" HRESULT DAPI IniSetValue( for (DWORD i = 0; i < pi->cValues; ++i) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pi->rgivValues[i].wzName, -1, wzValueName, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pi->rgivValues[i].wzName, -1, wzValueName, -1, FALSE)) { pValue = pi->rgivValues + i; break; @@ -507,7 +507,7 @@ extern "C" HRESULT DAPI IniSetValue( { if (pValue) { - if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, pValue->wzValue, -1, wzValue, -1)) + if (CSTR_EQUAL != ::CompareStringOrdinal(pValue->wzValue, -1, wzValue, -1, FALSE)) { pi->fModified = TRUE; hr = StrAllocString(const_cast(&pValue->wzValue), wzValue, 0); @@ -660,7 +660,7 @@ extern "C" HRESULT DAPI IniWriteFile( IniExitOnFailure(hr, "Failed to get section prefix from name: %ls", pi->rgivValues[i].wzName); // If the new section prefix is different, write a section out for it - if (fSections && sczNewSectionPrefix && (NULL == sczCurrentSectionPrefix || CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, sczNewSectionPrefix, -1, sczCurrentSectionPrefix, -1))) + if (fSections && sczNewSectionPrefix && (NULL == sczCurrentSectionPrefix || CSTR_EQUAL != ::CompareStringOrdinal(sczNewSectionPrefix, -1, sczCurrentSectionPrefix, -1, FALSE))) { hr = StrAllocConcat(&sczContents, pi->sczOpenTagPrefix, 0); IniExitOnFailure(hr, "Failed to concat open tag prefix to string"); @@ -674,7 +674,7 @@ extern "C" HRESULT DAPI IniWriteFile( hr = StrAllocConcat(&sczContents, L"\r\n", 2); IniExitOnFailure(hr, "Failed to add endline to ini output buffer in-memory"); - + ReleaseNullStr(sczCurrentSectionPrefix); sczCurrentSectionPrefix = sczNewSectionPrefix; 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( { pLocControl = &pWixLoc->rgLocControls[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pLocControl->wzControl, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pLocControl->wzControl, -1, wzId, -1, FALSE)) { *ppLocControl = pLocControl; ExitFunction1(hr = S_OK); @@ -341,7 +341,7 @@ extern "C" HRESULT DAPI LocGetString( { pLocString = pWixLoc->rgLocStrings + i; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pLocString->wzId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pLocString->wzId, -1, wzId, -1, FALSE)) { *ppLocString = pLocString; hr = S_OK; @@ -555,7 +555,7 @@ static HRESULT ParseWxlString( if (S_OK == hr) { - pLocString->bOverridable = CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrText, -1, L"yes", -1); + pLocString->bOverridable = CSTR_EQUAL == ::CompareStringOrdinal(bstrText, -1, L"yes", -1, FALSE); } 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( switch (pWaiterContext->rgRequests[i].type) { case MON_DIRECTORY: - 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) + 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) { *pdwIndex = i; ExitFunction1(hr = S_OK); } break; case MON_REGKEY: - if (reinterpret_cast(pMessage->regkey.hkRoot) == reinterpret_cast(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) + if (reinterpret_cast(pMessage->regkey.hkRoot) == reinterpret_cast(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) { *pdwIndex = i; 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( LPWSTR sczDirectory = NULL; SCE_DATABASE *pNewSceDatabase = NULL; SCE_DATABASE_INTERNAL *pNewSceDatabaseInternal = NULL; - IDBDataSourceAdmin *pIDBDataSourceAdmin = NULL; + IDBDataSourceAdmin *pIDBDataSourceAdmin = NULL; DBPROPSET rgdbpDataSourcePropSet[2] = { }; DBPROP rgdbpDataSourceProp[2] = { }; DBPROP rgdbpDataSourceSsceProp[1] = { }; @@ -239,7 +239,7 @@ extern "C" HRESULT DAPI SceCreateDatabase( hr = CreateSqlCe(wzSqlCeDllPath, &pNewSceDatabaseInternal->pIDBInitialize, &pNewSceDatabaseInternal->hSqlCeDll); ExitOnFailure(hr, "Failed to get IDBInitialize interface"); - + hr = pNewSceDatabaseInternal->pIDBInitialize->QueryInterface(IID_IDBDataSourceAdmin, reinterpret_cast(&pIDBDataSourceAdmin)); ExitOnFailure(hr, "Failed to get IDBDataSourceAdmin interface"); @@ -259,7 +259,7 @@ extern "C" HRESULT DAPI SceCreateDatabase( rgdbpDataSourceProp[1].vValue.vt = VT_I4; rgdbpDataSourceProp[1].vValue.lVal = DB_MODE_SHARE_DENY_NONE; - // SQL CE doesn't seem to allow us to specify DBPROP_INIT_PROMPT if we include any properties from DBPROPSET_SSCE_DBINIT + // SQL CE doesn't seem to allow us to specify DBPROP_INIT_PROMPT if we include any properties from DBPROPSET_SSCE_DBINIT rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_DBINIT; rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp; rgdbpDataSourcePropSet[0].cProperties = _countof(rgdbpDataSourceProp); @@ -336,7 +336,7 @@ extern "C" HRESULT DAPI SceOpenDatabase( hr = CreateSqlCe(wzSqlCeDllPath, &pNewSceDatabaseInternal->pIDBInitialize, &pNewSceDatabaseInternal->hSqlCeDll); ExitOnFailure(hr, "Failed to get IDBInitialize interface"); - + hr = pNewSceDatabaseInternal->pIDBInitialize->QueryInterface(IID_IDBProperties, reinterpret_cast(&pNewSceDatabaseInternal->pIDBProperties)); ExitOnFailure(hr, "Failed to get IDBProperties interface"); @@ -369,7 +369,7 @@ extern "C" HRESULT DAPI SceOpenDatabase( rgdbpDataSourceProp[1].vValue.vt = VT_I4; rgdbpDataSourceProp[1].vValue.lVal = DB_MODE_SHARE_DENY_NONE; - // SQL CE doesn't seem to allow us to specify DBPROP_INIT_PROMPT if we include any properties from DBPROPSET_SSCE_DBINIT + // SQL CE doesn't seem to allow us to specify DBPROP_INIT_PROMPT if we include any properties from DBPROPSET_SSCE_DBINIT rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_DBINIT; rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp; rgdbpDataSourcePropSet[0].cProperties = _countof(rgdbpDataSourceProp); @@ -407,7 +407,7 @@ extern "C" HRESULT DAPI SceOpenDatabase( hr = GetDatabaseSchemaInfo(pNewSceDatabase, &sczSchemaType, &dwVersionFound); ExitOnFailure(hr, "Failed to find schema version of database"); - if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, sczSchemaType, -1, wzExpectedSchemaType, -1)) + if (CSTR_EQUAL != ::CompareStringOrdinal(sczSchemaType, -1, wzExpectedSchemaType, -1, FALSE)) { hr = HRESULT_FROM_WIN32(ERROR_BAD_FILE_TYPE); ExitOnRootFailure(hr, "Tried to open wrong database type - expected type %ls, found type %ls", wzExpectedSchemaType, sczSchemaType); @@ -2306,8 +2306,8 @@ static HRESULT SetSessionProperties( rgdbpDataSourceProp[0].dwPropertyID = DBPROP_SSCE_TRANSACTION_COMMIT_MODE; rgdbpDataSourceProp[0].dwOptions = DBPROPOPTIONS_REQUIRED; rgdbpDataSourceProp[0].vValue.vt = VT_I4; - rgdbpDataSourceProp[0].vValue.lVal = DBPROPVAL_SSCE_TCM_FLUSH; - + rgdbpDataSourceProp[0].vValue.lVal = DBPROPVAL_SSCE_TCM_FLUSH; + rgdbpDataSourcePropSet[0].guidPropertySet = DBPROPSET_SSCE_SESSION; rgdbpDataSourcePropSet[0].rgProperties = rgdbpDataSourceProp; 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( for (DWORD j = 0; j < pTheme->cPages; ++j) { LPCWSTR wzPageName = pTheme->rgPages[j].sczName; - if (wzPageName && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPageName, -1, wzFindName, -1)) + if (wzPageName && CSTR_EQUAL == ::CompareStringOrdinal(wzPageName, -1, wzFindName, -1, FALSE)) { rgdwPageIds[i] = j + 1; // add one to make the page ids 1-based (so zero is invalid). break; @@ -2082,7 +2082,7 @@ static HRESULT ParseButtonImages( ThmExitOnFailure(hr, "Null element encountered!"); } - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ButtonFocusImage", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ButtonFocusImage", -1, FALSE)) { if (pFocusImageRef) { @@ -2091,7 +2091,7 @@ static HRESULT ParseButtonImages( pImageRef = pFocusImageRef = pControl->Button.rgImageRef + 3; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ButtonHoverImage", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ButtonHoverImage", -1, FALSE)) { if (pHoverImageRef) { @@ -2100,7 +2100,7 @@ static HRESULT ParseButtonImages( pImageRef = pHoverImageRef = pControl->Button.rgImageRef + 1; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ButtonSelectedImage", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ButtonSelectedImage", -1, FALSE)) { if (pSelectedImageRef) { @@ -2776,35 +2776,35 @@ static HRESULT GetFontColor( if (pdwSystemColor) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"btnface", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"btnface", -1, FALSE)) { *pdwSystemColor = COLOR_BTNFACE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"btntext", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"btntext", -1, FALSE)) { *pdwSystemColor = COLOR_BTNTEXT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"graytext", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"graytext", -1, FALSE)) { *pdwSystemColor = COLOR_GRAYTEXT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"highlight", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"highlight", -1, FALSE)) { *pdwSystemColor = COLOR_HIGHLIGHT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"highlighttext", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"highlighttext", -1, FALSE)) { *pdwSystemColor = COLOR_HIGHLIGHTTEXT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"hotlight", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"hotlight", -1, FALSE)) { *pdwSystemColor = COLOR_HOTLIGHT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"window", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"window", -1, FALSE)) { *pdwSystemColor = COLOR_WINDOW; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstr, -1, L"windowtext", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstr, -1, L"windowtext", -1, FALSE)) { *pdwSystemColor = COLOR_WINDOWTEXT; } @@ -3229,71 +3229,71 @@ static HRESULT ParseControls( ThmExitOnFailure(hr, "Null element encountered!"); } - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Billboard", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Billboard", -1, FALSE)) { type = THEME_CONTROL_TYPE_BILLBOARD; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Button", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Button", -1, FALSE)) { type = THEME_CONTROL_TYPE_BUTTON; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Checkbox", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Checkbox", -1, FALSE)) { type = THEME_CONTROL_TYPE_CHECKBOX; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Combobox", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Combobox", -1, FALSE)) { type = THEME_CONTROL_TYPE_COMBOBOX; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"CommandLink", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"CommandLink", -1, FALSE)) { type = THEME_CONTROL_TYPE_COMMANDLINK; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Editbox", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Editbox", -1, FALSE)) { type = THEME_CONTROL_TYPE_EDITBOX; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Hyperlink", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Hyperlink", -1, FALSE)) { type = THEME_CONTROL_TYPE_HYPERLINK; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Hypertext", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Hypertext", -1, FALSE)) { type = THEME_CONTROL_TYPE_HYPERTEXT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ImageControl", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ImageControl", -1, FALSE)) { type = THEME_CONTROL_TYPE_IMAGE; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Label", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Label", -1, FALSE)) { type = THEME_CONTROL_TYPE_LABEL; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ListView", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ListView", -1, FALSE)) { type = THEME_CONTROL_TYPE_LISTVIEW; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Panel", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Panel", -1, FALSE)) { type = THEME_CONTROL_TYPE_PANEL; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Progressbar", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Progressbar", -1, FALSE)) { type = THEME_CONTROL_TYPE_PROGRESSBAR; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Richedit", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Richedit", -1, FALSE)) { type = THEME_CONTROL_TYPE_RICHEDIT; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Static", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Static", -1, FALSE)) { type = THEME_CONTROL_TYPE_STATIC; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"Tabs", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"Tabs", -1, FALSE)) { type = THEME_CONTROL_TYPE_TAB; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"TreeView", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"TreeView", -1, FALSE)) { type = THEME_CONTROL_TYPE_TREEVIEW; } @@ -3705,14 +3705,14 @@ static HRESULT ParseActions( THEME_ACTION* pAction = pControl->rgActions + i; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"BrowseDirectoryAction", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"BrowseDirectoryAction", -1, FALSE)) { pAction->type = THEME_ACTION_TYPE_BROWSE_DIRECTORY; hr = XmlGetAttributeEx(pixnChild, L"VariableName", &pAction->BrowseDirectory.sczVariableName); ThmExitOnFailure(hr, "Failed when querying BrowseDirectoryAction/@VariableName attribute."); } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"ChangePageAction", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"ChangePageAction", -1, FALSE)) { pAction->type = THEME_ACTION_TYPE_CHANGE_PAGE; @@ -3725,7 +3725,7 @@ static HRESULT ParseActions( ThmExitOnFailure(hr, "Failed when querying ChangePageAction/@Cancel attribute."); } } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrType, -1, L"CloseWindowAction", -1)) + else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrType, -1, L"CloseWindowAction", -1, FALSE)) { pAction->type = THEME_ACTION_TYPE_CLOSE_WINDOW; } @@ -4367,7 +4367,7 @@ static HRESULT FindImageList( for (DWORD i = 0; i < pTheme->cImageLists; ++i) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pTheme->rgImageLists[i].sczName, -1, wzImageListName, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pTheme->rgImageLists[i].sczName, -1, wzImageListName, -1, FALSE)) { *phImageList = pTheme->rgImageLists[i].hImageList; ExitFunction1(hr = S_OK); @@ -5027,7 +5027,7 @@ static void OnBrowseDirectory( THEME_CONTROL* pControl = pTheme->rgControls + i; if ((!pControl->wPageId || pControl->wPageId == pTheme->dwCurrentPageId) && - CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pControl->sczName, -1, pAction->BrowseDirectory.sczVariableName, -1)) + CSTR_EQUAL == ::CompareStringOrdinal(pControl->sczName, -1, pAction->BrowseDirectory.sczVariableName, -1, FALSE)) { pTargetControl = pControl; break; @@ -5790,7 +5790,7 @@ static HRESULT ShowControl( hr = S_OK; - Button_SetCheck(hWnd, (!sczText && !pControl->sczValue) || (sczText && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczText, -1, pControl->sczValue, -1))); + Button_SetCheck(hWnd, (!sczText && !pControl->sczValue) || (sczText && CSTR_EQUAL == ::CompareStringOrdinal(sczText, -1, pControl->sczValue, -1, FALSE))); } } 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( { ::CoUninitialize(); } - } + } } extern "C" HRESULT DAPI XmlCreateElement( @@ -738,7 +738,7 @@ HRESULT DAPI XmlGetYesNoAttribute( { XmlExitOnFailure(hr, "Failed to get attribute."); - *pfYes = CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczValue, -1, L"yes", -1); + *pfYes = CSTR_EQUAL == ::CompareStringOrdinal(sczValue, -1, L"yes", -1, FALSE); } LExit: 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 __inout DWORD* /*pdwAutomaticBehaviorType*/ ) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzName, -1, L"InstallTestButton", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(wzName, -1, L"InstallTestButton", -1, FALSE)) { *pfProcessed = TRUE; *pwId = BAF_CONTROL_INSTALL_TEST_BUTTON; @@ -343,7 +343,7 @@ private: for (DWORD iAssignControl = 0; iAssignControl < countof(vrgInitControls); ++iAssignControl) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, vrgInitControls[iAssignControl].wzName, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pArgs->pThemeControl->sczName, -1, vrgInitControls[iAssignControl].wzName, -1, FALSE)) { fProcessed = TRUE; 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( 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. HTREEITEM hti = reinterpret_cast(::SendMessage(pTreeControl->hWnd, TVM_INSERTITEMW, 0, reinterpret_cast(&tvi))); - if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pPage->sczName, -1, wzSelectedPage, -1)) + if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringOrdinal(pPage->sczName, -1, wzSelectedPage, -1, FALSE)) { htiSelected = hti; } } } - if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Application", -1, wzSelectedPage, -1)) + if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringOrdinal(L"Application", -1, wzSelectedPage, -1, FALSE)) { htiSelected = tvi.hParent; } @@ -519,7 +519,7 @@ static BOOL OnThemeLoadingControl( __in THEME_LOADINGCONTROL_RESULTS* pResults ) { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, L"Tree", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pArgs->pThemeControl->sczName, -1, L"Tree", -1, FALSE)) { pResults->wId = THMVWR_CONTROL_TREE; } -- cgit v1.2.3-55-g6feb