diff options
| author | Rob Mensching <rob@firegiant.com> | 2025-11-01 21:52:31 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2025-11-03 14:49:39 -0800 |
| commit | d2ba0da55725f2908b67e1470afc7cfd71cb3d1f (patch) | |
| tree | c2a1db61c5fac031c698976106bba2c453d85ded /src/burn/engine | |
| parent | 4d626c294c4783d454e27ea4e5614037dac8576e (diff) | |
| download | wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.tar.gz wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.tar.bz2 wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.zip | |
Use CompareStringOrdinal() instead of CompareString() case-sensitive
This commit moves to the modern CompareStringOrdinal() for all case-sensitve
uses of CompareString() with the invariant locale.
Resolves 6947
Diffstat (limited to 'src/burn/engine')
| -rw-r--r-- | src/burn/engine/approvedexe.cpp | 2 | ||||
| -rw-r--r-- | src/burn/engine/bundlepackageengine.cpp | 8 | ||||
| -rw-r--r-- | src/burn/engine/burnextension.cpp | 2 | ||||
| -rw-r--r-- | src/burn/engine/burnpipe.cpp | 2 | ||||
| -rw-r--r-- | src/burn/engine/condition.cpp | 10 | ||||
| -rw-r--r-- | src/burn/engine/container.cpp | 2 | ||||
| -rw-r--r-- | src/burn/engine/exeengine.cpp | 12 | ||||
| -rw-r--r-- | src/burn/engine/logging.cpp | 2 | ||||
| -rw-r--r-- | src/burn/engine/manifest.cpp | 2 | ||||
| -rw-r--r-- | src/burn/engine/mspengine.cpp | 6 | ||||
| -rw-r--r-- | src/burn/engine/package.cpp | 28 | ||||
| -rw-r--r-- | src/burn/engine/payload.cpp | 4 | ||||
| -rw-r--r-- | src/burn/engine/registration.cpp | 8 | ||||
| -rw-r--r-- | src/burn/engine/relatedbundle.cpp | 2 | ||||
| -rw-r--r-- | src/burn/engine/search.cpp | 66 | ||||
| -rw-r--r-- | src/burn/engine/variable.cpp | 12 |
16 files changed, 84 insertions, 84 deletions
diff --git a/src/burn/engine/approvedexe.cpp b/src/burn/engine/approvedexe.cpp index 383ee7fa..27ec2adc 100644 --- a/src/burn/engine/approvedexe.cpp +++ b/src/burn/engine/approvedexe.cpp | |||
| @@ -129,7 +129,7 @@ extern "C" HRESULT ApprovedExesFindById( | |||
| 129 | { | 129 | { |
| 130 | pApprovedExe = &pApprovedExes->rgApprovedExes[i]; | 130 | pApprovedExe = &pApprovedExes->rgApprovedExes[i]; |
| 131 | 131 | ||
| 132 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pApprovedExe->sczId, -1, wzId, -1)) | 132 | if (CSTR_EQUAL == ::CompareStringOrdinal(pApprovedExe->sczId, -1, wzId, -1, FALSE)) |
| 133 | { | 133 | { |
| 134 | *ppApprovedExe = pApprovedExe; | 134 | *ppApprovedExe = pApprovedExe; |
| 135 | ExitFunction1(hr = S_OK); | 135 | ExitFunction1(hr = S_OK); |
diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp index 1a8ba982..7ada5f6a 100644 --- a/src/burn/engine/bundlepackageengine.cpp +++ b/src/burn/engine/bundlepackageengine.cpp | |||
| @@ -146,7 +146,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( | |||
| 146 | hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode); | 146 | hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode); |
| 147 | ExitOnFailure(hr, "Failed to get @Code."); | 147 | ExitOnFailure(hr, "Failed to get @Code."); |
| 148 | 148 | ||
| 149 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Detect", -1)) | 149 | if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Detect", -1, FALSE)) |
| 150 | { | 150 | { |
| 151 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5); | 151 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5); |
| 152 | ExitOnFailure(hr, "Failed to resize Detect code array"); | 152 | ExitOnFailure(hr, "Failed to resize Detect code array"); |
| @@ -155,7 +155,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( | |||
| 155 | sczCode = NULL; | 155 | sczCode = NULL; |
| 156 | *pcDetectCodes += 1; | 156 | *pcDetectCodes += 1; |
| 157 | } | 157 | } |
| 158 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Upgrade", -1)) | 158 | else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Upgrade", -1, FALSE)) |
| 159 | { | 159 | { |
| 160 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5); | 160 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5); |
| 161 | ExitOnFailure(hr, "Failed to resize Upgrade code array"); | 161 | ExitOnFailure(hr, "Failed to resize Upgrade code array"); |
| @@ -164,7 +164,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( | |||
| 164 | sczCode = NULL; | 164 | sczCode = NULL; |
| 165 | *pcUpgradeCodes += 1; | 165 | *pcUpgradeCodes += 1; |
| 166 | } | 166 | } |
| 167 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Addon", -1)) | 167 | else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Addon", -1, FALSE)) |
| 168 | { | 168 | { |
| 169 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5); | 169 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5); |
| 170 | ExitOnFailure(hr, "Failed to resize Addon code array"); | 170 | ExitOnFailure(hr, "Failed to resize Addon code array"); |
| @@ -173,7 +173,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( | |||
| 173 | sczCode = NULL; | 173 | sczCode = NULL; |
| 174 | *pcAddonCodes += 1; | 174 | *pcAddonCodes += 1; |
| 175 | } | 175 | } |
| 176 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Patch", -1)) | 176 | else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Patch", -1, FALSE)) |
| 177 | { | 177 | { |
| 178 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5); | 178 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5); |
| 179 | ExitOnFailure(hr, "Failed to resize Patch code array"); | 179 | ExitOnFailure(hr, "Failed to resize Patch code array"); |
diff --git a/src/burn/engine/burnextension.cpp b/src/burn/engine/burnextension.cpp index 536dbcc9..50657f32 100644 --- a/src/burn/engine/burnextension.cpp +++ b/src/burn/engine/burnextension.cpp | |||
| @@ -214,7 +214,7 @@ EXTERN_C HRESULT BurnExtensionFindById( | |||
| 214 | { | 214 | { |
| 215 | pExtension = &pBurnExtensions->rgExtensions[i]; | 215 | pExtension = &pBurnExtensions->rgExtensions[i]; |
| 216 | 216 | ||
| 217 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pExtension->sczId, -1, wzId, -1)) | 217 | if (CSTR_EQUAL == ::CompareStringOrdinal(pExtension->sczId, -1, wzId, -1, FALSE)) |
| 218 | { | 218 | { |
| 219 | *ppExtension = pExtension; | 219 | *ppExtension = pExtension; |
| 220 | ExitFunction1(hr = S_OK); | 220 | ExitFunction1(hr = S_OK); |
diff --git a/src/burn/engine/burnpipe.cpp b/src/burn/engine/burnpipe.cpp index 25d602b1..ec85822e 100644 --- a/src/burn/engine/burnpipe.cpp +++ b/src/burn/engine/burnpipe.cpp | |||
| @@ -515,7 +515,7 @@ static HRESULT ChildPipeConnected( | |||
| 515 | ExitOnFailure(hr, "Failed to read verification secret from parent pipe."); | 515 | ExitOnFailure(hr, "Failed to read verification secret from parent pipe."); |
| 516 | 516 | ||
| 517 | // Verify the secrets match. | 517 | // Verify the secrets match. |
| 518 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, 0, sczVerificationSecret, -1, wzSecret, -1)) | 518 | if (CSTR_EQUAL != ::CompareStringOrdinal(sczVerificationSecret, -1, wzSecret, -1, FALSE)) |
| 519 | { | 519 | { |
| 520 | hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA); | 520 | hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA); |
| 521 | ExitOnRootFailure(hr, "Verification secret from parent does not match."); | 521 | ExitOnRootFailure(hr, "Verification secret from parent does not match."); |
diff --git a/src/burn/engine/condition.cpp b/src/burn/engine/condition.cpp index ecce2d5c..3719ce79 100644 --- a/src/burn/engine/condition.cpp +++ b/src/burn/engine/condition.cpp | |||
| @@ -928,7 +928,7 @@ static HRESULT CompareStringValues( | |||
| 928 | ) | 928 | ) |
| 929 | { | 929 | { |
| 930 | HRESULT hr = S_OK; | 930 | HRESULT hr = S_OK; |
| 931 | DWORD dwCompareString = (comparison & INSENSITIVE) ? NORM_IGNORECASE : 0; | 931 | BOOL fIgnoreCase = (comparison & INSENSITIVE) ? TRUE : FALSE; |
| 932 | size_t cchLeftSize = 0; | 932 | size_t cchLeftSize = 0; |
| 933 | size_t cchRightSize = 0; | 933 | size_t cchRightSize = 0; |
| 934 | int cchLeft = 0; | 934 | int cchLeft = 0; |
| @@ -958,7 +958,7 @@ static HRESULT CompareStringValues( | |||
| 958 | case BURN_SYMBOL_TYPE_EQ_I: | 958 | case BURN_SYMBOL_TYPE_EQ_I: |
| 959 | case BURN_SYMBOL_TYPE_NE_I: | 959 | case BURN_SYMBOL_TYPE_NE_I: |
| 960 | { | 960 | { |
| 961 | int i = ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand, cchLeft, wzRightOperand, cchRight); | 961 | int i = ::CompareStringOrdinal(wzLeftOperand, cchLeft, wzRightOperand, cchRight, fIgnoreCase); |
| 962 | hr = CompareIntegerValues(comparison, i, CSTR_EQUAL, pfResult); | 962 | hr = CompareIntegerValues(comparison, i, CSTR_EQUAL, pfResult); |
| 963 | } | 963 | } |
| 964 | break; | 964 | break; |
| @@ -967,7 +967,7 @@ static HRESULT CompareStringValues( | |||
| 967 | // test if left string contains right string | 967 | // test if left string contains right string |
| 968 | for (int i = 0; (i + cchRight) <= cchLeft; ++i) | 968 | for (int i = 0; (i + cchRight) <= cchLeft; ++i) |
| 969 | { | 969 | { |
| 970 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand + i, cchRight, wzRightOperand, cchRight)) | 970 | if (CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand + i, cchRight, wzRightOperand, cchRight, fIgnoreCase)) |
| 971 | { | 971 | { |
| 972 | *pfResult = TRUE; | 972 | *pfResult = TRUE; |
| 973 | ExitFunction(); | 973 | ExitFunction(); |
| @@ -978,12 +978,12 @@ static HRESULT CompareStringValues( | |||
| 978 | case BURN_SYMBOL_TYPE_HIEQ: | 978 | case BURN_SYMBOL_TYPE_HIEQ: |
| 979 | case BURN_SYMBOL_TYPE_HIEQ_I: | 979 | case BURN_SYMBOL_TYPE_HIEQ_I: |
| 980 | // test if left string starts with right string | 980 | // test if left string starts with right string |
| 981 | *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand, cchRight, wzRightOperand, cchRight); | 981 | *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand, cchRight, wzRightOperand, cchRight, fIgnoreCase); |
| 982 | break; | 982 | break; |
| 983 | case BURN_SYMBOL_TYPE_LOEQ: | 983 | case BURN_SYMBOL_TYPE_LOEQ: |
| 984 | case BURN_SYMBOL_TYPE_LOEQ_I: | 984 | case BURN_SYMBOL_TYPE_LOEQ_I: |
| 985 | // test if left string ends with right string | 985 | // test if left string ends with right string |
| 986 | *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand + (cchLeft - cchRight), cchRight, wzRightOperand, cchRight); | 986 | *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand + (cchLeft - cchRight), cchRight, wzRightOperand, cchRight, fIgnoreCase); |
| 987 | break; | 987 | break; |
| 988 | default: | 988 | default: |
| 989 | ExitFunction1(hr = E_INVALIDARG); | 989 | ExitFunction1(hr = E_INVALIDARG); |
diff --git a/src/burn/engine/container.cpp b/src/burn/engine/container.cpp index fad010cf..41ab0919 100644 --- a/src/burn/engine/container.cpp +++ b/src/burn/engine/container.cpp | |||
| @@ -400,7 +400,7 @@ extern "C" HRESULT ContainerFindById( | |||
| 400 | { | 400 | { |
| 401 | pContainer = &pContainers->rgContainers[i]; | 401 | pContainer = &pContainers->rgContainers[i]; |
| 402 | 402 | ||
| 403 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pContainer->sczId, -1, wzId, -1)) | 403 | if (CSTR_EQUAL == ::CompareStringOrdinal(pContainer->sczId, -1, wzId, -1, FALSE)) |
| 404 | { | 404 | { |
| 405 | *ppContainer = pContainer; | 405 | *ppContainer = pContainer; |
| 406 | ExitFunction1(hr = S_OK); | 406 | ExitFunction1(hr = S_OK); |
diff --git a/src/burn/engine/exeengine.cpp b/src/burn/engine/exeengine.cpp index 3a2816dd..4df762da 100644 --- a/src/burn/engine/exeengine.cpp +++ b/src/burn/engine/exeengine.cpp | |||
| @@ -25,15 +25,15 @@ extern "C" HRESULT ExeEngineParsePackageFromXml( | |||
| 25 | hr = XmlGetAttributeEx(pixnExePackage, L"DetectionType", &scz); | 25 | hr = XmlGetAttributeEx(pixnExePackage, L"DetectionType", &scz); |
| 26 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @DetectionType."); | 26 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @DetectionType."); |
| 27 | 27 | ||
| 28 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"condition", -1)) | 28 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"condition", -1, FALSE)) |
| 29 | { | 29 | { |
| 30 | pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_CONDITION; | 30 | pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_CONDITION; |
| 31 | } | 31 | } |
| 32 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"arp", -1)) | 32 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"arp", -1, FALSE)) |
| 33 | { | 33 | { |
| 34 | pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_ARP; | 34 | pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_ARP; |
| 35 | } | 35 | } |
| 36 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"none", -1)) | 36 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"none", -1, FALSE)) |
| 37 | { | 37 | { |
| 38 | pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_NONE; | 38 | pPackage->Exe.detectionType = BURN_EXE_DETECTION_TYPE_NONE; |
| 39 | } | 39 | } |
| @@ -114,15 +114,15 @@ extern "C" HRESULT ExeEngineParsePackageFromXml( | |||
| 114 | 114 | ||
| 115 | if (fFoundXml) | 115 | if (fFoundXml) |
| 116 | { | 116 | { |
| 117 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"burn", -1)) | 117 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"burn", -1, FALSE)) |
| 118 | { | 118 | { |
| 119 | pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_BURN; | 119 | pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_BURN; |
| 120 | } | 120 | } |
| 121 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"netfx4", -1)) | 121 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"netfx4", -1, FALSE)) |
| 122 | { | 122 | { |
| 123 | pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NETFX4; | 123 | pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NETFX4; |
| 124 | } | 124 | } |
| 125 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"none", -1)) | 125 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"none", -1, FALSE)) |
| 126 | { | 126 | { |
| 127 | pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NONE; | 127 | pPackage->Exe.protocol = BURN_EXE_PROTOCOL_TYPE_NONE; |
| 128 | } | 128 | } |
diff --git a/src/burn/engine/logging.cpp b/src/burn/engine/logging.cpp index 60c16c01..51b546ad 100644 --- a/src/burn/engine/logging.cpp +++ b/src/burn/engine/logging.cpp | |||
| @@ -1052,7 +1052,7 @@ static HRESULT GetNonSessionSpecificTempFolder( | |||
| 1052 | hr = ::StringCchLengthW(sczSessionId, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchSessionId)); | 1052 | hr = ::StringCchLengthW(sczSessionId, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchSessionId)); |
| 1053 | ExitOnFailure(hr, "Failed to get length of session id string."); | 1053 | ExitOnFailure(hr, "Failed to get length of session id string."); |
| 1054 | 1054 | ||
| 1055 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, sczTempFolder + cchTempFolder - cchSessionId, static_cast<DWORD>(cchSessionId), sczSessionId, static_cast<DWORD>(cchSessionId))) | 1055 | if (CSTR_EQUAL == ::CompareStringOrdinal(sczTempFolder + cchTempFolder - cchSessionId, static_cast<DWORD>(cchSessionId), sczSessionId, static_cast<DWORD>(cchSessionId), FALSE)) |
| 1056 | { | 1056 | { |
| 1057 | cchTempFolder -= cchSessionId; | 1057 | cchTempFolder -= cchSessionId; |
| 1058 | } | 1058 | } |
diff --git a/src/burn/engine/manifest.cpp b/src/burn/engine/manifest.cpp index 266d1987..b2680387 100644 --- a/src/burn/engine/manifest.cpp +++ b/src/burn/engine/manifest.cpp | |||
| @@ -177,7 +177,7 @@ static void ValidateHarvestingAttributes( | |||
| 177 | hr = XmlGetYesNoAttribute(pixeBundle, L"Win64", &fWin64); | 177 | hr = XmlGetYesNoAttribute(pixeBundle, L"Win64", &fWin64); |
| 178 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get BurnManifest/@Win64 attribute."); | 178 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get BurnManifest/@Win64 attribute."); |
| 179 | 179 | ||
| 180 | Assert(CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczEngineVersion, -1, wzVerMajorMinorBuild, -1)); | 180 | Assert(CSTR_EQUAL == ::CompareStringOrdinal(sczEngineVersion, -1, wzVerMajorMinorBuild, -1, FALSE)); |
| 181 | 181 | ||
| 182 | Assert(BURN_PROTOCOL_VERSION == dwProtocolVersion); | 182 | Assert(BURN_PROTOCOL_VERSION == dwProtocolVersion); |
| 183 | 183 | ||
diff --git a/src/burn/engine/mspengine.cpp b/src/burn/engine/mspengine.cpp index c057c06d..e8ef7fcb 100644 --- a/src/burn/engine/mspengine.cpp +++ b/src/burn/engine/mspengine.cpp | |||
| @@ -771,7 +771,7 @@ extern "C" void MspEngineUpdateInstallRegistrationState( | |||
| 771 | { | 771 | { |
| 772 | pTargetProduct = pPackage->Msp.rgTargetProducts + j; | 772 | pTargetProduct = pPackage->Msp.rgTargetProducts + j; |
| 773 | if (pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) && | 773 | if (pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) && |
| 774 | CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1)) | 774 | CSTR_EQUAL == ::CompareStringOrdinal(pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1, FALSE)) |
| 775 | { | 775 | { |
| 776 | break; | 776 | break; |
| 777 | } | 777 | } |
| @@ -1069,7 +1069,7 @@ static HRESULT DeterminePatchChainedTarget( | |||
| 1069 | { | 1069 | { |
| 1070 | BURN_PACKAGE* pPackage = pPackages->rgPackages + iPackage; | 1070 | BURN_PACKAGE* pPackage = pPackages->rgPackages + iPackage; |
| 1071 | 1071 | ||
| 1072 | if (BURN_PACKAGE_TYPE_MSI == pPackage->type && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzTargetProductCode, -1, pPackage->Msi.sczProductCode, -1)) | 1072 | if (BURN_PACKAGE_TYPE_MSI == pPackage->type && CSTR_EQUAL == ::CompareStringOrdinal(wzTargetProductCode, -1, pPackage->Msi.sczProductCode, -1, FALSE)) |
| 1073 | { | 1073 | { |
| 1074 | pTargetProduct->pChainedTargetPackage = pPackage; | 1074 | pTargetProduct->pChainedTargetPackage = pPackage; |
| 1075 | 1075 | ||
| @@ -1123,7 +1123,7 @@ static HRESULT PlanTargetProduct( | |||
| 1123 | if (BURN_EXECUTE_ACTION_TYPE_MSP_TARGET == pAction->type && | 1123 | if (BURN_EXECUTE_ACTION_TYPE_MSP_TARGET == pAction->type && |
| 1124 | pAction->mspTarget.action == actionState && | 1124 | pAction->mspTarget.action == actionState && |
| 1125 | pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) && | 1125 | pAction->mspTarget.fPerMachineTarget == (MSIINSTALLCONTEXT_MACHINE == pTargetProduct->context) && |
| 1126 | CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1)) | 1126 | CSTR_EQUAL == ::CompareStringOrdinal(pAction->mspTarget.sczTargetProductCode, -1, pTargetProduct->wzTargetProductCode, -1, FALSE)) |
| 1127 | { | 1127 | { |
| 1128 | dwInsertSequence = i; | 1128 | dwInsertSequence = i; |
| 1129 | break; | 1129 | break; |
diff --git a/src/burn/engine/package.cpp b/src/burn/engine/package.cpp index fe8af497..3bf676ba 100644 --- a/src/burn/engine/package.cpp +++ b/src/burn/engine/package.cpp | |||
| @@ -123,15 +123,15 @@ extern "C" HRESULT PackagesParseFromXml( | |||
| 123 | 123 | ||
| 124 | if (fFoundXml) | 124 | if (fFoundXml) |
| 125 | { | 125 | { |
| 126 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"remove", -1)) | 126 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"remove", -1, FALSE)) |
| 127 | { | 127 | { |
| 128 | pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE; | 128 | pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE; |
| 129 | } | 129 | } |
| 130 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"keep", -1)) | 130 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"keep", -1, FALSE)) |
| 131 | { | 131 | { |
| 132 | pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP; | 132 | pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP; |
| 133 | } | 133 | } |
| 134 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"force", -1)) | 134 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"force", -1, FALSE)) |
| 135 | { | 135 | { |
| 136 | pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE; | 136 | pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE; |
| 137 | } | 137 | } |
| @@ -210,28 +210,28 @@ extern "C" HRESULT PackagesParseFromXml( | |||
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | // read type specific attributes | 212 | // read type specific attributes |
| 213 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"BundlePackage", -1)) | 213 | if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"BundlePackage", -1, FALSE)) |
| 214 | { | 214 | { |
| 215 | pPackage->type = BURN_PACKAGE_TYPE_BUNDLE; | 215 | pPackage->type = BURN_PACKAGE_TYPE_BUNDLE; |
| 216 | 216 | ||
| 217 | hr = BundlePackageEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization | 217 | hr = BundlePackageEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization |
| 218 | ExitOnFailure(hr, "Failed to parse BUNDLE package."); | 218 | ExitOnFailure(hr, "Failed to parse BUNDLE package."); |
| 219 | } | 219 | } |
| 220 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"ExePackage", -1)) | 220 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"ExePackage", -1, FALSE)) |
| 221 | { | 221 | { |
| 222 | pPackage->type = BURN_PACKAGE_TYPE_EXE; | 222 | pPackage->type = BURN_PACKAGE_TYPE_EXE; |
| 223 | 223 | ||
| 224 | hr = ExeEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization | 224 | hr = ExeEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization |
| 225 | ExitOnFailure(hr, "Failed to parse EXE package."); | 225 | ExitOnFailure(hr, "Failed to parse EXE package."); |
| 226 | } | 226 | } |
| 227 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiPackage", -1)) | 227 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiPackage", -1, FALSE)) |
| 228 | { | 228 | { |
| 229 | pPackage->type = BURN_PACKAGE_TYPE_MSI; | 229 | pPackage->type = BURN_PACKAGE_TYPE_MSI; |
| 230 | 230 | ||
| 231 | hr = MsiEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization | 231 | hr = MsiEngineParsePackageFromXml(pixnNode, pPackage); // TODO: Modularization |
| 232 | ExitOnFailure(hr, "Failed to parse MSI package."); | 232 | ExitOnFailure(hr, "Failed to parse MSI package."); |
| 233 | } | 233 | } |
| 234 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MspPackage", -1)) | 234 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MspPackage", -1, FALSE)) |
| 235 | { | 235 | { |
| 236 | pPackage->type = BURN_PACKAGE_TYPE_MSP; | 236 | pPackage->type = BURN_PACKAGE_TYPE_MSP; |
| 237 | 237 | ||
| @@ -240,7 +240,7 @@ extern "C" HRESULT PackagesParseFromXml( | |||
| 240 | 240 | ||
| 241 | ++cMspPackages; | 241 | ++cMspPackages; |
| 242 | } | 242 | } |
| 243 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsuPackage", -1)) | 243 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsuPackage", -1, FALSE)) |
| 244 | { | 244 | { |
| 245 | pPackage->type = BURN_PACKAGE_TYPE_MSU; | 245 | pPackage->type = BURN_PACKAGE_TYPE_MSU; |
| 246 | 246 | ||
| @@ -315,7 +315,7 @@ extern "C" HRESULT PackagesParseFromXml( | |||
| 315 | { | 315 | { |
| 316 | for (DWORD k = 0; k < pMsiPackage->Msi.cSlipstreamMspPackages; ++k) | 316 | for (DWORD k = 0; k < pMsiPackage->Msi.cSlipstreamMspPackages; ++k) |
| 317 | { | 317 | { |
| 318 | if (pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k] && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k], -1)) | 318 | if (pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k] && CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, pMsiPackage->Msi.rgsczSlipstreamMspPackageIds[k], -1, FALSE)) |
| 319 | { | 319 | { |
| 320 | BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pMsiPackage->Msi.rgSlipstreamMsps + k; | 320 | BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pMsiPackage->Msi.rgSlipstreamMsps + k; |
| 321 | pSlipstreamMsp->pMspPackage = pPackage; | 321 | pSlipstreamMsp->pMspPackage = pPackage; |
| @@ -486,7 +486,7 @@ extern "C" HRESULT PackageFindById( | |||
| 486 | { | 486 | { |
| 487 | pPackage = &pPackages->rgPackages[i]; | 487 | pPackage = &pPackages->rgPackages[i]; |
| 488 | 488 | ||
| 489 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, wzId, -1)) | 489 | if (CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, wzId, -1, FALSE)) |
| 490 | { | 490 | { |
| 491 | *ppPackage = pPackage; | 491 | *ppPackage = pPackage; |
| 492 | ExitFunction1(hr = S_OK); | 492 | ExitFunction1(hr = S_OK); |
| @@ -508,7 +508,7 @@ extern "C" HRESULT PackageFindRelatedById( | |||
| 508 | { | 508 | { |
| 509 | HRESULT hr = S_OK; | 509 | HRESULT hr = S_OK; |
| 510 | BURN_RELATED_BUNDLE* pRelatedBundle = NULL; | 510 | BURN_RELATED_BUNDLE* pRelatedBundle = NULL; |
| 511 | 511 | ||
| 512 | hr = RelatedBundleFindById(pRelatedBundles, wzId, &pRelatedBundle); | 512 | hr = RelatedBundleFindById(pRelatedBundles, wzId, &pRelatedBundle); |
| 513 | *ppPackage = FAILED(hr) ? NULL : &pRelatedBundle->package; | 513 | *ppPackage = FAILED(hr) ? NULL : &pRelatedBundle->package; |
| 514 | 514 | ||
| @@ -551,7 +551,7 @@ extern "C" HRESULT PackageGetProperty( | |||
| 551 | { | 551 | { |
| 552 | const BURN_MSIPROPERTY* pProperty = &rgProperties[i]; | 552 | const BURN_MSIPROPERTY* pProperty = &rgProperties[i]; |
| 553 | 553 | ||
| 554 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pProperty->sczId, -1, wzProperty, -1)) | 554 | if (CSTR_EQUAL == ::CompareStringOrdinal(pProperty->sczId, -1, wzProperty, -1, FALSE)) |
| 555 | { | 555 | { |
| 556 | if (psczValue) | 556 | if (psczValue) |
| 557 | { | 557 | { |
| @@ -580,7 +580,7 @@ extern "C" HRESULT PackageFindRollbackBoundaryById( | |||
| 580 | { | 580 | { |
| 581 | pRollbackBoundary = &pPackages->rgRollbackBoundaries[i]; | 581 | pRollbackBoundary = &pPackages->rgRollbackBoundaries[i]; |
| 582 | 582 | ||
| 583 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pRollbackBoundary->sczId, -1, wzId, -1)) | 583 | if (CSTR_EQUAL == ::CompareStringOrdinal(pRollbackBoundary->sczId, -1, wzId, -1, FALSE)) |
| 584 | { | 584 | { |
| 585 | *ppRollbackBoundary = pRollbackBoundary; | 585 | *ppRollbackBoundary = pRollbackBoundary; |
| 586 | ExitFunction1(hr = S_OK); | 586 | ExitFunction1(hr = S_OK); |
| @@ -730,7 +730,7 @@ static HRESULT FindRollbackBoundaryById( | |||
| 730 | { | 730 | { |
| 731 | pRollbackBoundary = &pPackages->rgRollbackBoundaries[i]; | 731 | pRollbackBoundary = &pPackages->rgRollbackBoundaries[i]; |
| 732 | 732 | ||
| 733 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pRollbackBoundary->sczId, -1, wzId, -1)) | 733 | if (CSTR_EQUAL == ::CompareStringOrdinal(pRollbackBoundary->sczId, -1, wzId, -1, FALSE)) |
| 734 | { | 734 | { |
| 735 | *ppRollbackBoundary = pRollbackBoundary; | 735 | *ppRollbackBoundary = pRollbackBoundary; |
| 736 | ExitFunction1(hr = S_OK); | 736 | ExitFunction1(hr = S_OK); |
diff --git a/src/burn/engine/payload.cpp b/src/burn/engine/payload.cpp index 270da6aa..a2649f97 100644 --- a/src/burn/engine/payload.cpp +++ b/src/burn/engine/payload.cpp | |||
| @@ -80,11 +80,11 @@ extern "C" HRESULT PayloadsParseFromXml( | |||
| 80 | hr = XmlGetAttributeEx(pixnNode, L"Packaging", &scz); | 80 | hr = XmlGetAttributeEx(pixnNode, L"Packaging", &scz); |
| 81 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Packaging."); | 81 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Packaging."); |
| 82 | 82 | ||
| 83 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"embedded", -1)) | 83 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"embedded", -1, FALSE)) |
| 84 | { | 84 | { |
| 85 | pPayload->packaging = BURN_PAYLOAD_PACKAGING_EMBEDDED; | 85 | pPayload->packaging = BURN_PAYLOAD_PACKAGING_EMBEDDED; |
| 86 | } | 86 | } |
| 87 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"external", -1)) | 87 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"external", -1, FALSE)) |
| 88 | { | 88 | { |
| 89 | pPayload->packaging = BURN_PAYLOAD_PACKAGING_EXTERNAL; | 89 | pPayload->packaging = BURN_PAYLOAD_PACKAGING_EXTERNAL; |
| 90 | } | 90 | } |
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp index 966fc849..9733e92c 100644 --- a/src/burn/engine/registration.cpp +++ b/src/burn/engine/registration.cpp | |||
| @@ -223,15 +223,15 @@ extern "C" HRESULT RegistrationParseFromXml( | |||
| 223 | 223 | ||
| 224 | if (fFoundXml) | 224 | if (fFoundXml) |
| 225 | { | 225 | { |
| 226 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"button", -1)) | 226 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"button", -1, FALSE)) |
| 227 | { | 227 | { |
| 228 | pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE_BUTTON; | 228 | pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE_BUTTON; |
| 229 | } | 229 | } |
| 230 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"yes", -1)) | 230 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"yes", -1, FALSE)) |
| 231 | { | 231 | { |
| 232 | pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE; | 232 | pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE; |
| 233 | } | 233 | } |
| 234 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"no", -1)) | 234 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"no", -1, FALSE)) |
| 235 | { | 235 | { |
| 236 | pRegistration->modify = BURN_REGISTRATION_MODIFY_ENABLED; | 236 | pRegistration->modify = BURN_REGISTRATION_MODIFY_ENABLED; |
| 237 | } | 237 | } |
| @@ -1512,7 +1512,7 @@ static HRESULT RemoveUpdateRegistration( | |||
| 1512 | hr = RegReadString(hkKey, L"PackageVersion", &sczPackageVersion); | 1512 | hr = RegReadString(hkKey, L"PackageVersion", &sczPackageVersion); |
| 1513 | if (SUCCEEDED(hr)) | 1513 | if (SUCCEEDED(hr)) |
| 1514 | { | 1514 | { |
| 1515 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, sczPackageVersion, -1, pRegistration->sczDisplayVersion, -1)) | 1515 | if (CSTR_EQUAL != ::CompareStringOrdinal(sczPackageVersion, -1, pRegistration->sczDisplayVersion, -1, FALSE)) |
| 1516 | { | 1516 | { |
| 1517 | fDeleteRegKey = FALSE; | 1517 | fDeleteRegKey = FALSE; |
| 1518 | } | 1518 | } |
diff --git a/src/burn/engine/relatedbundle.cpp b/src/burn/engine/relatedbundle.cpp index d426dc53..c9aa7170 100644 --- a/src/burn/engine/relatedbundle.cpp +++ b/src/burn/engine/relatedbundle.cpp | |||
| @@ -116,7 +116,7 @@ extern "C" HRESULT RelatedBundleFindById( | |||
| 116 | pRelatedBundle = pRelatedBundles->rgRelatedBundles + i; | 116 | pRelatedBundle = pRelatedBundles->rgRelatedBundles + i; |
| 117 | pPackage = &pRelatedBundle->package; | 117 | pPackage = &pRelatedBundle->package; |
| 118 | 118 | ||
| 119 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pPackage->sczId, -1, wzId, -1)) | 119 | if (CSTR_EQUAL == ::CompareStringOrdinal(pPackage->sczId, -1, wzId, -1, FALSE)) |
| 120 | { | 120 | { |
| 121 | *ppRelatedBundle = pRelatedBundle; | 121 | *ppRelatedBundle = pRelatedBundle; |
| 122 | ExitFunction1(hr = S_OK); | 122 | ExitFunction1(hr = S_OK); |
diff --git a/src/burn/engine/search.cpp b/src/burn/engine/search.cpp index a1b6b74a..b5218600 100644 --- a/src/burn/engine/search.cpp +++ b/src/burn/engine/search.cpp | |||
| @@ -106,7 +106,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 106 | ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get @Condition."); | 106 | ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get @Condition."); |
| 107 | 107 | ||
| 108 | // read type specific attributes | 108 | // read type specific attributes |
| 109 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"DirectorySearch", -1)) | 109 | if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"DirectorySearch", -1, FALSE)) |
| 110 | { | 110 | { |
| 111 | pSearch->Type = BURN_SEARCH_TYPE_DIRECTORY; | 111 | pSearch->Type = BURN_SEARCH_TYPE_DIRECTORY; |
| 112 | 112 | ||
| @@ -118,11 +118,11 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 118 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 118 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 119 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 119 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 120 | 120 | ||
| 121 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) | 121 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) |
| 122 | { | 122 | { |
| 123 | pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_EXISTS; | 123 | pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_EXISTS; |
| 124 | } | 124 | } |
| 125 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"path", -1)) | 125 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"path", -1, FALSE)) |
| 126 | { | 126 | { |
| 127 | pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_PATH; | 127 | pSearch->DirectorySearch.Type = BURN_DIRECTORY_SEARCH_TYPE_PATH; |
| 128 | } | 128 | } |
| @@ -131,7 +131,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 131 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 131 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 132 | } | 132 | } |
| 133 | } | 133 | } |
| 134 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"FileSearch", -1)) | 134 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"FileSearch", -1, FALSE)) |
| 135 | { | 135 | { |
| 136 | pSearch->Type = BURN_SEARCH_TYPE_FILE; | 136 | pSearch->Type = BURN_SEARCH_TYPE_FILE; |
| 137 | 137 | ||
| @@ -147,15 +147,15 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 147 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 147 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 148 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 148 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 149 | 149 | ||
| 150 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) | 150 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) |
| 151 | { | 151 | { |
| 152 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_EXISTS; | 152 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_EXISTS; |
| 153 | } | 153 | } |
| 154 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 154 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 155 | { | 155 | { |
| 156 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_VERSION; | 156 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_VERSION; |
| 157 | } | 157 | } |
| 158 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"path", -1)) | 158 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"path", -1, FALSE)) |
| 159 | { | 159 | { |
| 160 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_PATH; | 160 | pSearch->FileSearch.Type = BURN_FILE_SEARCH_TYPE_PATH; |
| 161 | } | 161 | } |
| @@ -164,7 +164,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 164 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 164 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 165 | } | 165 | } |
| 166 | } | 166 | } |
| 167 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"RegistrySearch", -1)) | 167 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"RegistrySearch", -1, FALSE)) |
| 168 | { | 168 | { |
| 169 | pSearch->Type = BURN_SEARCH_TYPE_REGISTRY; | 169 | pSearch->Type = BURN_SEARCH_TYPE_REGISTRY; |
| 170 | 170 | ||
| @@ -172,19 +172,19 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 172 | hr = XmlGetAttributeEx(pixnNode, L"Root", &scz); | 172 | hr = XmlGetAttributeEx(pixnNode, L"Root", &scz); |
| 173 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Root."); | 173 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Root."); |
| 174 | 174 | ||
| 175 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKCR", -1)) | 175 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKCR", -1, FALSE)) |
| 176 | { | 176 | { |
| 177 | pSearch->RegistrySearch.hRoot = HKEY_CLASSES_ROOT; | 177 | pSearch->RegistrySearch.hRoot = HKEY_CLASSES_ROOT; |
| 178 | } | 178 | } |
| 179 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKCU", -1)) | 179 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKCU", -1, FALSE)) |
| 180 | { | 180 | { |
| 181 | pSearch->RegistrySearch.hRoot = HKEY_CURRENT_USER; | 181 | pSearch->RegistrySearch.hRoot = HKEY_CURRENT_USER; |
| 182 | } | 182 | } |
| 183 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKLM", -1)) | 183 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKLM", -1, FALSE)) |
| 184 | { | 184 | { |
| 185 | pSearch->RegistrySearch.hRoot = HKEY_LOCAL_MACHINE; | 185 | pSearch->RegistrySearch.hRoot = HKEY_LOCAL_MACHINE; |
| 186 | } | 186 | } |
| 187 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"HKU", -1)) | 187 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"HKU", -1, FALSE)) |
| 188 | { | 188 | { |
| 189 | pSearch->RegistrySearch.hRoot = HKEY_USERS; | 189 | pSearch->RegistrySearch.hRoot = HKEY_USERS; |
| 190 | } | 190 | } |
| @@ -208,11 +208,11 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 208 | hr = XmlGetYesNoAttribute(pixnNode, L"Win64", &pSearch->RegistrySearch.fWin64); | 208 | hr = XmlGetYesNoAttribute(pixnNode, L"Win64", &pSearch->RegistrySearch.fWin64); |
| 209 | ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get Win64 attribute."); | 209 | ExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get Win64 attribute."); |
| 210 | 210 | ||
| 211 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"exists", -1)) | 211 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"exists", -1, FALSE)) |
| 212 | { | 212 | { |
| 213 | pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_EXISTS; | 213 | pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_EXISTS; |
| 214 | } | 214 | } |
| 215 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"value", -1)) | 215 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"value", -1, FALSE)) |
| 216 | { | 216 | { |
| 217 | pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_VALUE; | 217 | pSearch->RegistrySearch.Type = BURN_REGISTRY_SEARCH_TYPE_VALUE; |
| 218 | 218 | ||
| @@ -224,19 +224,19 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 224 | hr = XmlGetAttributeEx(pixnNode, L"VariableType", &scz); | 224 | hr = XmlGetAttributeEx(pixnNode, L"VariableType", &scz); |
| 225 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @VariableType."); | 225 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @VariableType."); |
| 226 | 226 | ||
| 227 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) | 227 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE)) |
| 228 | { | 228 | { |
| 229 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_FORMATTED; | 229 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_FORMATTED; |
| 230 | } | 230 | } |
| 231 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) | 231 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE)) |
| 232 | { | 232 | { |
| 233 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_NUMERIC; | 233 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_NUMERIC; |
| 234 | } | 234 | } |
| 235 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) | 235 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE)) |
| 236 | { | 236 | { |
| 237 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_STRING; | 237 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_STRING; |
| 238 | } | 238 | } |
| 239 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 239 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 240 | { | 240 | { |
| 241 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_VERSION; | 241 | pSearch->RegistrySearch.VariableType = BURN_VARIANT_TYPE_VERSION; |
| 242 | } | 242 | } |
| @@ -250,7 +250,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 250 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 250 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 251 | } | 251 | } |
| 252 | } | 252 | } |
| 253 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiComponentSearch", -1)) | 253 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiComponentSearch", -1, FALSE)) |
| 254 | { | 254 | { |
| 255 | pSearch->Type = BURN_SEARCH_TYPE_MSI_COMPONENT; | 255 | pSearch->Type = BURN_SEARCH_TYPE_MSI_COMPONENT; |
| 256 | 256 | ||
| @@ -266,15 +266,15 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 266 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 266 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 267 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 267 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 268 | 268 | ||
| 269 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"keyPath", -1)) | 269 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"keyPath", -1, FALSE)) |
| 270 | { | 270 | { |
| 271 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_KEYPATH; | 271 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_KEYPATH; |
| 272 | } | 272 | } |
| 273 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"state", -1)) | 273 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"state", -1, FALSE)) |
| 274 | { | 274 | { |
| 275 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_STATE; | 275 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_STATE; |
| 276 | } | 276 | } |
| 277 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"directory", -1)) | 277 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"directory", -1, FALSE)) |
| 278 | { | 278 | { |
| 279 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_DIRECTORY; | 279 | pSearch->MsiComponentSearch.Type = BURN_MSI_COMPONENT_SEARCH_TYPE_DIRECTORY; |
| 280 | } | 280 | } |
| @@ -283,7 +283,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 283 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 283 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| 286 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"MsiProductSearch", -1)) | 286 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"MsiProductSearch", -1, FALSE)) |
| 287 | { | 287 | { |
| 288 | pSearch->Type = BURN_SEARCH_TYPE_MSI_PRODUCT; | 288 | pSearch->Type = BURN_SEARCH_TYPE_MSI_PRODUCT; |
| 289 | pSearch->MsiProductSearch.GuidType = BURN_MSI_PRODUCT_SEARCH_GUID_TYPE_NONE; | 289 | pSearch->MsiProductSearch.GuidType = BURN_MSI_PRODUCT_SEARCH_GUID_TYPE_NONE; |
| @@ -318,19 +318,19 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 318 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 318 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 319 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 319 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 320 | 320 | ||
| 321 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 321 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 322 | { | 322 | { |
| 323 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_VERSION; | 323 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_VERSION; |
| 324 | } | 324 | } |
| 325 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"language", -1)) | 325 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"language", -1, FALSE)) |
| 326 | { | 326 | { |
| 327 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_LANGUAGE; | 327 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_LANGUAGE; |
| 328 | } | 328 | } |
| 329 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"state", -1)) | 329 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"state", -1, FALSE)) |
| 330 | { | 330 | { |
| 331 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_STATE; | 331 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_STATE; |
| 332 | } | 332 | } |
| 333 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"assignment", -1)) | 333 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"assignment", -1, FALSE)) |
| 334 | { | 334 | { |
| 335 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_ASSIGNMENT; | 335 | pSearch->MsiProductSearch.Type = BURN_MSI_PRODUCT_SEARCH_TYPE_ASSIGNMENT; |
| 336 | } | 336 | } |
| @@ -339,7 +339,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 339 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); | 339 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid value for @Type: %ls", scz); |
| 340 | } | 340 | } |
| 341 | } | 341 | } |
| 342 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"ExtensionSearch", -1)) | 342 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"ExtensionSearch", -1, FALSE)) |
| 343 | { | 343 | { |
| 344 | pSearch->Type = BURN_SEARCH_TYPE_EXTENSION; | 344 | pSearch->Type = BURN_SEARCH_TYPE_EXTENSION; |
| 345 | 345 | ||
| @@ -350,7 +350,7 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 350 | hr = BurnExtensionFindById(pBurnExtensions, scz, &pSearch->ExtensionSearch.pExtension); | 350 | hr = BurnExtensionFindById(pBurnExtensions, scz, &pSearch->ExtensionSearch.pExtension); |
| 351 | ExitOnRootFailure(hr, "Failed to find extension '%ls' for search '%ls'", scz, pSearch->sczKey); | 351 | ExitOnRootFailure(hr, "Failed to find extension '%ls' for search '%ls'", scz, pSearch->sczKey); |
| 352 | } | 352 | } |
| 353 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"SetVariable", -1)) | 353 | else if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"SetVariable", -1, FALSE)) |
| 354 | { | 354 | { |
| 355 | pSearch->Type = BURN_SEARCH_TYPE_SET_VARIABLE; | 355 | pSearch->Type = BURN_SEARCH_TYPE_SET_VARIABLE; |
| 356 | 356 | ||
| @@ -367,19 +367,19 @@ extern "C" HRESULT SearchesParseFromXml( | |||
| 367 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 367 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 368 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 368 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 369 | 369 | ||
| 370 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) | 370 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE)) |
| 371 | { | 371 | { |
| 372 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_FORMATTED; | 372 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_FORMATTED; |
| 373 | } | 373 | } |
| 374 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) | 374 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE)) |
| 375 | { | 375 | { |
| 376 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_NUMERIC; | 376 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_NUMERIC; |
| 377 | } | 377 | } |
| 378 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) | 378 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE)) |
| 379 | { | 379 | { |
| 380 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_STRING; | 380 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_STRING; |
| 381 | } | 381 | } |
| 382 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 382 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 383 | { | 383 | { |
| 384 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_VERSION; | 384 | pSearch->SetVariable.targetType = BURN_VARIANT_TYPE_VERSION; |
| 385 | } | 385 | } |
diff --git a/src/burn/engine/variable.cpp b/src/burn/engine/variable.cpp index dc59916a..a795d76c 100644 --- a/src/burn/engine/variable.cpp +++ b/src/burn/engine/variable.cpp | |||
| @@ -397,7 +397,7 @@ extern "C" HRESULT VariablesParseFromXml( | |||
| 397 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 397 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 398 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); | 398 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Type."); |
| 399 | 399 | ||
| 400 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"formatted", -1)) | 400 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"formatted", -1, FALSE)) |
| 401 | { | 401 | { |
| 402 | if (!fHidden) | 402 | if (!fHidden) |
| 403 | { | 403 | { |
| @@ -405,7 +405,7 @@ extern "C" HRESULT VariablesParseFromXml( | |||
| 405 | } | 405 | } |
| 406 | valueType = BURN_VARIANT_TYPE_FORMATTED; | 406 | valueType = BURN_VARIANT_TYPE_FORMATTED; |
| 407 | } | 407 | } |
| 408 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"numeric", -1)) | 408 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"numeric", -1, FALSE)) |
| 409 | { | 409 | { |
| 410 | if (!fHidden) | 410 | if (!fHidden) |
| 411 | { | 411 | { |
| @@ -413,7 +413,7 @@ extern "C" HRESULT VariablesParseFromXml( | |||
| 413 | } | 413 | } |
| 414 | valueType = BURN_VARIANT_TYPE_NUMERIC; | 414 | valueType = BURN_VARIANT_TYPE_NUMERIC; |
| 415 | } | 415 | } |
| 416 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"string", -1)) | 416 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"string", -1, FALSE)) |
| 417 | { | 417 | { |
| 418 | if (!fHidden) | 418 | if (!fHidden) |
| 419 | { | 419 | { |
| @@ -421,7 +421,7 @@ extern "C" HRESULT VariablesParseFromXml( | |||
| 421 | } | 421 | } |
| 422 | valueType = BURN_VARIANT_TYPE_STRING; | 422 | valueType = BURN_VARIANT_TYPE_STRING; |
| 423 | } | 423 | } |
| 424 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"version", -1)) | 424 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"version", -1, FALSE)) |
| 425 | { | 425 | { |
| 426 | if (!fHidden) | 426 | if (!fHidden) |
| 427 | { | 427 | { |
| @@ -1556,7 +1556,7 @@ static HRESULT FindVariableIndexByName( | |||
| 1556 | DWORD iPosition = cRangeLength / 2; | 1556 | DWORD iPosition = cRangeLength / 2; |
| 1557 | BURN_VARIABLE* pVariable = &pVariables->rgVariables[iRangeFirst + iPosition]; | 1557 | BURN_VARIABLE* pVariable = &pVariables->rgVariables[iRangeFirst + iPosition]; |
| 1558 | 1558 | ||
| 1559 | switch (::CompareStringW(LOCALE_INVARIANT, SORT_STRINGSORT, wzVariable, -1, pVariable->sczName, -1)) | 1559 | switch (::CompareStringOrdinal(wzVariable, -1, pVariable->sczName, -1, FALSE)) |
| 1560 | { | 1560 | { |
| 1561 | case CSTR_LESS_THAN: | 1561 | case CSTR_LESS_THAN: |
| 1562 | // restrict range to elements before the current | 1562 | // restrict range to elements before the current |
| @@ -1591,7 +1591,7 @@ static HRESULT InsertUserVariable( | |||
| 1591 | { | 1591 | { |
| 1592 | HRESULT hr = S_OK; | 1592 | HRESULT hr = S_OK; |
| 1593 | 1593 | ||
| 1594 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, wzVariable, 3, L"Wix", 3)) | 1594 | if (CSTR_EQUAL == ::CompareStringOrdinal(wzVariable, 3, L"Wix", 3, FALSE)) |
| 1595 | { | 1595 | { |
| 1596 | ExitWithRootFailure(hr, E_INVALIDARG, "Attempted to insert variable with reserved prefix: %ls", wzVariable); | 1596 | ExitWithRootFailure(hr, E_INVALIDARG, "Attempted to insert variable with reserved prefix: %ls", wzVariable); |
| 1597 | } | 1597 | } |
