diff options
| author | Rob Mensching <rob@firegiant.com> | 2024-01-11 18:26:20 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2024-03-06 18:03:38 -0800 |
| commit | 0d3d54992104288e9ee0c834d0b96e8502fd2d42 (patch) | |
| tree | 9efa49c4983cd2ba1becab64bd1f2faccac88acf /src/libs/dutil/WixToolset.DUtil/strutil.cpp | |
| parent | 2824298d9dd817a47527c920363556b54ead5d5d (diff) | |
| download | wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.gz wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.bz2 wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.zip | |
Move the BootstrapperApplication out of proc
Diffstat (limited to '')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/strutil.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/strutil.cpp b/src/libs/dutil/WixToolset.DUtil/strutil.cpp index a483cf54..0a00c690 100644 --- a/src/libs/dutil/WixToolset.DUtil/strutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/strutil.cpp | |||
| @@ -80,7 +80,7 @@ extern "C" HRESULT DAPI StrAllocSecure( | |||
| 80 | 80 | ||
| 81 | /******************************************************************** | 81 | /******************************************************************** |
| 82 | AllocHelper - allocates or reuses dynamic string memory | 82 | AllocHelper - allocates or reuses dynamic string memory |
| 83 | If fZeroOnRealloc is true and the memory needs to reallocated, | 83 | If fZeroOnRealloc is true and the memory needs to reallocated, |
| 84 | calls SecureZeroMemory on original block of memory after it is moved. | 84 | calls SecureZeroMemory on original block of memory after it is moved. |
| 85 | 85 | ||
| 86 | NOTE: caller is responsible for freeing ppwz even if function fails | 86 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -350,8 +350,8 @@ extern "C" HRESULT DAPI StrAllocString( | |||
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | /******************************************************************** | 352 | /******************************************************************** |
| 353 | StrAllocStringSecure - allocates or reuses dynamic string memory and | 353 | StrAllocStringSecure - allocates or reuses dynamic string memory and |
| 354 | copies in an existing string. If the memory needs to reallocated, | 354 | copies in an existing string. If the memory needs to reallocated, |
| 355 | calls SecureZeroMemory on original block of memory after it is moved. | 355 | calls SecureZeroMemory on original block of memory after it is moved. |
| 356 | 356 | ||
| 357 | NOTE: caller is responsible for freeing ppwz even if function fails | 357 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -369,7 +369,7 @@ extern "C" HRESULT DAPI StrAllocStringSecure( | |||
| 369 | 369 | ||
| 370 | /******************************************************************** | 370 | /******************************************************************** |
| 371 | AllocStringHelper - allocates or reuses dynamic string memory and copies in an existing string | 371 | AllocStringHelper - allocates or reuses dynamic string memory and copies in an existing string |
| 372 | If fZeroOnRealloc is true and the memory needs to reallocated, | 372 | If fZeroOnRealloc is true and the memory needs to reallocated, |
| 373 | calls SecureZeroMemory on original block of memory after it is moved. | 373 | calls SecureZeroMemory on original block of memory after it is moved. |
| 374 | 374 | ||
| 375 | NOTE: caller is responsible for freeing ppwz even if function fails | 375 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -623,7 +623,7 @@ LExit: | |||
| 623 | 623 | ||
| 624 | 624 | ||
| 625 | /******************************************************************** | 625 | /******************************************************************** |
| 626 | StrAllocPrefix - allocates or reuses dynamic string memory and | 626 | StrAllocPrefix - allocates or reuses dynamic string memory and |
| 627 | prefixes a string | 627 | prefixes a string |
| 628 | 628 | ||
| 629 | NOTE: caller is responsible for freeing ppwz even if function fails | 629 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -703,8 +703,8 @@ extern "C" HRESULT DAPI StrAllocConcat( | |||
| 703 | 703 | ||
| 704 | 704 | ||
| 705 | /******************************************************************** | 705 | /******************************************************************** |
| 706 | StrAllocConcatSecure - allocates or reuses dynamic string memory and | 706 | StrAllocConcatSecure - allocates or reuses dynamic string memory and |
| 707 | adds an existing string. If the memory needs to reallocated, calls | 707 | adds an existing string. If the memory needs to reallocated, calls |
| 708 | SecureZeroMemory on the original block of memory after it is moved. | 708 | SecureZeroMemory on the original block of memory after it is moved. |
| 709 | 709 | ||
| 710 | NOTE: caller is responsible for freeing ppwz even if function fails | 710 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -723,7 +723,7 @@ extern "C" HRESULT DAPI StrAllocConcatSecure( | |||
| 723 | 723 | ||
| 724 | /******************************************************************** | 724 | /******************************************************************** |
| 725 | AllocConcatHelper - allocates or reuses dynamic string memory and adds an existing string | 725 | AllocConcatHelper - allocates or reuses dynamic string memory and adds an existing string |
| 726 | If fZeroOnRealloc is true and the memory needs to reallocated, | 726 | If fZeroOnRealloc is true and the memory needs to reallocated, |
| 727 | calls SecureZeroMemory on original block of memory after it is moved. | 727 | calls SecureZeroMemory on original block of memory after it is moved. |
| 728 | 728 | ||
| 729 | NOTE: caller is responsible for freeing ppwz even if function fails | 729 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -940,7 +940,7 @@ LExit: | |||
| 940 | 940 | ||
| 941 | 941 | ||
| 942 | /******************************************************************** | 942 | /******************************************************************** |
| 943 | StrAllocFormattedSecure - allocates or reuses dynamic string memory | 943 | StrAllocFormattedSecure - allocates or reuses dynamic string memory |
| 944 | and formats it. If the memory needs to be reallocated, | 944 | and formats it. If the memory needs to be reallocated, |
| 945 | calls SecureZeroMemory on original block of memory after it is moved. | 945 | calls SecureZeroMemory on original block of memory after it is moved. |
| 946 | 946 | ||
| @@ -990,7 +990,7 @@ extern "C" HRESULT DAPI StrAnsiAllocFormatted( | |||
| 990 | 990 | ||
| 991 | 991 | ||
| 992 | /******************************************************************** | 992 | /******************************************************************** |
| 993 | StrAllocFormattedArgs - allocates or reuses dynamic string memory | 993 | StrAllocFormattedArgs - allocates or reuses dynamic string memory |
| 994 | and formats it with the passed in args | 994 | and formats it with the passed in args |
| 995 | 995 | ||
| 996 | NOTE: caller is responsible for freeing ppwz even if function fails | 996 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -1009,7 +1009,7 @@ extern "C" HRESULT DAPI StrAllocFormattedArgs( | |||
| 1009 | StrAllocFormattedArgsSecure - allocates or reuses dynamic string memory | 1009 | StrAllocFormattedArgsSecure - allocates or reuses dynamic string memory |
| 1010 | and formats it with the passed in args. | 1010 | and formats it with the passed in args. |
| 1011 | 1011 | ||
| 1012 | If the memory needs to reallocated, calls SecureZeroMemory on the | 1012 | If the memory needs to reallocated, calls SecureZeroMemory on the |
| 1013 | original block of memory after it is moved. | 1013 | original block of memory after it is moved. |
| 1014 | 1014 | ||
| 1015 | NOTE: caller is responsible for freeing ppwz even if function fails | 1015 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -1028,7 +1028,7 @@ extern "C" HRESULT DAPI StrAllocFormattedArgsSecure( | |||
| 1028 | AllocFormattedArgsHelper - allocates or reuses dynamic string memory | 1028 | AllocFormattedArgsHelper - allocates or reuses dynamic string memory |
| 1029 | and formats it with the passed in args. | 1029 | and formats it with the passed in args. |
| 1030 | 1030 | ||
| 1031 | If fZeroOnRealloc is true and the memory needs to reallocated, | 1031 | If fZeroOnRealloc is true and the memory needs to reallocated, |
| 1032 | calls SecureZeroMemory on original block of memory after it is moved. | 1032 | calls SecureZeroMemory on original block of memory after it is moved. |
| 1033 | 1033 | ||
| 1034 | NOTE: caller is responsible for freeing ppwz even if function fails | 1034 | NOTE: caller is responsible for freeing ppwz even if function fails |
| @@ -1108,7 +1108,7 @@ LExit: | |||
| 1108 | 1108 | ||
| 1109 | 1109 | ||
| 1110 | /******************************************************************** | 1110 | /******************************************************************** |
| 1111 | StrAnsiAllocFormattedArgs - allocates or reuses dynamic ANSI string memory | 1111 | StrAnsiAllocFormattedArgs - allocates or reuses dynamic ANSI string memory |
| 1112 | and formats it with the passed in args | 1112 | and formats it with the passed in args |
| 1113 | 1113 | ||
| 1114 | NOTE: caller is responsible for freeing ppsz even if function fails | 1114 | NOTE: caller is responsible for freeing ppsz even if function fails |
| @@ -1946,7 +1946,7 @@ extern "C" HRESULT DAPI MultiSzPrepend( | |||
| 1946 | // Allocate the result buffer | 1946 | // Allocate the result buffer |
| 1947 | hr = StrAlloc(&pwzResult, cchResult + 1); | 1947 | hr = StrAlloc(&pwzResult, cchResult + 1); |
| 1948 | StrExitOnFailure(hr, "failed to allocate result string"); | 1948 | StrExitOnFailure(hr, "failed to allocate result string"); |
| 1949 | 1949 | ||
| 1950 | // Prepend | 1950 | // Prepend |
| 1951 | hr = ::StringCchCopyW(pwzResult, cchResult, pwzInsert); | 1951 | hr = ::StringCchCopyW(pwzResult, cchResult, pwzInsert); |
| 1952 | StrExitOnRootFailure(hr, "failed to copy prepend string: %ls", pwzInsert); | 1952 | StrExitOnRootFailure(hr, "failed to copy prepend string: %ls", pwzInsert); |
| @@ -2395,7 +2395,7 @@ extern "C" HRESULT DAPI StrStringToUInt16( | |||
| 2395 | ULONGLONG ull = 0; | 2395 | ULONGLONG ull = 0; |
| 2396 | 2396 | ||
| 2397 | hr = StrStringToUInt64(wzIn, cchIn, &ull); | 2397 | hr = StrStringToUInt64(wzIn, cchIn, &ull); |
| 2398 | StrExitOnFailure(hr, "Failed to parse uint64."); | 2398 | StrExitOnFailure(hr, "Failed to parse uint64 to convert to uint16."); |
| 2399 | 2399 | ||
| 2400 | if (USHORT_MAX < ull) | 2400 | if (USHORT_MAX < ull) |
| 2401 | { | 2401 | { |
| @@ -2447,7 +2447,7 @@ extern "C" HRESULT DAPI StrStringToUInt32( | |||
| 2447 | ULONGLONG ull = 0; | 2447 | ULONGLONG ull = 0; |
| 2448 | 2448 | ||
| 2449 | hr = StrStringToUInt64(wzIn, cchIn, &ull); | 2449 | hr = StrStringToUInt64(wzIn, cchIn, &ull); |
| 2450 | StrExitOnFailure(hr, "Failed to parse uint64."); | 2450 | StrExitOnFailure(hr, "Failed to parse uint64 to convert to uint32."); |
| 2451 | 2451 | ||
| 2452 | if (UINT_MAX < ull) | 2452 | if (UINT_MAX < ull) |
| 2453 | { | 2453 | { |
