diff options
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/apuputil.cpp')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/apuputil.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/apuputil.cpp b/src/libs/dutil/WixToolset.DUtil/apuputil.cpp index 62cf4d06..848aac15 100644 --- a/src/libs/dutil/WixToolset.DUtil/apuputil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/apuputil.cpp | |||
| @@ -70,16 +70,16 @@ extern "C" HRESULT DAPI ApupAllocChainFromAtom( | |||
| 70 | // First search the ATOM feed's custom elements to try and find the default application identity. | 70 | // First search the ATOM feed's custom elements to try and find the default application identity. |
| 71 | for (ATOM_UNKNOWN_ELEMENT* pElement = pFeed->pUnknownElements; pElement; pElement = pElement->pNext) | 71 | for (ATOM_UNKNOWN_ELEMENT* pElement = pFeed->pUnknownElements; pElement; pElement = pElement->pNext) |
| 72 | { | 72 | { |
| 73 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) | 73 | if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE)) |
| 74 | { | 74 | { |
| 75 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"application", -1)) | 75 | if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"application", -1, FALSE)) |
| 76 | { | 76 | { |
| 77 | hr = StrAllocString(&pChain->wzDefaultApplicationId, pElement->wzValue, 0); | 77 | hr = StrAllocString(&pChain->wzDefaultApplicationId, pElement->wzValue, 0); |
| 78 | ApupExitOnFailure(hr, "Failed to allocate default application id."); | 78 | ApupExitOnFailure(hr, "Failed to allocate default application id."); |
| 79 | 79 | ||
| 80 | for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) | 80 | for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) |
| 81 | { | 81 | { |
| 82 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"type", -1)) | 82 | if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"type", -1, FALSE)) |
| 83 | { | 83 | { |
| 84 | hr = StrAllocString(&pChain->wzDefaultApplicationType, pAttribute->wzValue, 0); | 84 | hr = StrAllocString(&pChain->wzDefaultApplicationType, pAttribute->wzValue, 0); |
| 85 | ApupExitOnFailure(hr, "Failed to allocate default application type."); | 85 | ApupExitOnFailure(hr, "Failed to allocate default application type."); |
| @@ -213,44 +213,44 @@ static HRESULT ProcessEntry( | |||
| 213 | // First search the ATOM entry's custom elements to try and find the application update information. | 213 | // First search the ATOM entry's custom elements to try and find the application update information. |
| 214 | for (ATOM_UNKNOWN_ELEMENT* pElement = pAtomEntry->pUnknownElements; pElement; pElement = pElement->pNext) | 214 | for (ATOM_UNKNOWN_ELEMENT* pElement = pAtomEntry->pUnknownElements; pElement; pElement = pElement->pNext) |
| 215 | { | 215 | { |
| 216 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) | 216 | if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE)) |
| 217 | { | 217 | { |
| 218 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"application", -1)) | 218 | if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"application", -1, FALSE)) |
| 219 | { | 219 | { |
| 220 | hr = StrAllocString(&pApupEntry->wzApplicationId, pElement->wzValue, 0); | 220 | hr = StrAllocString(&pApupEntry->wzApplicationId, pElement->wzValue, 0); |
| 221 | ApupExitOnFailure(hr, "Failed to allocate application identity."); | 221 | ApupExitOnFailure(hr, "Failed to allocate application identity."); |
| 222 | 222 | ||
| 223 | for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) | 223 | for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) |
| 224 | { | 224 | { |
| 225 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"type", -1)) | 225 | if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"type", -1, FALSE)) |
| 226 | { | 226 | { |
| 227 | hr = StrAllocString(&pApupEntry->wzApplicationType, pAttribute->wzValue, 0); | 227 | hr = StrAllocString(&pApupEntry->wzApplicationType, pAttribute->wzValue, 0); |
| 228 | ApupExitOnFailure(hr, "Failed to allocate application type."); | 228 | ApupExitOnFailure(hr, "Failed to allocate application type."); |
| 229 | } | 229 | } |
| 230 | } | 230 | } |
| 231 | } | 231 | } |
| 232 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"upgrade", -1)) | 232 | else if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"upgrade", -1, FALSE)) |
| 233 | { | 233 | { |
| 234 | hr = StrAllocString(&pApupEntry->wzUpgradeId, pElement->wzValue, 0); | 234 | hr = StrAllocString(&pApupEntry->wzUpgradeId, pElement->wzValue, 0); |
| 235 | ApupExitOnFailure(hr, "Failed to allocate upgrade id."); | 235 | ApupExitOnFailure(hr, "Failed to allocate upgrade id."); |
| 236 | 236 | ||
| 237 | for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) | 237 | for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) |
| 238 | { | 238 | { |
| 239 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"version", -1)) | 239 | if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"version", -1, FALSE)) |
| 240 | { | 240 | { |
| 241 | hr = VerParseVersion(pAttribute->wzValue, 0, FALSE, &pApupEntry->pUpgradeVersion); | 241 | hr = VerParseVersion(pAttribute->wzValue, 0, FALSE, &pApupEntry->pUpgradeVersion); |
| 242 | ApupExitOnFailure(hr, "Failed to parse upgrade version string '%ls' from ATOM entry.", pAttribute->wzValue); | 242 | ApupExitOnFailure(hr, "Failed to parse upgrade version string '%ls' from ATOM entry.", pAttribute->wzValue); |
| 243 | } | 243 | } |
| 244 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzAttribute, -1, L"exclusive", -1)) | 244 | else if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzAttribute, -1, L"exclusive", -1, FALSE)) |
| 245 | { | 245 | { |
| 246 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pAttribute->wzValue, -1, L"true", -1)) | 246 | if (CSTR_EQUAL == ::CompareStringOrdinal(pAttribute->wzValue, -1, L"true", -1, FALSE)) |
| 247 | { | 247 | { |
| 248 | pApupEntry->fUpgradeExclusive = TRUE; | 248 | pApupEntry->fUpgradeExclusive = TRUE; |
| 249 | } | 249 | } |
| 250 | } | 250 | } |
| 251 | } | 251 | } |
| 252 | } | 252 | } |
| 253 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzElement, -1, L"version", -1)) | 253 | else if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzElement, -1, L"version", -1, FALSE)) |
| 254 | { | 254 | { |
| 255 | hr = VerParseVersion(pElement->wzValue, 0, FALSE, &pApupEntry->pVersion); | 255 | hr = VerParseVersion(pElement->wzValue, 0, FALSE, &pApupEntry->pVersion); |
| 256 | ApupExitOnFailure(hr, "Failed to parse version string '%ls' from ATOM entry.", pElement->wzValue); | 256 | ApupExitOnFailure(hr, "Failed to parse version string '%ls' from ATOM entry.", pElement->wzValue); |
| @@ -309,7 +309,7 @@ static HRESULT ProcessEntry( | |||
| 309 | for (DWORD i = 0; i < pAtomEntry->cLinks; ++i) | 309 | for (DWORD i = 0; i < pAtomEntry->cLinks; ++i) |
| 310 | { | 310 | { |
| 311 | ATOM_LINK* pLink = pAtomEntry->rgLinks + i; | 311 | ATOM_LINK* pLink = pAtomEntry->rgLinks + i; |
| 312 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pLink->wzRel, -1, L"enclosure", -1)) | 312 | if (CSTR_EQUAL == ::CompareStringOrdinal(pLink->wzRel, -1, L"enclosure", -1, FALSE)) |
| 313 | { | 313 | { |
| 314 | hr = ParseEnclosure(pLink, pApupEntry->rgEnclosures + pApupEntry->cEnclosures); | 314 | hr = ParseEnclosure(pLink, pApupEntry->rgEnclosures + pApupEntry->cEnclosures); |
| 315 | ApupExitOnFailure(hr, "Failed to parse enclosure."); | 315 | ApupExitOnFailure(hr, "Failed to parse enclosure."); |
| @@ -344,15 +344,15 @@ static HRESULT ParseEnclosure( | |||
| 344 | // First search the ATOM link's custom elements to try and find the application update enclosure information. | 344 | // First search the ATOM link's custom elements to try and find the application update enclosure information. |
| 345 | for (ATOM_UNKNOWN_ELEMENT* pElement = pLink->pUnknownElements; pElement; pElement = pElement->pNext) | 345 | for (ATOM_UNKNOWN_ELEMENT* pElement = pLink->pUnknownElements; pElement; pElement = pElement->pNext) |
| 346 | { | 346 | { |
| 347 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1)) | 347 | if (CSTR_EQUAL == ::CompareStringOrdinal(pElement->wzNamespace, -1, APPLICATION_SYNDICATION_NAMESPACE, -1, FALSE)) |
| 348 | { | 348 | { |
| 349 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"digest", -1, pElement->wzElement, -1)) | 349 | if (CSTR_EQUAL == ::CompareStringOrdinal(L"digest", -1, pElement->wzElement, -1, FALSE)) |
| 350 | { | 350 | { |
| 351 | // Find the digest[@algorithm] which is required. Everything else is ignored. | 351 | // Find the digest[@algorithm] which is required. Everything else is ignored. |
| 352 | for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) | 352 | for (ATOM_UNKNOWN_ATTRIBUTE* pAttribute = pElement->pAttributes; pAttribute; pAttribute = pAttribute->pNext) |
| 353 | { | 353 | { |
| 354 | dwDigestLength = 0; | 354 | dwDigestLength = 0; |
| 355 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"algorithm", -1, pAttribute->wzAttribute, -1)) | 355 | if (CSTR_EQUAL == ::CompareStringOrdinal(L"algorithm", -1, pAttribute->wzAttribute, -1, FALSE)) |
| 356 | { | 356 | { |
| 357 | if (CSTR_EQUAL == ::CompareStringOrdinal(L"md5", -1, pAttribute->wzValue, -1, TRUE)) | 357 | if (CSTR_EQUAL == ::CompareStringOrdinal(L"md5", -1, pAttribute->wzValue, -1, TRUE)) |
| 358 | { | 358 | { |
| @@ -406,7 +406,7 @@ static HRESULT ParseEnclosure( | |||
| 406 | 406 | ||
| 407 | break; | 407 | break; |
| 408 | } | 408 | } |
| 409 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, L"name", -1, pElement->wzElement, -1)) | 409 | else if (CSTR_EQUAL == ::CompareStringOrdinal(L"name", -1, pElement->wzElement, -1, FALSE)) |
| 410 | { | 410 | { |
| 411 | hr = StrAllocString(&pEnclosure->wzLocalName, pElement->wzValue, 0); | 411 | hr = StrAllocString(&pEnclosure->wzLocalName, pElement->wzValue, 0); |
| 412 | ApupExitOnFailure(hr, "Failed to copy local name."); | 412 | ApupExitOnFailure(hr, "Failed to copy local name."); |
