diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-28 16:43:01 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-29 14:05:34 -0500 |
commit | e78138558fe17d8a91929c87b2a6d0c9a482d78a (patch) | |
tree | 40c0c61217a4b42ab1bf40470923cade6a3a08b0 | |
parent | 14cdda3c489d6b9801f05939044e67b13939b42d (diff) | |
download | wix-e78138558fe17d8a91929c87b2a6d0c9a482d78a.tar.gz wix-e78138558fe17d8a91929c87b2a6d0c9a482d78a.tar.bz2 wix-e78138558fe17d8a91929c87b2a6d0c9a482d78a.zip |
Clean up 32-bit assumptions.
-rw-r--r-- | src/engine/cache.cpp | 12 | ||||
-rw-r--r-- | src/engine/condition.cpp | 24 | ||||
-rw-r--r-- | src/engine/core.cpp | 9 | ||||
-rw-r--r-- | src/engine/elevation.cpp | 90 | ||||
-rw-r--r-- | src/engine/embedded.cpp | 8 | ||||
-rw-r--r-- | src/engine/engine.cpp | 9 | ||||
-rw-r--r-- | src/engine/engine.vcxproj | 4 | ||||
-rw-r--r-- | src/engine/exeengine.cpp | 2 | ||||
-rw-r--r-- | src/engine/logging.cpp | 6 | ||||
-rw-r--r-- | src/engine/packages.config | 2 | ||||
-rw-r--r-- | src/engine/pipe.cpp | 105 | ||||
-rw-r--r-- | src/engine/pipe.h | 2 | ||||
-rw-r--r-- | src/engine/variable.cpp | 2 | ||||
-rw-r--r-- | src/stub/packages.config | 2 | ||||
-rw-r--r-- | src/stub/stub.vcxproj | 4 | ||||
-rw-r--r-- | src/test/BurnUnitTest/BurnUnitTest.vcxproj | 16 | ||||
-rw-r--r-- | src/test/BurnUnitTest/packages.config | 6 |
17 files changed, 139 insertions, 164 deletions
diff --git a/src/engine/cache.cpp b/src/engine/cache.cpp index fcc7f72d..59daf139 100644 --- a/src/engine/cache.cpp +++ b/src/engine/cache.cpp | |||
@@ -1119,7 +1119,7 @@ extern "C" void CacheCleanup( | |||
1119 | LPWSTR sczDelete = NULL; | 1119 | LPWSTR sczDelete = NULL; |
1120 | HANDLE hFind = INVALID_HANDLE_VALUE; | 1120 | HANDLE hFind = INVALID_HANDLE_VALUE; |
1121 | WIN32_FIND_DATAW wfd = { }; | 1121 | WIN32_FIND_DATAW wfd = { }; |
1122 | DWORD cFileName = 0; | 1122 | size_t cchFileName = 0; |
1123 | 1123 | ||
1124 | hr = CacheGetCompletedPath(fPerMachine, UNVERIFIED_CACHE_FOLDER_NAME, &sczFolder); | 1124 | hr = CacheGetCompletedPath(fPerMachine, UNVERIFIED_CACHE_FOLDER_NAME, &sczFolder); |
1125 | if (SUCCEEDED(hr)) | 1125 | if (SUCCEEDED(hr)) |
@@ -1146,17 +1146,15 @@ extern "C" void CacheCleanup( | |||
1146 | continue; | 1146 | continue; |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | // For extra safety and to silence OACR. | ||
1150 | wfd.cFileName[MAX_PATH - 1] = L'\0'; | ||
1151 | |||
1152 | // Skip resume files (they end with ".R"). | 1149 | // Skip resume files (they end with ".R"). |
1153 | cFileName = lstrlenW(wfd.cFileName); | 1150 | hr = ::StringCchLengthW(wfd.cFileName, MAX_PATH, &cchFileName); |
1154 | if (2 < cFileName && L'.' == wfd.cFileName[cFileName - 2] && (L'R' == wfd.cFileName[cFileName - 1] || L'r' == wfd.cFileName[cFileName - 1])) | 1151 | if (FAILED(hr) || |
1152 | 2 < cchFileName && L'.' == wfd.cFileName[cchFileName - 2] && (L'R' == wfd.cFileName[cchFileName - 1] || L'r' == wfd.cFileName[cchFileName - 1])) | ||
1155 | { | 1153 | { |
1156 | continue; | 1154 | continue; |
1157 | } | 1155 | } |
1158 | 1156 | ||
1159 | hr = PathConcat(sczFolder, wfd.cFileName, &sczDelete); | 1157 | hr = PathConcatCch(sczFolder, 0, wfd.cFileName, cchFileName, &sczDelete); |
1160 | if (SUCCEEDED(hr)) | 1158 | if (SUCCEEDED(hr)) |
1161 | { | 1159 | { |
1162 | hr = FileEnsureDelete(sczDelete); | 1160 | hr = FileEnsureDelete(sczDelete); |
diff --git a/src/engine/condition.cpp b/src/engine/condition.cpp index 56fe76c2..b7cd7413 100644 --- a/src/engine/condition.cpp +++ b/src/engine/condition.cpp | |||
@@ -513,6 +513,7 @@ static HRESULT NextSymbol( | |||
513 | { | 513 | { |
514 | HRESULT hr = S_OK; | 514 | HRESULT hr = S_OK; |
515 | WORD charType = 0; | 515 | WORD charType = 0; |
516 | ptrdiff_t cchPosition = 0; | ||
516 | DWORD iPosition = 0; | 517 | DWORD iPosition = 0; |
517 | DWORD n = 0; | 518 | DWORD n = 0; |
518 | 519 | ||
@@ -530,7 +531,13 @@ static HRESULT NextSymbol( | |||
530 | } | 531 | } |
531 | ++pContext->wzRead; | 532 | ++pContext->wzRead; |
532 | } | 533 | } |
533 | iPosition = (DWORD)(pContext->wzRead - pContext->wzCondition); | 534 | |
535 | cchPosition = pContext->wzRead - pContext->wzCondition; | ||
536 | if (DWORD_MAX < cchPosition || 0 > cchPosition) | ||
537 | { | ||
538 | ExitOnFailure(hr = E_INVALIDARG, "Symbol was too long: %ls", pContext->wzCondition); | ||
539 | } | ||
540 | iPosition = (DWORD)cchPosition; | ||
534 | 541 | ||
535 | // read depending on first character type | 542 | // read depending on first character type |
536 | switch (pContext->wzRead[0]) | 543 | switch (pContext->wzRead[0]) |
@@ -922,8 +929,19 @@ static HRESULT CompareStringValues( | |||
922 | { | 929 | { |
923 | HRESULT hr = S_OK; | 930 | HRESULT hr = S_OK; |
924 | DWORD dwCompareString = (comparison & INSENSITIVE) ? NORM_IGNORECASE : 0; | 931 | DWORD dwCompareString = (comparison & INSENSITIVE) ? NORM_IGNORECASE : 0; |
925 | int cchLeft = lstrlenW(wzLeftOperand); | 932 | size_t cchLeftSize = 0; |
926 | int cchRight = lstrlenW(wzRightOperand); | 933 | size_t cchRightSize = 0; |
934 | int cchLeft = 0; | ||
935 | int cchRight = 0; | ||
936 | |||
937 | hr = ::StringCchLengthW(wzLeftOperand, STRSAFE_MAX_CCH, &cchLeftSize); | ||
938 | ExitOnRootFailure(hr, "Failed to get length of left string: %ls", wzLeftOperand); | ||
939 | |||
940 | hr = ::StringCchLengthW(wzRightOperand, STRSAFE_MAX_CCH, &cchRightSize); | ||
941 | ExitOnRootFailure(hr, "Failed to get length of right string: %ls", wzRightOperand); | ||
942 | |||
943 | cchLeft = static_cast<int>(cchLeftSize); | ||
944 | cchRight = static_cast<int>(cchRightSize); | ||
927 | 945 | ||
928 | switch (comparison) | 946 | switch (comparison) |
929 | { | 947 | { |
diff --git a/src/engine/core.cpp b/src/engine/core.cpp index 969b94a0..a915dad0 100644 --- a/src/engine/core.cpp +++ b/src/engine/core.cpp | |||
@@ -1050,7 +1050,7 @@ extern "C" HRESULT CoreAppendFileHandleAttachedToCommandLine( | |||
1050 | ExitWithLastError(hr, "Failed to duplicate file handle for attached container."); | 1050 | ExitWithLastError(hr, "Failed to duplicate file handle for attached container."); |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | hr = StrAllocFormattedSecure(psczCommandLine, L"%ls -%ls=%u", *psczCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_ATTACHED, hExecutableFile); | 1053 | hr = StrAllocFormattedSecure(psczCommandLine, L"%ls -%ls=%Iu", *psczCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_ATTACHED, reinterpret_cast<size_t>(hExecutableFile)); |
1054 | ExitOnFailure(hr, "Failed to append the file handle to the command line."); | 1054 | ExitOnFailure(hr, "Failed to append the file handle to the command line."); |
1055 | 1055 | ||
1056 | *phExecutableFile = hExecutableFile; | 1056 | *phExecutableFile = hExecutableFile; |
@@ -1078,12 +1078,12 @@ extern "C" HRESULT CoreAppendFileHandleSelfToCommandLine( | |||
1078 | hExecutableFile = ::CreateFileW(wzExecutablePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, &securityAttributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); | 1078 | hExecutableFile = ::CreateFileW(wzExecutablePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, &securityAttributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); |
1079 | if (INVALID_HANDLE_VALUE != hExecutableFile) | 1079 | if (INVALID_HANDLE_VALUE != hExecutableFile) |
1080 | { | 1080 | { |
1081 | hr = StrAllocFormattedSecure(psczCommandLine, L"%ls -%ls=%u", *psczCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, hExecutableFile); | 1081 | hr = StrAllocFormattedSecure(psczCommandLine, L"%ls -%ls=%Iu", *psczCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, reinterpret_cast<size_t>(hExecutableFile)); |
1082 | ExitOnFailure(hr, "Failed to append the file handle to the command line."); | 1082 | ExitOnFailure(hr, "Failed to append the file handle to the command line."); |
1083 | 1083 | ||
1084 | if (psczObfuscatedCommandLine) | 1084 | if (psczObfuscatedCommandLine) |
1085 | { | 1085 | { |
1086 | hr = StrAllocFormatted(psczObfuscatedCommandLine, L"%ls -%ls=%u", *psczObfuscatedCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, hExecutableFile); | 1086 | hr = StrAllocFormatted(psczObfuscatedCommandLine, L"%ls -%ls=%Iu", *psczObfuscatedCommandLine, BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, reinterpret_cast<size_t>(hExecutableFile)); |
1087 | ExitOnFailure(hr, "Failed to append the file handle to the obfuscated command line."); | 1087 | ExitOnFailure(hr, "Failed to append the file handle to the obfuscated command line."); |
1088 | } | 1088 | } |
1089 | 1089 | ||
@@ -1499,8 +1499,7 @@ static HRESULT ParseCommandLine( | |||
1499 | { | 1499 | { |
1500 | // Already processed in InitializeEngineState. | 1500 | // Already processed in InitializeEngineState. |
1501 | } | 1501 | } |
1502 | else if (lstrlenW(&argv[i][1]) >= lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX) && | 1502 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX), BURN_COMMANDLINE_SWITCH_PREFIX, lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX))) |
1503 | CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX), BURN_COMMANDLINE_SWITCH_PREFIX, lstrlenW(BURN_COMMANDLINE_SWITCH_PREFIX))) | ||
1504 | { | 1503 | { |
1505 | // Skip (but log) any other private burn switches we don't recognize, so that | 1504 | // Skip (but log) any other private burn switches we don't recognize, so that |
1506 | // adding future private variables doesn't break old bundles | 1505 | // adding future private variables doesn't break old bundles |
diff --git a/src/engine/elevation.cpp b/src/engine/elevation.cpp index 3a448923..9d1b8fc7 100644 --- a/src/engine/elevation.cpp +++ b/src/engine/elevation.cpp | |||
@@ -157,7 +157,7 @@ static HRESULT OnApplyInitialize( | |||
157 | __in HANDLE* phLock, | 157 | __in HANDLE* phLock, |
158 | __in BOOL* pfDisabledWindowsUpdate, | 158 | __in BOOL* pfDisabledWindowsUpdate, |
159 | __in BYTE* pbData, | 159 | __in BYTE* pbData, |
160 | __in DWORD cbData | 160 | __in SIZE_T cbData |
161 | ); | 161 | ); |
162 | static HRESULT OnApplyUninitialize( | 162 | static HRESULT OnApplyUninitialize( |
163 | __in HANDLE* phLock | 163 | __in HANDLE* phLock |
@@ -166,39 +166,39 @@ static HRESULT OnSessionBegin( | |||
166 | __in BURN_REGISTRATION* pRegistration, | 166 | __in BURN_REGISTRATION* pRegistration, |
167 | __in BURN_VARIABLES* pVariables, | 167 | __in BURN_VARIABLES* pVariables, |
168 | __in BYTE* pbData, | 168 | __in BYTE* pbData, |
169 | __in DWORD cbData | 169 | __in SIZE_T cbData |
170 | ); | 170 | ); |
171 | static HRESULT OnSessionResume( | 171 | static HRESULT OnSessionResume( |
172 | __in BURN_REGISTRATION* pRegistration, | 172 | __in BURN_REGISTRATION* pRegistration, |
173 | __in BURN_VARIABLES* pVariables, | 173 | __in BURN_VARIABLES* pVariables, |
174 | __in BYTE* pbData, | 174 | __in BYTE* pbData, |
175 | __in DWORD cbData | 175 | __in SIZE_T cbData |
176 | ); | 176 | ); |
177 | static HRESULT OnSessionEnd( | 177 | static HRESULT OnSessionEnd( |
178 | __in BURN_PACKAGES* pPackages, | 178 | __in BURN_PACKAGES* pPackages, |
179 | __in BURN_REGISTRATION* pRegistration, | 179 | __in BURN_REGISTRATION* pRegistration, |
180 | __in BURN_VARIABLES* pVariables, | 180 | __in BURN_VARIABLES* pVariables, |
181 | __in BYTE* pbData, | 181 | __in BYTE* pbData, |
182 | __in DWORD cbData | 182 | __in SIZE_T cbData |
183 | ); | 183 | ); |
184 | static HRESULT OnSaveState( | 184 | static HRESULT OnSaveState( |
185 | __in BURN_REGISTRATION* pRegistration, | 185 | __in BURN_REGISTRATION* pRegistration, |
186 | __in BYTE* pbData, | 186 | __in BYTE* pbData, |
187 | __in DWORD cbData | 187 | __in SIZE_T cbData |
188 | ); | 188 | ); |
189 | static HRESULT OnCacheCompletePayload( | 189 | static HRESULT OnCacheCompletePayload( |
190 | __in HANDLE hPipe, | 190 | __in HANDLE hPipe, |
191 | __in BURN_PACKAGES* pPackages, | 191 | __in BURN_PACKAGES* pPackages, |
192 | __in BURN_PAYLOADS* pPayloads, | 192 | __in BURN_PAYLOADS* pPayloads, |
193 | __in BYTE* pbData, | 193 | __in BYTE* pbData, |
194 | __in DWORD cbData | 194 | __in SIZE_T cbData |
195 | ); | 195 | ); |
196 | static HRESULT OnCacheVerifyPayload( | 196 | static HRESULT OnCacheVerifyPayload( |
197 | __in HANDLE hPipe, | 197 | __in HANDLE hPipe, |
198 | __in BURN_PACKAGES* pPackages, | 198 | __in BURN_PACKAGES* pPackages, |
199 | __in BURN_PAYLOADS* pPayloads, | 199 | __in BURN_PAYLOADS* pPayloads, |
200 | __in BYTE* pbData, | 200 | __in BYTE* pbData, |
201 | __in DWORD cbData | 201 | __in SIZE_T cbData |
202 | ); | 202 | ); |
203 | static void OnCacheCleanup( | 203 | static void OnCacheCleanup( |
204 | __in_z LPCWSTR wzBundleId | 204 | __in_z LPCWSTR wzBundleId |
@@ -206,7 +206,7 @@ static void OnCacheCleanup( | |||
206 | static HRESULT OnProcessDependentRegistration( | 206 | static HRESULT OnProcessDependentRegistration( |
207 | __in const BURN_REGISTRATION* pRegistration, | 207 | __in const BURN_REGISTRATION* pRegistration, |
208 | __in BYTE* pbData, | 208 | __in BYTE* pbData, |
209 | __in DWORD cbData | 209 | __in SIZE_T cbData |
210 | ); | 210 | ); |
211 | static HRESULT OnExecuteExePackage( | 211 | static HRESULT OnExecuteExePackage( |
212 | __in HANDLE hPipe, | 212 | __in HANDLE hPipe, |
@@ -214,40 +214,40 @@ static HRESULT OnExecuteExePackage( | |||
214 | __in BURN_RELATED_BUNDLES* pRelatedBundles, | 214 | __in BURN_RELATED_BUNDLES* pRelatedBundles, |
215 | __in BURN_VARIABLES* pVariables, | 215 | __in BURN_VARIABLES* pVariables, |
216 | __in BYTE* pbData, | 216 | __in BYTE* pbData, |
217 | __in DWORD cbData | 217 | __in SIZE_T cbData |
218 | ); | 218 | ); |
219 | static HRESULT OnExecuteMsiPackage( | 219 | static HRESULT OnExecuteMsiPackage( |
220 | __in HANDLE hPipe, | 220 | __in HANDLE hPipe, |
221 | __in BURN_PACKAGES* pPackages, | 221 | __in BURN_PACKAGES* pPackages, |
222 | __in BURN_VARIABLES* pVariables, | 222 | __in BURN_VARIABLES* pVariables, |
223 | __in BYTE* pbData, | 223 | __in BYTE* pbData, |
224 | __in DWORD cbData | 224 | __in SIZE_T cbData |
225 | ); | 225 | ); |
226 | static HRESULT OnExecuteMspPackage( | 226 | static HRESULT OnExecuteMspPackage( |
227 | __in HANDLE hPipe, | 227 | __in HANDLE hPipe, |
228 | __in BURN_PACKAGES* pPackages, | 228 | __in BURN_PACKAGES* pPackages, |
229 | __in BURN_VARIABLES* pVariables, | 229 | __in BURN_VARIABLES* pVariables, |
230 | __in BYTE* pbData, | 230 | __in BYTE* pbData, |
231 | __in DWORD cbData | 231 | __in SIZE_T cbData |
232 | ); | 232 | ); |
233 | static HRESULT OnExecuteMsuPackage( | 233 | static HRESULT OnExecuteMsuPackage( |
234 | __in HANDLE hPipe, | 234 | __in HANDLE hPipe, |
235 | __in BURN_PACKAGES* pPackages, | 235 | __in BURN_PACKAGES* pPackages, |
236 | __in BURN_VARIABLES* pVariables, | 236 | __in BURN_VARIABLES* pVariables, |
237 | __in BYTE* pbData, | 237 | __in BYTE* pbData, |
238 | __in DWORD cbData | 238 | __in SIZE_T cbData |
239 | ); | 239 | ); |
240 | static HRESULT OnExecutePackageProviderAction( | 240 | static HRESULT OnExecutePackageProviderAction( |
241 | __in BURN_PACKAGES* pPackages, | 241 | __in BURN_PACKAGES* pPackages, |
242 | __in BURN_RELATED_BUNDLES* pRelatedBundles, | 242 | __in BURN_RELATED_BUNDLES* pRelatedBundles, |
243 | __in BYTE* pbData, | 243 | __in BYTE* pbData, |
244 | __in DWORD cbData | 244 | __in SIZE_T cbData |
245 | ); | 245 | ); |
246 | static HRESULT OnExecutePackageDependencyAction( | 246 | static HRESULT OnExecutePackageDependencyAction( |
247 | __in BURN_PACKAGES* pPackages, | 247 | __in BURN_PACKAGES* pPackages, |
248 | __in BURN_RELATED_BUNDLES* pRelatedBundles, | 248 | __in BURN_RELATED_BUNDLES* pRelatedBundles, |
249 | __in BYTE* pbData, | 249 | __in BYTE* pbData, |
250 | __in DWORD cbData | 250 | __in SIZE_T cbData |
251 | ); | 251 | ); |
252 | static HRESULT CALLBACK BurnCacheMessageHandler( | 252 | static HRESULT CALLBACK BurnCacheMessageHandler( |
253 | __in BURN_CACHE_MESSAGE* pMessage, | 253 | __in BURN_CACHE_MESSAGE* pMessage, |
@@ -275,29 +275,29 @@ static int MsiExecuteMessageHandler( | |||
275 | static HRESULT OnCleanPackage( | 275 | static HRESULT OnCleanPackage( |
276 | __in BURN_PACKAGES* pPackages, | 276 | __in BURN_PACKAGES* pPackages, |
277 | __in BYTE* pbData, | 277 | __in BYTE* pbData, |
278 | __in DWORD cbData | 278 | __in SIZE_T cbData |
279 | ); | 279 | ); |
280 | static HRESULT OnLaunchApprovedExe( | 280 | static HRESULT OnLaunchApprovedExe( |
281 | __in HANDLE hPipe, | 281 | __in HANDLE hPipe, |
282 | __in BURN_APPROVED_EXES* pApprovedExes, | 282 | __in BURN_APPROVED_EXES* pApprovedExes, |
283 | __in BURN_VARIABLES* pVariables, | 283 | __in BURN_VARIABLES* pVariables, |
284 | __in BYTE* pbData, | 284 | __in BYTE* pbData, |
285 | __in DWORD cbData | 285 | __in SIZE_T cbData |
286 | ); | 286 | ); |
287 | static HRESULT OnMsiBeginTransaction( | 287 | static HRESULT OnMsiBeginTransaction( |
288 | __in BURN_PACKAGES* pPackages, | 288 | __in BURN_PACKAGES* pPackages, |
289 | __in BYTE* pbData, | 289 | __in BYTE* pbData, |
290 | __in DWORD cbData | 290 | __in SIZE_T cbData |
291 | ); | 291 | ); |
292 | static HRESULT OnMsiCommitTransaction( | 292 | static HRESULT OnMsiCommitTransaction( |
293 | __in BURN_PACKAGES* pPackages, | 293 | __in BURN_PACKAGES* pPackages, |
294 | __in BYTE* pbData, | 294 | __in BYTE* pbData, |
295 | __in DWORD cbData | 295 | __in SIZE_T cbData |
296 | ); | 296 | ); |
297 | static HRESULT OnMsiRollbackTransaction( | 297 | static HRESULT OnMsiRollbackTransaction( |
298 | __in BURN_PACKAGES* pPackages, | 298 | __in BURN_PACKAGES* pPackages, |
299 | __in BYTE* pbData, | 299 | __in BYTE* pbData, |
300 | __in DWORD cbData | 300 | __in SIZE_T cbData |
301 | ); | 301 | ); |
302 | static HRESULT ElevatedOnPauseAUBegin( | 302 | static HRESULT ElevatedOnPauseAUBegin( |
303 | __in HANDLE hPipe | 303 | __in HANDLE hPipe |
@@ -603,7 +603,7 @@ HRESULT ElevationSaveState( | |||
603 | DWORD dwResult = 0; | 603 | DWORD dwResult = 0; |
604 | 604 | ||
605 | // send message | 605 | // send message |
606 | hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SAVE_STATE, pbBuffer, (DWORD)cbBuffer, NULL, NULL, &dwResult); | 606 | hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SAVE_STATE, pbBuffer, cbBuffer, NULL, NULL, &dwResult); |
607 | ExitOnFailure(hr, "Failed to send message to per-machine process."); | 607 | ExitOnFailure(hr, "Failed to send message to per-machine process."); |
608 | 608 | ||
609 | hr = (HRESULT)dwResult; | 609 | hr = (HRESULT)dwResult; |
@@ -858,6 +858,8 @@ extern "C" HRESULT ElevationMsiCommitTransaction( | |||
858 | hr = static_cast<HRESULT>(dwResult); | 858 | hr = static_cast<HRESULT>(dwResult); |
859 | 859 | ||
860 | LExit: | 860 | LExit: |
861 | ReleaseBuffer(pbData); | ||
862 | |||
861 | return hr; | 863 | return hr; |
862 | } | 864 | } |
863 | 865 | ||
@@ -884,6 +886,8 @@ extern "C" HRESULT ElevationMsiRollbackTransaction( | |||
884 | hr = static_cast<HRESULT>(dwResult); | 886 | hr = static_cast<HRESULT>(dwResult); |
885 | 887 | ||
886 | LExit: | 888 | LExit: |
889 | ReleaseBuffer(pbData); | ||
890 | |||
887 | return hr; | 891 | return hr; |
888 | } | 892 | } |
889 | 893 | ||
@@ -1612,7 +1616,7 @@ static HRESULT ProcessMsiPackageMessages( | |||
1612 | message.rgwzData = (LPCWSTR*)rgwzMsiData; | 1616 | message.rgwzData = (LPCWSTR*)rgwzMsiData; |
1613 | } | 1617 | } |
1614 | 1618 | ||
1615 | hr = BuffReadNumber((BYTE*)pMsg->pvData, pMsg->cbData, &iData, (DWORD*)&message.dwAllowedResults); | 1619 | hr = BuffReadNumber((BYTE*)pMsg->pvData, pMsg->cbData, &iData, &message.dwAllowedResults); |
1616 | ExitOnFailure(hr, "Failed to read UI flags."); | 1620 | ExitOnFailure(hr, "Failed to read UI flags."); |
1617 | 1621 | ||
1618 | // Process the rest of the message. | 1622 | // Process the rest of the message. |
@@ -1907,7 +1911,7 @@ static HRESULT OnApplyInitialize( | |||
1907 | __in HANDLE* phLock, | 1911 | __in HANDLE* phLock, |
1908 | __in BOOL* pfDisabledWindowsUpdate, | 1912 | __in BOOL* pfDisabledWindowsUpdate, |
1909 | __in BYTE* pbData, | 1913 | __in BYTE* pbData, |
1910 | __in DWORD cbData | 1914 | __in SIZE_T cbData |
1911 | ) | 1915 | ) |
1912 | { | 1916 | { |
1913 | HRESULT hr = S_OK; | 1917 | HRESULT hr = S_OK; |
@@ -2031,7 +2035,7 @@ static HRESULT OnSessionBegin( | |||
2031 | __in BURN_REGISTRATION* pRegistration, | 2035 | __in BURN_REGISTRATION* pRegistration, |
2032 | __in BURN_VARIABLES* pVariables, | 2036 | __in BURN_VARIABLES* pVariables, |
2033 | __in BYTE* pbData, | 2037 | __in BYTE* pbData, |
2034 | __in DWORD cbData | 2038 | __in SIZE_T cbData |
2035 | ) | 2039 | ) |
2036 | { | 2040 | { |
2037 | HRESULT hr = S_OK; | 2041 | HRESULT hr = S_OK; |
@@ -2077,7 +2081,7 @@ static HRESULT OnSessionResume( | |||
2077 | __in BURN_REGISTRATION* pRegistration, | 2081 | __in BURN_REGISTRATION* pRegistration, |
2078 | __in BURN_VARIABLES* pVariables, | 2082 | __in BURN_VARIABLES* pVariables, |
2079 | __in BYTE* pbData, | 2083 | __in BYTE* pbData, |
2080 | __in DWORD cbData | 2084 | __in SIZE_T cbData |
2081 | ) | 2085 | ) |
2082 | { | 2086 | { |
2083 | HRESULT hr = S_OK; | 2087 | HRESULT hr = S_OK; |
@@ -2106,7 +2110,7 @@ static HRESULT OnSessionEnd( | |||
2106 | __in BURN_REGISTRATION* pRegistration, | 2110 | __in BURN_REGISTRATION* pRegistration, |
2107 | __in BURN_VARIABLES* pVariables, | 2111 | __in BURN_VARIABLES* pVariables, |
2108 | __in BYTE* pbData, | 2112 | __in BYTE* pbData, |
2109 | __in DWORD cbData | 2113 | __in SIZE_T cbData |
2110 | ) | 2114 | ) |
2111 | { | 2115 | { |
2112 | HRESULT hr = S_OK; | 2116 | HRESULT hr = S_OK; |
@@ -2136,7 +2140,7 @@ LExit: | |||
2136 | static HRESULT OnSaveState( | 2140 | static HRESULT OnSaveState( |
2137 | __in BURN_REGISTRATION* pRegistration, | 2141 | __in BURN_REGISTRATION* pRegistration, |
2138 | __in BYTE* pbData, | 2142 | __in BYTE* pbData, |
2139 | __in DWORD cbData | 2143 | __in SIZE_T cbData |
2140 | ) | 2144 | ) |
2141 | { | 2145 | { |
2142 | HRESULT hr = S_OK; | 2146 | HRESULT hr = S_OK; |
@@ -2154,7 +2158,7 @@ static HRESULT OnCacheCompletePayload( | |||
2154 | __in BURN_PACKAGES* pPackages, | 2158 | __in BURN_PACKAGES* pPackages, |
2155 | __in BURN_PAYLOADS* pPayloads, | 2159 | __in BURN_PAYLOADS* pPayloads, |
2156 | __in BYTE* pbData, | 2160 | __in BYTE* pbData, |
2157 | __in DWORD cbData | 2161 | __in SIZE_T cbData |
2158 | ) | 2162 | ) |
2159 | { | 2163 | { |
2160 | HRESULT hr = S_OK; | 2164 | HRESULT hr = S_OK; |
@@ -2213,7 +2217,7 @@ static HRESULT OnCacheVerifyPayload( | |||
2213 | __in BURN_PACKAGES* pPackages, | 2217 | __in BURN_PACKAGES* pPackages, |
2214 | __in BURN_PAYLOADS* pPayloads, | 2218 | __in BURN_PAYLOADS* pPayloads, |
2215 | __in BYTE* pbData, | 2219 | __in BYTE* pbData, |
2216 | __in DWORD cbData | 2220 | __in SIZE_T cbData |
2217 | ) | 2221 | ) |
2218 | { | 2222 | { |
2219 | HRESULT hr = S_OK; | 2223 | HRESULT hr = S_OK; |
@@ -2273,7 +2277,7 @@ static void OnCacheCleanup( | |||
2273 | static HRESULT OnProcessDependentRegistration( | 2277 | static HRESULT OnProcessDependentRegistration( |
2274 | __in const BURN_REGISTRATION* pRegistration, | 2278 | __in const BURN_REGISTRATION* pRegistration, |
2275 | __in BYTE* pbData, | 2279 | __in BYTE* pbData, |
2276 | __in DWORD cbData | 2280 | __in SIZE_T cbData |
2277 | ) | 2281 | ) |
2278 | { | 2282 | { |
2279 | HRESULT hr = S_OK; | 2283 | HRESULT hr = S_OK; |
@@ -2309,7 +2313,7 @@ static HRESULT OnExecuteExePackage( | |||
2309 | __in BURN_RELATED_BUNDLES* pRelatedBundles, | 2313 | __in BURN_RELATED_BUNDLES* pRelatedBundles, |
2310 | __in BURN_VARIABLES* pVariables, | 2314 | __in BURN_VARIABLES* pVariables, |
2311 | __in BYTE* pbData, | 2315 | __in BYTE* pbData, |
2312 | __in DWORD cbData | 2316 | __in SIZE_T cbData |
2313 | ) | 2317 | ) |
2314 | { | 2318 | { |
2315 | HRESULT hr = S_OK; | 2319 | HRESULT hr = S_OK; |
@@ -2393,7 +2397,7 @@ static HRESULT OnExecuteMsiPackage( | |||
2393 | __in BURN_PACKAGES* pPackages, | 2397 | __in BURN_PACKAGES* pPackages, |
2394 | __in BURN_VARIABLES* pVariables, | 2398 | __in BURN_VARIABLES* pVariables, |
2395 | __in BYTE* pbData, | 2399 | __in BYTE* pbData, |
2396 | __in DWORD cbData | 2400 | __in SIZE_T cbData |
2397 | ) | 2401 | ) |
2398 | { | 2402 | { |
2399 | HRESULT hr = S_OK; | 2403 | HRESULT hr = S_OK; |
@@ -2490,7 +2494,7 @@ static HRESULT OnExecuteMspPackage( | |||
2490 | __in BURN_PACKAGES* pPackages, | 2494 | __in BURN_PACKAGES* pPackages, |
2491 | __in BURN_VARIABLES* pVariables, | 2495 | __in BURN_VARIABLES* pVariables, |
2492 | __in BYTE* pbData, | 2496 | __in BYTE* pbData, |
2493 | __in DWORD cbData | 2497 | __in SIZE_T cbData |
2494 | ) | 2498 | ) |
2495 | { | 2499 | { |
2496 | HRESULT hr = S_OK; | 2500 | HRESULT hr = S_OK; |
@@ -2585,7 +2589,7 @@ static HRESULT OnExecuteMsuPackage( | |||
2585 | __in BURN_PACKAGES* pPackages, | 2589 | __in BURN_PACKAGES* pPackages, |
2586 | __in BURN_VARIABLES* pVariables, | 2590 | __in BURN_VARIABLES* pVariables, |
2587 | __in BYTE* pbData, | 2591 | __in BYTE* pbData, |
2588 | __in DWORD cbData | 2592 | __in SIZE_T cbData |
2589 | ) | 2593 | ) |
2590 | { | 2594 | { |
2591 | HRESULT hr = S_OK; | 2595 | HRESULT hr = S_OK; |
@@ -2644,7 +2648,7 @@ static HRESULT OnExecutePackageProviderAction( | |||
2644 | __in BURN_PACKAGES* pPackages, | 2648 | __in BURN_PACKAGES* pPackages, |
2645 | __in BURN_RELATED_BUNDLES* pRelatedBundles, | 2649 | __in BURN_RELATED_BUNDLES* pRelatedBundles, |
2646 | __in BYTE* pbData, | 2650 | __in BYTE* pbData, |
2647 | __in DWORD cbData | 2651 | __in SIZE_T cbData |
2648 | ) | 2652 | ) |
2649 | { | 2653 | { |
2650 | HRESULT hr = S_OK; | 2654 | HRESULT hr = S_OK; |
@@ -2684,7 +2688,7 @@ static HRESULT OnExecutePackageDependencyAction( | |||
2684 | __in BURN_PACKAGES* pPackages, | 2688 | __in BURN_PACKAGES* pPackages, |
2685 | __in BURN_RELATED_BUNDLES* pRelatedBundles, | 2689 | __in BURN_RELATED_BUNDLES* pRelatedBundles, |
2686 | __in BYTE* pbData, | 2690 | __in BYTE* pbData, |
2687 | __in DWORD cbData | 2691 | __in SIZE_T cbData |
2688 | ) | 2692 | ) |
2689 | { | 2693 | { |
2690 | HRESULT hr = S_OK; | 2694 | HRESULT hr = S_OK; |
@@ -2953,7 +2957,7 @@ LExit: | |||
2953 | static HRESULT OnCleanPackage( | 2957 | static HRESULT OnCleanPackage( |
2954 | __in BURN_PACKAGES* pPackages, | 2958 | __in BURN_PACKAGES* pPackages, |
2955 | __in BYTE* pbData, | 2959 | __in BYTE* pbData, |
2956 | __in DWORD cbData | 2960 | __in SIZE_T cbData |
2957 | ) | 2961 | ) |
2958 | { | 2962 | { |
2959 | HRESULT hr = S_OK; | 2963 | HRESULT hr = S_OK; |
@@ -2982,7 +2986,7 @@ static HRESULT OnLaunchApprovedExe( | |||
2982 | __in BURN_APPROVED_EXES* pApprovedExes, | 2986 | __in BURN_APPROVED_EXES* pApprovedExes, |
2983 | __in BURN_VARIABLES* pVariables, | 2987 | __in BURN_VARIABLES* pVariables, |
2984 | __in BYTE* pbData, | 2988 | __in BYTE* pbData, |
2985 | __in DWORD cbData | 2989 | __in SIZE_T cbData |
2986 | ) | 2990 | ) |
2987 | { | 2991 | { |
2988 | HRESULT hr = S_OK; | 2992 | HRESULT hr = S_OK; |
@@ -3051,7 +3055,7 @@ LExit: | |||
3051 | static HRESULT OnMsiBeginTransaction( | 3055 | static HRESULT OnMsiBeginTransaction( |
3052 | __in BURN_PACKAGES* pPackages, | 3056 | __in BURN_PACKAGES* pPackages, |
3053 | __in BYTE* pbData, | 3057 | __in BYTE* pbData, |
3054 | __in DWORD cbData | 3058 | __in SIZE_T cbData |
3055 | ) | 3059 | ) |
3056 | { | 3060 | { |
3057 | HRESULT hr = S_OK; | 3061 | HRESULT hr = S_OK; |
@@ -3067,7 +3071,7 @@ static HRESULT OnMsiBeginTransaction( | |||
3067 | hr = BuffReadString(pbData, cbData, &iData, &sczLogPath); | 3071 | hr = BuffReadString(pbData, cbData, &iData, &sczLogPath); |
3068 | ExitOnFailure(hr, "Failed to read transaction log path."); | 3072 | ExitOnFailure(hr, "Failed to read transaction log path."); |
3069 | 3073 | ||
3070 | PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary); | 3074 | hr = PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary); |
3071 | ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId); | 3075 | ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId); |
3072 | 3076 | ||
3073 | pRollbackBoundary->sczLogPath = sczLogPath; | 3077 | pRollbackBoundary->sczLogPath = sczLogPath; |
@@ -3089,7 +3093,7 @@ LExit: | |||
3089 | static HRESULT OnMsiCommitTransaction( | 3093 | static HRESULT OnMsiCommitTransaction( |
3090 | __in BURN_PACKAGES* pPackages, | 3094 | __in BURN_PACKAGES* pPackages, |
3091 | __in BYTE* pbData, | 3095 | __in BYTE* pbData, |
3092 | __in DWORD cbData | 3096 | __in SIZE_T cbData |
3093 | ) | 3097 | ) |
3094 | { | 3098 | { |
3095 | HRESULT hr = S_OK; | 3099 | HRESULT hr = S_OK; |
@@ -3105,7 +3109,7 @@ static HRESULT OnMsiCommitTransaction( | |||
3105 | hr = BuffReadString(pbData, cbData, &iData, &sczLogPath); | 3109 | hr = BuffReadString(pbData, cbData, &iData, &sczLogPath); |
3106 | ExitOnFailure(hr, "Failed to read transaction log path."); | 3110 | ExitOnFailure(hr, "Failed to read transaction log path."); |
3107 | 3111 | ||
3108 | PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary); | 3112 | hr = PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary); |
3109 | ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId); | 3113 | ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId); |
3110 | 3114 | ||
3111 | pRollbackBoundary->sczLogPath = sczLogPath; | 3115 | pRollbackBoundary->sczLogPath = sczLogPath; |
@@ -3127,7 +3131,7 @@ LExit: | |||
3127 | static HRESULT OnMsiRollbackTransaction( | 3131 | static HRESULT OnMsiRollbackTransaction( |
3128 | __in BURN_PACKAGES* pPackages, | 3132 | __in BURN_PACKAGES* pPackages, |
3129 | __in BYTE* pbData, | 3133 | __in BYTE* pbData, |
3130 | __in DWORD cbData | 3134 | __in SIZE_T cbData |
3131 | ) | 3135 | ) |
3132 | { | 3136 | { |
3133 | HRESULT hr = S_OK; | 3137 | HRESULT hr = S_OK; |
@@ -3143,7 +3147,7 @@ static HRESULT OnMsiRollbackTransaction( | |||
3143 | hr = BuffReadString(pbData, cbData, &iData, &sczLogPath); | 3147 | hr = BuffReadString(pbData, cbData, &iData, &sczLogPath); |
3144 | ExitOnFailure(hr, "Failed to read transaction log path."); | 3148 | ExitOnFailure(hr, "Failed to read transaction log path."); |
3145 | 3149 | ||
3146 | PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary); | 3150 | hr = PackageFindRollbackBoundaryById(pPackages, sczId, &pRollbackBoundary); |
3147 | ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId); | 3151 | ExitOnFailure(hr, "Failed to find rollback boundary: %ls", sczId); |
3148 | 3152 | ||
3149 | pRollbackBoundary->sczLogPath = sczLogPath; | 3153 | pRollbackBoundary->sczLogPath = sczLogPath; |
diff --git a/src/engine/embedded.cpp b/src/engine/embedded.cpp index b512b365..03898ebd 100644 --- a/src/engine/embedded.cpp +++ b/src/engine/embedded.cpp | |||
@@ -22,14 +22,14 @@ static HRESULT OnEmbeddedErrorMessage( | |||
22 | __in PFN_GENERICMESSAGEHANDLER pfnMessageHandler, | 22 | __in PFN_GENERICMESSAGEHANDLER pfnMessageHandler, |
23 | __in LPVOID pvContext, | 23 | __in LPVOID pvContext, |
24 | __in_bcount(cbData) BYTE* pbData, | 24 | __in_bcount(cbData) BYTE* pbData, |
25 | __in DWORD cbData, | 25 | __in SIZE_T cbData, |
26 | __out DWORD* pdwResult | 26 | __out DWORD* pdwResult |
27 | ); | 27 | ); |
28 | static HRESULT OnEmbeddedProgress( | 28 | static HRESULT OnEmbeddedProgress( |
29 | __in PFN_GENERICMESSAGEHANDLER pfnMessageHandler, | 29 | __in PFN_GENERICMESSAGEHANDLER pfnMessageHandler, |
30 | __in LPVOID pvContext, | 30 | __in LPVOID pvContext, |
31 | __in_bcount(cbData) BYTE* pbData, | 31 | __in_bcount(cbData) BYTE* pbData, |
32 | __in DWORD cbData, | 32 | __in SIZE_T cbData, |
33 | __out DWORD* pdwResult | 33 | __out DWORD* pdwResult |
34 | ); | 34 | ); |
35 | 35 | ||
@@ -142,7 +142,7 @@ static HRESULT OnEmbeddedErrorMessage( | |||
142 | __in PFN_GENERICMESSAGEHANDLER pfnMessageHandler, | 142 | __in PFN_GENERICMESSAGEHANDLER pfnMessageHandler, |
143 | __in LPVOID pvContext, | 143 | __in LPVOID pvContext, |
144 | __in_bcount(cbData) BYTE* pbData, | 144 | __in_bcount(cbData) BYTE* pbData, |
145 | __in DWORD cbData, | 145 | __in SIZE_T cbData, |
146 | __out DWORD* pdwResult | 146 | __out DWORD* pdwResult |
147 | ) | 147 | ) |
148 | { | 148 | { |
@@ -176,7 +176,7 @@ static HRESULT OnEmbeddedProgress( | |||
176 | __in PFN_GENERICMESSAGEHANDLER pfnMessageHandler, | 176 | __in PFN_GENERICMESSAGEHANDLER pfnMessageHandler, |
177 | __in LPVOID pvContext, | 177 | __in LPVOID pvContext, |
178 | __in_bcount(cbData) BYTE* pbData, | 178 | __in_bcount(cbData) BYTE* pbData, |
179 | __in DWORD cbData, | 179 | __in SIZE_T cbData, |
180 | __out DWORD* pdwResult | 180 | __out DWORD* pdwResult |
181 | ) | 181 | ) |
182 | { | 182 | { |
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index e2728d7f..8f024e98 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp | |||
@@ -324,6 +324,7 @@ static HRESULT InitializeEngineState( | |||
324 | LPCWSTR wzParam = NULL; | 324 | LPCWSTR wzParam = NULL; |
325 | HANDLE hSectionFile = hEngineFile; | 325 | HANDLE hSectionFile = hEngineFile; |
326 | HANDLE hSourceEngineFile = INVALID_HANDLE_VALUE; | 326 | HANDLE hSourceEngineFile = INVALID_HANDLE_VALUE; |
327 | DWORD64 qw = 0; | ||
327 | 328 | ||
328 | pEngineState->automaticUpdates = BURN_AU_PAUSE_ACTION_IFELEVATED; | 329 | pEngineState->automaticUpdates = BURN_AU_PAUSE_ACTION_IFELEVATED; |
329 | pEngineState->dwElevatedLoggingTlsId = TLS_OUT_OF_INDEXES; | 330 | pEngineState->dwElevatedLoggingTlsId = TLS_OUT_OF_INDEXES; |
@@ -343,8 +344,10 @@ static HRESULT InitializeEngineState( | |||
343 | ExitOnRootFailure(hr = E_INVALIDARG, "Missing required parameter for switch: %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_ATTACHED); | 344 | ExitOnRootFailure(hr = E_INVALIDARG, "Missing required parameter for switch: %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_ATTACHED); |
344 | } | 345 | } |
345 | 346 | ||
346 | hr = StrStringToUInt32(wzParam, 0, reinterpret_cast<UINT*>(&hSourceEngineFile)); | 347 | hr = StrStringToUInt64(wzParam, 0, &qw); |
347 | ExitOnFailure(hr, "Failed to parse file handle: '%ls'", (wzParam)); | 348 | ExitOnFailure(hr, "Failed to parse file handle: '%ls'", (wzParam)); |
349 | |||
350 | hSourceEngineFile = (HANDLE)qw; | ||
348 | } | 351 | } |
349 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &pEngineState->argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF), BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, lstrlenW(BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF))) | 352 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &pEngineState->argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF), BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF, lstrlenW(BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF))) |
350 | { | 353 | { |
@@ -354,8 +357,10 @@ static HRESULT InitializeEngineState( | |||
354 | ExitOnRootFailure(hr = E_INVALIDARG, "Missing required parameter for switch: %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF); | 357 | ExitOnRootFailure(hr = E_INVALIDARG, "Missing required parameter for switch: %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF); |
355 | } | 358 | } |
356 | 359 | ||
357 | hr = StrStringToUInt32(wzParam, 0, reinterpret_cast<UINT*>(&hSectionFile)); | 360 | hr = StrStringToUInt64(wzParam, 0, &qw); |
358 | ExitOnFailure(hr, "Failed to parse file handle: '%ls'", (wzParam)); | 361 | ExitOnFailure(hr, "Failed to parse file handle: '%ls'", (wzParam)); |
362 | |||
363 | hSectionFile = (HANDLE)qw; | ||
359 | } | 364 | } |
360 | } | 365 | } |
361 | } | 366 | } |
diff --git a/src/engine/engine.vcxproj b/src/engine/engine.vcxproj index a6deb18d..9e90ee19 100644 --- a/src/engine/engine.vcxproj +++ b/src/engine/engine.vcxproj | |||
@@ -1,7 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 3 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
4 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> | 4 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" /> |
5 | <ItemGroup Label="ProjectConfigurations"> | 5 | <ItemGroup Label="ProjectConfigurations"> |
6 | <ProjectConfiguration Include="Debug|Win32"> | 6 | <ProjectConfiguration Include="Debug|Win32"> |
7 | <Configuration>Debug</Configuration> | 7 | <Configuration>Debug</Configuration> |
@@ -166,6 +166,6 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command> | |||
166 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 166 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
167 | </PropertyGroup> | 167 | </PropertyGroup> |
168 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> | 168 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> |
169 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> | 169 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" /> |
170 | </Target> | 170 | </Target> |
171 | </Project> \ No newline at end of file | 171 | </Project> \ No newline at end of file |
diff --git a/src/engine/exeengine.cpp b/src/engine/exeengine.cpp index 0b53e266..8900984f 100644 --- a/src/engine/exeengine.cpp +++ b/src/engine/exeengine.cpp | |||
@@ -448,7 +448,7 @@ extern "C" HRESULT ExeEngineExecutePackage( | |||
448 | } | 448 | } |
449 | 449 | ||
450 | // build command | 450 | // build command |
451 | if (0 < lstrlenW(sczArguments)) | 451 | if (*sczArguments) |
452 | { | 452 | { |
453 | hr = VariableFormatString(pVariables, sczArguments, &sczArgumentsFormatted, NULL); | 453 | hr = VariableFormatString(pVariables, sczArguments, &sczArgumentsFormatted, NULL); |
454 | ExitOnFailure(hr, "Failed to format argument string."); | 454 | ExitOnFailure(hr, "Failed to format argument string."); |
diff --git a/src/engine/logging.cpp b/src/engine/logging.cpp index fd2343fa..a1159c41 100644 --- a/src/engine/logging.cpp +++ b/src/engine/logging.cpp | |||
@@ -717,10 +717,10 @@ static HRESULT GetNonSessionSpecificTempFolder( | |||
717 | { | 717 | { |
718 | HRESULT hr = S_OK; | 718 | HRESULT hr = S_OK; |
719 | WCHAR wzTempFolder[MAX_PATH] = { }; | 719 | WCHAR wzTempFolder[MAX_PATH] = { }; |
720 | DWORD cchTempFolder = 0; | 720 | SIZE_T cchTempFolder = 0; |
721 | DWORD dwSessionId = 0; | 721 | DWORD dwSessionId = 0; |
722 | LPWSTR sczSessionId = 0; | 722 | LPWSTR sczSessionId = 0; |
723 | DWORD cchSessionId = 0; | 723 | SIZE_T cchSessionId = 0; |
724 | 724 | ||
725 | if (!::GetTempPathW(countof(wzTempFolder), wzTempFolder)) | 725 | if (!::GetTempPathW(countof(wzTempFolder), wzTempFolder)) |
726 | { | 726 | { |
@@ -740,7 +740,7 @@ static HRESULT GetNonSessionSpecificTempFolder( | |||
740 | hr = ::StringCchLengthW(sczSessionId, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchSessionId)); | 740 | hr = ::StringCchLengthW(sczSessionId, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(&cchSessionId)); |
741 | ExitOnFailure(hr, "Failed to get length of session id string."); | 741 | ExitOnFailure(hr, "Failed to get length of session id string."); |
742 | 742 | ||
743 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzTempFolder + cchTempFolder - cchSessionId, cchSessionId, sczSessionId, cchSessionId)) | 743 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzTempFolder + cchTempFolder - cchSessionId, static_cast<DWORD>(cchSessionId), sczSessionId, static_cast<DWORD>(cchSessionId))) |
744 | { | 744 | { |
745 | cchTempFolder -= cchSessionId; | 745 | cchTempFolder -= cchSessionId; |
746 | } | 746 | } |
diff --git a/src/engine/packages.config b/src/engine/packages.config index 125a949e..7219a3da 100644 --- a/src/engine/packages.config +++ b/src/engine/packages.config | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <packages> | 2 | <packages> |
3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> |
4 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> | 4 | <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" /> |
5 | </packages> \ No newline at end of file | 5 | </packages> \ No newline at end of file |
diff --git a/src/engine/pipe.cpp b/src/engine/pipe.cpp index 47963e9d..a9fd24e8 100644 --- a/src/engine/pipe.cpp +++ b/src/engine/pipe.cpp | |||
@@ -429,7 +429,6 @@ extern "C" HRESULT PipeWaitForChildConnect( | |||
429 | DWORD cbSecret = lstrlenW(wzSecret) * sizeof(WCHAR); | 429 | DWORD cbSecret = lstrlenW(wzSecret) * sizeof(WCHAR); |
430 | DWORD dwCurrentProcessId = ::GetCurrentProcessId(); | 430 | DWORD dwCurrentProcessId = ::GetCurrentProcessId(); |
431 | DWORD dwAck = 0; | 431 | DWORD dwAck = 0; |
432 | DWORD cb = 0; | ||
433 | 432 | ||
434 | for (DWORD i = 0; i < countof(hPipes) && INVALID_HANDLE_VALUE != hPipes[i]; ++i) | 433 | for (DWORD i = 0; i < countof(hPipes) && INVALID_HANDLE_VALUE != hPipes[i]; ++i) |
435 | { | 434 | { |
@@ -487,26 +486,18 @@ extern "C" HRESULT PipeWaitForChildConnect( | |||
487 | } | 486 | } |
488 | 487 | ||
489 | // Prove we are the one that created the elevated process by passing the secret. | 488 | // Prove we are the one that created the elevated process by passing the secret. |
490 | if (!::WriteFile(hPipe, &cbSecret, sizeof(cbSecret), &cb, NULL)) | 489 | hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(&cbSecret), sizeof(cbSecret)); |
491 | { | 490 | ExitOnFailure(hr, "Failed to write secret length to pipe."); |
492 | ExitWithLastError(hr, "Failed to write secret length to pipe."); | ||
493 | } | ||
494 | 491 | ||
495 | if (!::WriteFile(hPipe, wzSecret, cbSecret, &cb, NULL)) | 492 | hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(wzSecret), cbSecret); |
496 | { | 493 | ExitOnFailure(hr, "Failed to write secret to pipe."); |
497 | ExitWithLastError(hr, "Failed to write secret to pipe."); | ||
498 | } | ||
499 | 494 | ||
500 | if (!::WriteFile(hPipe, &dwCurrentProcessId, sizeof(dwCurrentProcessId), &cb, NULL)) | 495 | hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(&dwCurrentProcessId), sizeof(dwCurrentProcessId)); |
501 | { | 496 | ExitOnFailure(hr, "Failed to write our process id to pipe."); |
502 | ExitWithLastError(hr, "Failed to write our process id to pipe."); | ||
503 | } | ||
504 | 497 | ||
505 | // Wait until the elevated process responds that it is ready to go. | 498 | // Wait until the elevated process responds that it is ready to go. |
506 | if (!::ReadFile(hPipe, &dwAck, sizeof(dwAck), &cb, NULL)) | 499 | hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(&dwAck), sizeof(dwAck)); |
507 | { | 500 | ExitOnFailure(hr, "Failed to read ACK from pipe."); |
508 | ExitWithLastError(hr, "Failed to read ACK from pipe."); | ||
509 | } | ||
510 | 501 | ||
511 | // The ACK should match out expected child process id. | 502 | // The ACK should match out expected child process id. |
512 | //if (pConnection->dwProcessId != dwAck) | 503 | //if (pConnection->dwProcessId != dwAck) |
@@ -724,17 +715,8 @@ static HRESULT WritePipeMessage( | |||
724 | ExitOnFailure(hr, "Failed to allocate message to write."); | 715 | ExitOnFailure(hr, "Failed to allocate message to write."); |
725 | 716 | ||
726 | // Write the message. | 717 | // Write the message. |
727 | DWORD cbWrote = 0; | 718 | hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(pv), cb); |
728 | SIZE_T cbTotalWritten = 0; | 719 | ExitOnFailure(hr, "Failed to write message type to pipe."); |
729 | while (cbTotalWritten < cb) | ||
730 | { | ||
731 | if (!::WriteFile(hPipe, pv, (DWORD)(cb - cbTotalWritten), &cbWrote, NULL)) | ||
732 | { | ||
733 | ExitWithLastError(hr, "Failed to write message type to pipe."); | ||
734 | } | ||
735 | |||
736 | cbTotalWritten += cbWrote; | ||
737 | } | ||
738 | 720 | ||
739 | LExit: | 721 | LExit: |
740 | ReleaseMem(pv); | 722 | ReleaseMem(pv); |
@@ -747,46 +729,25 @@ static HRESULT GetPipeMessage( | |||
747 | ) | 729 | ) |
748 | { | 730 | { |
749 | HRESULT hr = S_OK; | 731 | HRESULT hr = S_OK; |
750 | DWORD rgdwMessageAndByteCount[2] = { }; | 732 | BYTE pbMessageAndByteCount[sizeof(DWORD) + sizeof(SIZE_T)] = { }; |
751 | DWORD cb = 0; | ||
752 | DWORD cbRead = 0; | ||
753 | 733 | ||
754 | while (cbRead < sizeof(rgdwMessageAndByteCount)) | 734 | hr = FileReadHandle(hPipe, pbMessageAndByteCount, sizeof(pbMessageAndByteCount)); |
735 | if (HRESULT_FROM_WIN32(ERROR_BROKEN_PIPE) == hr) | ||
755 | { | 736 | { |
756 | if (!::ReadFile(hPipe, reinterpret_cast<BYTE*>(rgdwMessageAndByteCount) + cbRead, sizeof(rgdwMessageAndByteCount) - cbRead, &cb, NULL)) | 737 | memset(pbMessageAndByteCount, 0, sizeof(pbMessageAndByteCount)); |
757 | { | 738 | hr = S_FALSE; |
758 | DWORD er = ::GetLastError(); | ||
759 | if (ERROR_MORE_DATA == er) | ||
760 | { | ||
761 | hr = S_OK; | ||
762 | } | ||
763 | else if (ERROR_BROKEN_PIPE == er) // parent process shut down, time to exit. | ||
764 | { | ||
765 | memset(rgdwMessageAndByteCount, 0, sizeof(rgdwMessageAndByteCount)); | ||
766 | hr = S_FALSE; | ||
767 | break; | ||
768 | } | ||
769 | else | ||
770 | { | ||
771 | hr = HRESULT_FROM_WIN32(er); | ||
772 | } | ||
773 | ExitOnRootFailure(hr, "Failed to read message from pipe."); | ||
774 | } | ||
775 | |||
776 | cbRead += cb; | ||
777 | } | 739 | } |
740 | ExitOnFailure(hr, "Failed to read message from pipe."); | ||
778 | 741 | ||
779 | pMsg->dwMessage = rgdwMessageAndByteCount[0]; | 742 | pMsg->dwMessage = *(DWORD*)(pbMessageAndByteCount); |
780 | pMsg->cbData = rgdwMessageAndByteCount[1]; | 743 | pMsg->cbData = *(SIZE_T*)(pbMessageAndByteCount + sizeof(DWORD)); |
781 | if (pMsg->cbData) | 744 | if (pMsg->cbData) |
782 | { | 745 | { |
783 | pMsg->pvData = MemAlloc(pMsg->cbData, FALSE); | 746 | pMsg->pvData = MemAlloc(pMsg->cbData, FALSE); |
784 | ExitOnNull(pMsg->pvData, hr, E_OUTOFMEMORY, "Failed to allocate data for message."); | 747 | ExitOnNull(pMsg->pvData, hr, E_OUTOFMEMORY, "Failed to allocate data for message."); |
785 | 748 | ||
786 | if (!::ReadFile(hPipe, pMsg->pvData, pMsg->cbData, &cb, NULL)) | 749 | hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(pMsg->pvData), pMsg->cbData); |
787 | { | 750 | ExitOnFailure(hr, "Failed to read data for message."); |
788 | ExitWithLastError(hr, "Failed to read data for message."); | ||
789 | } | ||
790 | 751 | ||
791 | pMsg->fAllocatedData = TRUE; | 752 | pMsg->fAllocatedData = TRUE; |
792 | } | 753 | } |
@@ -810,15 +771,11 @@ static HRESULT ChildPipeConnected( | |||
810 | LPWSTR sczVerificationSecret = NULL; | 771 | LPWSTR sczVerificationSecret = NULL; |
811 | DWORD cbVerificationSecret = 0; | 772 | DWORD cbVerificationSecret = 0; |
812 | DWORD dwVerificationProcessId = 0; | 773 | DWORD dwVerificationProcessId = 0; |
813 | DWORD dwRead = 0; | ||
814 | DWORD dwAck = ::GetCurrentProcessId(); // send our process id as the ACK. | 774 | DWORD dwAck = ::GetCurrentProcessId(); // send our process id as the ACK. |
815 | DWORD cb = 0; | ||
816 | 775 | ||
817 | // Read the verification secret. | 776 | // Read the verification secret. |
818 | if (!::ReadFile(hPipe, &cbVerificationSecret, sizeof(cbVerificationSecret), &dwRead, NULL)) | 777 | hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(&cbVerificationSecret), sizeof(cbVerificationSecret)); |
819 | { | 778 | ExitOnFailure(hr, "Failed to read size of verification secret from parent pipe."); |
820 | ExitWithLastError(hr, "Failed to read size of verification secret from parent pipe."); | ||
821 | } | ||
822 | 779 | ||
823 | if (255 < cbVerificationSecret / sizeof(WCHAR)) | 780 | if (255 < cbVerificationSecret / sizeof(WCHAR)) |
824 | { | 781 | { |
@@ -829,10 +786,8 @@ static HRESULT ChildPipeConnected( | |||
829 | hr = StrAlloc(&sczVerificationSecret, cbVerificationSecret / sizeof(WCHAR) + 1); | 786 | hr = StrAlloc(&sczVerificationSecret, cbVerificationSecret / sizeof(WCHAR) + 1); |
830 | ExitOnFailure(hr, "Failed to allocate buffer for verification secret."); | 787 | ExitOnFailure(hr, "Failed to allocate buffer for verification secret."); |
831 | 788 | ||
832 | if (!::ReadFile(hPipe, sczVerificationSecret, cbVerificationSecret, &dwRead, NULL)) | 789 | FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(sczVerificationSecret), cbVerificationSecret); |
833 | { | 790 | ExitOnFailure(hr, "Failed to read verification secret from parent pipe."); |
834 | ExitWithLastError(hr, "Failed to read verification secret from parent pipe."); | ||
835 | } | ||
836 | 791 | ||
837 | // Verify the secrets match. | 792 | // Verify the secrets match. |
838 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, 0, sczVerificationSecret, -1, wzSecret, -1)) | 793 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, 0, sczVerificationSecret, -1, wzSecret, -1)) |
@@ -842,10 +797,8 @@ static HRESULT ChildPipeConnected( | |||
842 | } | 797 | } |
843 | 798 | ||
844 | // Read the verification process id. | 799 | // Read the verification process id. |
845 | if (!::ReadFile(hPipe, &dwVerificationProcessId, sizeof(dwVerificationProcessId), &dwRead, NULL)) | 800 | hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(&dwVerificationProcessId), sizeof(dwVerificationProcessId)); |
846 | { | 801 | ExitOnFailure(hr, "Failed to read verification process id from parent pipe."); |
847 | ExitWithLastError(hr, "Failed to read verification process id from parent pipe."); | ||
848 | } | ||
849 | 802 | ||
850 | // If a process id was not provided, we'll trust the process id from the parent. | 803 | // If a process id was not provided, we'll trust the process id from the parent. |
851 | if (*pdwProcessId == 0) | 804 | if (*pdwProcessId == 0) |
@@ -859,10 +812,8 @@ static HRESULT ChildPipeConnected( | |||
859 | } | 812 | } |
860 | 813 | ||
861 | // All is well, tell the parent process. | 814 | // All is well, tell the parent process. |
862 | if (!::WriteFile(hPipe, &dwAck, sizeof(dwAck), &cb, NULL)) | 815 | hr = FileWriteHandle(hPipe, reinterpret_cast<LPCBYTE>(&dwAck), sizeof(dwAck)); |
863 | { | 816 | ExitOnFailure(hr, "Failed to inform parent process that child is running."); |
864 | ExitWithLastError(hr, "Failed to inform parent process that child is running."); | ||
865 | } | ||
866 | 817 | ||
867 | LExit: | 818 | LExit: |
868 | ReleaseStr(sczVerificationSecret); | 819 | ReleaseStr(sczVerificationSecret); |
diff --git a/src/engine/pipe.h b/src/engine/pipe.h index 085c3a76..429cd824 100644 --- a/src/engine/pipe.h +++ b/src/engine/pipe.h | |||
@@ -27,7 +27,7 @@ typedef enum _BURN_PIPE_MESSAGE_TYPE : DWORD | |||
27 | typedef struct _BURN_PIPE_MESSAGE | 27 | typedef struct _BURN_PIPE_MESSAGE |
28 | { | 28 | { |
29 | DWORD dwMessage; | 29 | DWORD dwMessage; |
30 | DWORD cbData; | 30 | SIZE_T cbData; |
31 | 31 | ||
32 | BOOL fAllocatedData; | 32 | BOOL fAllocatedData; |
33 | LPVOID pvData; | 33 | LPVOID pvData; |
diff --git a/src/engine/variable.cpp b/src/engine/variable.cpp index d0c67504..6f818ff3 100644 --- a/src/engine/variable.cpp +++ b/src/engine/variable.cpp | |||
@@ -1106,7 +1106,7 @@ static HRESULT FormatString( | |||
1106 | ::EnterCriticalSection(&pVariables->csAccess); | 1106 | ::EnterCriticalSection(&pVariables->csAccess); |
1107 | 1107 | ||
1108 | // allocate buffer for format string | 1108 | // allocate buffer for format string |
1109 | hr = ::StringCchLengthW(wzIn, STRSAFE_MAX_CCH - 1, &cchIn); | 1109 | hr = ::StringCchLengthW(wzIn, STRSAFE_MAX_LENGTH, &cchIn); |
1110 | ExitOnFailure(hr, "Failed to length of format string."); | 1110 | ExitOnFailure(hr, "Failed to length of format string."); |
1111 | 1111 | ||
1112 | hr = StrAlloc(&sczFormat, cchIn + 1); | 1112 | hr = StrAlloc(&sczFormat, cchIn + 1); |
diff --git a/src/stub/packages.config b/src/stub/packages.config index 4f75128a..a98c0c8e 100644 --- a/src/stub/packages.config +++ b/src/stub/packages.config | |||
@@ -4,5 +4,5 @@ | |||
4 | <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" /> | 4 | <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" /> |
5 | <package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" /> | 5 | <package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" /> |
6 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> | 6 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> |
7 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> | 7 | <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" /> |
8 | </packages> \ No newline at end of file | 8 | </packages> \ No newline at end of file |
diff --git a/src/stub/stub.vcxproj b/src/stub/stub.vcxproj index 2b8bd8ea..38710865 100644 --- a/src/stub/stub.vcxproj +++ b/src/stub/stub.vcxproj | |||
@@ -2,7 +2,7 @@ | |||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | ||
4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
5 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" /> |
6 | <Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" /> | 6 | <Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" /> |
7 | <Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" /> | 7 | <Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" /> |
8 | <Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" /> | 8 | <Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" /> |
@@ -117,6 +117,6 @@ | |||
117 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props'))" /> | 117 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props'))" /> |
118 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets'))" /> | 118 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets'))" /> |
119 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> | 119 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> |
120 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> | 120 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" /> |
121 | </Target> | 121 | </Target> |
122 | </Project> \ No newline at end of file | 122 | </Project> \ No newline at end of file |
diff --git a/src/test/BurnUnitTest/BurnUnitTest.vcxproj b/src/test/BurnUnitTest/BurnUnitTest.vcxproj index 11f96590..99db505d 100644 --- a/src/test/BurnUnitTest/BurnUnitTest.vcxproj +++ b/src/test/BurnUnitTest/BurnUnitTest.vcxproj | |||
@@ -3,8 +3,8 @@ | |||
3 | 3 | ||
4 | 4 | ||
5 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 5 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
6 | <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" /> |
7 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" /> | 7 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props')" /> |
8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
9 | <ProjectConfiguration Include="Debug|ARM64"> | 9 | <ProjectConfiguration Include="Debug|ARM64"> |
10 | <Configuration>Debug</Configuration> | 10 | <Configuration>Debug</Configuration> |
@@ -78,10 +78,10 @@ | |||
78 | <Reference Include="System" /> | 78 | <Reference Include="System" /> |
79 | <Reference Include="System.Core" /> | 79 | <Reference Include="System.Core" /> |
80 | <Reference Include="WixBuildTools.TestSupport"> | 80 | <Reference Include="WixBuildTools.TestSupport"> |
81 | <HintPath>..\..\..\packages\WixBuildTools.TestSupport.4.0.47\lib\net472\WixBuildTools.TestSupport.dll</HintPath> | 81 | <HintPath>..\..\..\packages\WixBuildTools.TestSupport.4.0.50\lib\net472\WixBuildTools.TestSupport.dll</HintPath> |
82 | </Reference> | 82 | </Reference> |
83 | <Reference Include="WixBuildTools.TestSupport.Native"> | 83 | <Reference Include="WixBuildTools.TestSupport.Native"> |
84 | <HintPath>..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\lib\net472\WixBuildTools.TestSupport.Native.dll</HintPath> | 84 | <HintPath>..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\lib\net472\WixBuildTools.TestSupport.Native.dll</HintPath> |
85 | </Reference> | 85 | </Reference> |
86 | </ItemGroup> | 86 | </ItemGroup> |
87 | <ItemGroup> | 87 | <ItemGroup> |
@@ -90,13 +90,13 @@ | |||
90 | </ProjectReference> | 90 | </ProjectReference> |
91 | </ItemGroup> | 91 | </ItemGroup> |
92 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 92 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
93 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" /> | 93 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets')" /> |
94 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | 94 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
95 | <PropertyGroup> | 95 | <PropertyGroup> |
96 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 96 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
97 | </PropertyGroup> | 97 | </PropertyGroup> |
98 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" /> | 98 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.props'))" /> |
99 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" /> | 99 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.50\build\WixBuildTools.TestSupport.Native.targets'))" /> |
100 | <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> | 100 | <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" /> |
101 | </Target> | 101 | </Target> |
102 | </Project> \ No newline at end of file | 102 | </Project> \ No newline at end of file |
diff --git a/src/test/BurnUnitTest/packages.config b/src/test/BurnUnitTest/packages.config index 21d87cf8..1eb30932 100644 --- a/src/test/BurnUnitTest/packages.config +++ b/src/test/BurnUnitTest/packages.config | |||
@@ -1,9 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | <packages> | 3 | <packages> |
4 | <package id="WixBuildTools.TestSupport" version="4.0.47" /> | 4 | <package id="WixBuildTools.TestSupport" version="4.0.50" /> |
5 | <package id="WixBuildTools.TestSupport.Native" version="4.0.47" /> | 5 | <package id="WixBuildTools.TestSupport.Native" version="4.0.50" /> |
6 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> | 6 | <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" /> |
7 | <package id="xunit.abstractions" version="2.0.3" /> | 7 | <package id="xunit.abstractions" version="2.0.3" /> |
8 | <package id="xunit.assert" version="2.4.1" /> | 8 | <package id="xunit.assert" version="2.4.1" /> |
9 | <package id="xunit.core" version="2.4.1" /> | 9 | <package id="xunit.core" version="2.4.1" /> |