@joebigelow / wix / commits / 8a8a2569

Clean up 32-bit assumptions.

Sean Hall committed Apr 28, 2021 at 18:30 UTC 8a8a25695351ee542f08886a9d0957c78c6af366
6 files changed +12 -20
global.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "msbuild-sdks": {
3 - "WixToolset.Sdk": "4.0.0-build-0212"
3 + "WixToolset.Sdk": "4.0.0-build-0213"
4 },
5 "sdk": {
6 "allowPrerelease": false
src/be/utilbe.vcxproj
+3 -3
@@ -69,9 +69,9 @@
69 </ItemGroup>
70
71 <ItemGroup>
72 - <PackageReference Include="WixToolset.BextUtil" Version="4.0.55" />
73 - <PackageReference Include="WixToolset.BootstrapperCore.Native" Version="4.0.110" />
74 - <PackageReference Include="WixToolset.DUtil" Version="4.0.70" />
72 + <PackageReference Include="WixToolset.BextUtil" Version="4.0.58" />
73 + <PackageReference Include="WixToolset.BootstrapperCore.Native" Version="4.0.141" />
74 + <PackageReference Include="WixToolset.DUtil" Version="4.0.72" />
75 <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
76 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" />
77 </ItemGroup>
src/ca/FormatFiles.cpp
+1 -1
@@ -203,7 +203,7 @@ extern "C" UINT __stdcall WixExecFormatFiles(
203 hr = FileGetTime(sczFilePath, NULL, NULL, &filetime);
204 ExitOnFailure(hr, "Failed to get modified time of file : %ls", sczFilePath);
205
206 - hr = FileWrite(sczFilePath, FILE_ATTRIBUTE_NORMAL, pbData, static_cast<DWORD>(cbData), NULL);
206 + hr = FileWrite(sczFilePath, FILE_ATTRIBUTE_NORMAL, pbData, cbData, NULL);
207 ExitOnFailure(hr, "Failed to write file content: %ls", sczFilePath);
208
209 hr = FileSetTime(sczFilePath, NULL, NULL, &filetime);
src/ca/XmlConfig.cpp
+3 -8
@@ -171,7 +171,7 @@ static HRESULT ReadXmlConfigTable(
171 ExitOnFailure(hr, "failed to get component name for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId);
172
173 // Get the component's state
174 - if (0 < lstrlenW(pwzData))
174 + if (pwzData && *pwzData)
175 {
176 hr = StringCchCopyW((*ppxfcTail)->wzComponent, countof((*ppxfcTail)->wzComponent), pwzData);
177 ExitOnFailure(hr, "failed to copy component id");
@@ -1041,7 +1041,6 @@ extern "C" UINT __stdcall ExecXmlConfigRollback(
1041 LPWSTR pwzFileName = NULL;
1042 LPBYTE pbData = NULL;
1043 DWORD_PTR cbData = 0;
1044 - DWORD cbDataWritten = 0;
1044
1045 FILETIME ft;
1046
@@ -1099,12 +1098,8 @@ extern "C" UINT __stdcall ExecXmlConfigRollback(
1098 ExitOnInvalidHandleWithLastError(hFile, hr, "failed to open file: %ls", pwzFileName);
1099
1100 // Write out the old data
1102 - if (!::WriteFile(hFile, pbData, (DWORD)cbData, &cbDataWritten, NULL))
1103 - {
1104 - ExitOnLastError(hr, "failed to write to file: %ls", pwzFileName);
1105 - }
1106 -
1107 - Assert(cbData == cbDataWritten);
1101 + hr = FileWriteHandle(hFile, pbData, cbData);
1102 + ExitOnFailure(hr, "failed to write to file: %ls", pwzFileName);
1103
1104 ReleaseFile(hFile);
1105
src/ca/XmlFile.cpp
+2 -5
@@ -854,7 +854,6 @@ extern "C" UINT __stdcall ExecXmlFileRollback(
854 LPWSTR pwzFileName = NULL;
855 LPBYTE pbData = NULL;
856 DWORD_PTR cbData = 0;
857 - DWORD cbDataWritten = 0;
857
858 FILETIME ft;
859
@@ -913,10 +912,8 @@ extern "C" UINT __stdcall ExecXmlFileRollback(
912 ExitOnInvalidHandleWithLastError(hFile, hr, "failed to open file: %ls", pwzFileName);
913
914 // Write out the old data
916 - if (!::WriteFile(hFile, pbData, (DWORD)cbData, &cbDataWritten, NULL))
917 - ExitOnLastError(hr, "failed to write to file: %ls", pwzFileName);
918 -
919 - Assert(cbData == cbDataWritten);
915 + hr = FileWriteHandle(hFile, pbData, cbData);
916 + ExitOnFailure(hr, "failed to write to file: %ls", pwzFileName);
917
918 ReleaseFile(hFile);
919
src/ca/utilca.vcxproj
+2 -2
@@ -96,8 +96,8 @@
96 </ItemGroup>
97
98 <ItemGroup>
99 - <PackageReference Include="WixToolset.Dutil" Version="4.0.70" />
100 - <PackageReference Include="WixToolset.WcaUtil" Version="4.0.18" />
99 + <PackageReference Include="WixToolset.Dutil" Version="4.0.72" />
100 + <PackageReference Include="WixToolset.WcaUtil" Version="4.0.19" />
101 <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
102 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" />
103 </ItemGroup>