From f690537346df6797e080d1e69a6a5ac90b78398b Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 29 Mar 2015 18:15:33 -0500 Subject: [PATCH 1/2] Code cleanup. --- src/burn/engine/elevation.cpp | 48 +++++++++++++++--------------- src/burn/engine/variable.cpp | 56 +++++++++++++++++++++-------------- 2 files changed, 58 insertions(+), 46 deletions(-) diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index 375752e5..3c53d3d0 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp @@ -1592,7 +1592,7 @@ static HRESULT OnApplyInitialize( DWORD dwTakeSystemRestorePoint = 0; LPWSTR sczBundleName = NULL; - // deserialize message data + // Deserialize message data. hr = BuffReadNumber(pbData, cbData, &iData, &dwAction); ExitOnFailure(hr, "Failed to read action."); @@ -1600,12 +1600,12 @@ static HRESULT OnApplyInitialize( ExitOnFailure(hr, "Failed to read update action."); hr = BuffReadNumber(pbData, cbData, &iData, &dwTakeSystemRestorePoint); - ExitOnFailure(hr, "Failed to read sysem restore point action."); + ExitOnFailure(hr, "Failed to read system restore point action."); hr = VariableDeserialize(pVariables, pbData, cbData, &iData); ExitOnFailure(hr, "Failed to read variables."); - // initialize. + // Initialize. hr = ApplyLock(TRUE, phLock); ExitOnFailure(hr, "Failed to acquire lock due to setup in other session."); @@ -1698,7 +1698,7 @@ static HRESULT OnSessionBegin( DWORD dwDependencyRegistrationAction = 0; DWORD64 qwEstimatedSize = 0; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &sczEngineWorkingPath); ExitOnFailure(hr, "Failed to read engine working path."); @@ -1720,7 +1720,7 @@ static HRESULT OnSessionBegin( hr = VariableDeserialize(pVariables, pbData, cbData, &iData); ExitOnFailure(hr, "Failed to read variables."); - // begin session in per-machine process + // Begin session in per-machine process. hr = RegistrationSessionBegin(sczEngineWorkingPath, pRegistration, pVariables, pUserExperience, dwRegistrationOperations, (BURN_DEPENDENCY_REGISTRATION_ACTION)dwDependencyRegistrationAction, qwEstimatedSize); ExitOnFailure(hr, "Failed to begin registration session."); @@ -1739,7 +1739,7 @@ static HRESULT OnSessionResume( HRESULT hr = S_OK; SIZE_T iData = 0; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &pRegistration->sczResumeCommandLine); ExitOnFailure(hr, "Failed to read resume command line."); @@ -1766,7 +1766,7 @@ static HRESULT OnSessionEnd( DWORD dwRestart = 0; DWORD dwDependencyRegistrationAction = 0; - // deserialize message data + // Deserialize message data. hr = BuffReadNumber(pbData, cbData, &iData, &dwResumeMode); ExitOnFailure(hr, "Failed to read resume mode enum."); @@ -1811,7 +1811,7 @@ static HRESULT OnLayoutBundle( LPWSTR sczLayoutDirectory = NULL; LPWSTR sczUnverifiedPath = NULL; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &sczLayoutDirectory); ExitOnFailure(hr, "Failed to read layout directory."); @@ -1847,7 +1847,7 @@ static HRESULT OnCacheOrLayoutContainerOrPayload( LPWSTR sczUnverifiedPath = NULL; BOOL fMove = FALSE; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &scz); ExitOnFailure(hr, "Failed to read package id."); @@ -1939,7 +1939,7 @@ static HRESULT OnProcessDependentRegistration( SIZE_T iData = 0; BURN_DEPENDENT_REGISTRATION_ACTION action = { }; - // deserialize message data + // Deserialize message data. hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&action.type); ExitOnFailure(hr, "Failed to read action type."); @@ -1982,9 +1982,9 @@ static HRESULT OnExecuteExePackage( executeAction.type = BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &sczPackage); - ExitOnFailure(hr, "Failed to read exe package."); + ExitOnFailure(hr, "Failed to read EXE package id."); hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.exePackage.action); ExitOnFailure(hr, "Failed to read action."); @@ -2022,7 +2022,7 @@ static HRESULT OnExecuteExePackage( ExitOnFailure(hr, "Failed to allocate the list of ancestors."); } - // execute EXE package + // Execute EXE package. hr = ExeEngineExecutePackage(&executeAction, pVariables, static_cast(dwRollback), GenericExecuteMessageHandler, hPipe, &exeRestart); ExitOnFailure(hr, "Failed to execute EXE package."); @@ -2065,9 +2065,9 @@ static HRESULT OnExecuteMsiPackage( executeAction.type = BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &sczPackage); - ExitOnFailure(hr, "Failed to read action."); + ExitOnFailure(hr, "Failed to read MSI package id."); hr = PackageFindById(pPackages, sczPackage, &executeAction.msiPackage.pPackage); ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); @@ -2116,7 +2116,7 @@ static HRESULT OnExecuteMsiPackage( hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&fRollback); ExitOnFailure(hr, "Failed to read rollback flag."); - // execute MSI package + // Execute MSI package. hr = MsiEngineExecutePackage(hwndParent, &executeAction, pVariables, fRollback, MsiExecuteMessageHandler, hPipe, &msiRestart); ExitOnFailure(hr, "Failed to execute MSI package."); @@ -2157,9 +2157,9 @@ static HRESULT OnExecuteMspPackage( executeAction.type = BURN_EXECUTE_ACTION_TYPE_MSP_TARGET; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &sczPackage); - ExitOnFailure(hr, "Failed to read action."); + ExitOnFailure(hr, "Failed to read MSP package id."); hr = PackageFindById(pPackages, sczPackage, &executeAction.mspTarget.pPackage); ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); @@ -2170,7 +2170,7 @@ static HRESULT OnExecuteMspPackage( executeAction.mspTarget.fPerMachineTarget = TRUE; // we're in the elevated process, clearly we're targeting a per-machine product. hr = BuffReadString(pbData, cbData, &iData, &executeAction.mspTarget.sczTargetProductCode); - ExitOnFailure(hr, "Failed to read package log."); + ExitOnFailure(hr, "Failed to read target product code."); hr = BuffReadString(pbData, cbData, &iData, &executeAction.mspTarget.sczLogPath); ExitOnFailure(hr, "Failed to read package log."); @@ -2208,7 +2208,7 @@ static HRESULT OnExecuteMspPackage( hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&fRollback); ExitOnFailure(hr, "Failed to read rollback flag."); - // execute MSP package + // Execute MSP package. hr = MspEngineExecutePackage(hwndParent, &executeAction, pVariables, fRollback, MsiExecuteMessageHandler, hPipe, &restart); ExitOnFailure(hr, "Failed to execute MSP package."); @@ -2249,9 +2249,9 @@ static HRESULT OnExecuteMsuPackage( executeAction.type = BURN_EXECUTE_ACTION_TYPE_MSU_PACKAGE; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &sczPackage); - ExitOnFailure(hr, "Failed to read package id."); + ExitOnFailure(hr, "Failed to read MSU package id."); hr = BuffReadString(pbData, cbData, &iData, &executeAction.msuPackage.sczLogPath); ExitOnFailure(hr, "Failed to read package log."); @@ -2571,7 +2571,7 @@ static HRESULT OnCleanPackage( LPWSTR sczPackage = NULL; BURN_PACKAGE* pPackage = NULL; - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &sczPackage); ExitOnFailure(hr, "Failed to read package id."); @@ -2608,7 +2608,7 @@ static HRESULT OnLaunchApprovedExe( pLaunchApprovedExe = (BURN_LAUNCH_APPROVED_EXE*)MemAlloc(sizeof(BURN_LAUNCH_APPROVED_EXE), TRUE); - // deserialize message data + // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &pLaunchApprovedExe->sczId); ExitOnFailure(hr, "Failed to read approved exe id."); diff --git a/src/burn/engine/variable.cpp b/src/burn/engine/variable.cpp index 4634d8ce..bd7824e8 100644 --- a/src/burn/engine/variable.cpp +++ b/src/burn/engine/variable.cpp @@ -812,11 +812,11 @@ extern "C" HRESULT VariableSerialize( ::EnterCriticalSection(&pVariables->csAccess); - // write variable count + // Write variable count. hr = BuffWriteNumber(ppbBuffer, piBuffer, pVariables->cVariables); ExitOnFailure(hr, "Failed to write variable count."); - // write variables + // Write variables. for (DWORD i = 0; i < pVariables->cVariables; ++i) { BURN_VARIABLE* pVariable = &pVariables->rgVariables[i]; @@ -824,7 +824,7 @@ extern "C" HRESULT VariableSerialize( // If we are persisting, include only variables that should be persisted. When not persisting, skip all the built-ins. fIncluded = fPersisting ? pVariable->fPersisted : !pVariable->fBuiltIn; - // write included flag + // Write included flag. hr = BuffWriteNumber(ppbBuffer, piBuffer, (DWORD)fIncluded); ExitOnFailure(hr, "Failed to write included flag."); @@ -833,38 +833,44 @@ extern "C" HRESULT VariableSerialize( continue; } - // write variable name + // Write variable name. hr = BuffWriteString(ppbBuffer, piBuffer, pVariable->sczName); ExitOnFailure(hr, "Failed to write variable name."); - // write variable value type + // Write variable value type. hr = BuffWriteNumber(ppbBuffer, piBuffer, (DWORD)pVariable->Value.Type); ExitOnFailure(hr, "Failed to write variable value type."); - // write variable value + // Write variable value. switch (pVariable->Value.Type) { case BURN_VARIANT_TYPE_NONE: break; case BURN_VARIANT_TYPE_NUMERIC: hr = BVariantGetNumeric(&pVariable->Value, &ll); - ExitOnFailure(hr, "Failed to get numeric"); + ExitOnFailure(hr, "Failed to get numeric."); + hr = BuffWriteNumber64(ppbBuffer, piBuffer, static_cast(ll)); ExitOnFailure(hr, "Failed to write variable value as number."); + SecureZeroMemory(&ll, sizeof(ll)); break; case BURN_VARIANT_TYPE_VERSION: hr = BVariantGetVersion(&pVariable->Value, &qw); - ExitOnFailure(hr, "Failed to get version"); + ExitOnFailure(hr, "Failed to get version."); + hr = BuffWriteNumber64(ppbBuffer, piBuffer, qw); ExitOnFailure(hr, "Failed to write variable value as number."); + SecureZeroMemory(&qw, sizeof(qw)); break; case BURN_VARIANT_TYPE_STRING: hr = BVariantGetString(&pVariable->Value, &scz); - ExitOnFailure(hr, "Failed to get string"); + ExitOnFailure(hr, "Failed to get string."); + hr = BuffWriteString(ppbBuffer, piBuffer, scz); ExitOnFailure(hr, "Failed to write variable value as string."); + ReleaseNullStrSecure(scz); break; default: @@ -899,31 +905,31 @@ extern "C" HRESULT VariableDeserialize( ::EnterCriticalSection(&pVariables->csAccess); - // read variable count + // Read variable count. hr = BuffReadNumber(pbBuffer, cbBuffer, piBuffer, &cVariables); ExitOnFailure(hr, "Failed to read variable count."); - // read variables + // Read variables. for (DWORD i = 0; i < cVariables; ++i) { - // read variable included flag + // Read variable included flag. hr = BuffReadNumber(pbBuffer, cbBuffer, piBuffer, (DWORD*)&fIncluded); ExitOnFailure(hr, "Failed to read variable included flag."); if (!fIncluded) { - continue; // if variable is not included, skip + continue; // if variable is not included, skip. } - // read variable name + // Read variable name. hr = BuffReadString(pbBuffer, cbBuffer, piBuffer, &sczName); ExitOnFailure(hr, "Failed to read variable name."); - // read variable value type + // Read variable value type. hr = BuffReadNumber(pbBuffer, cbBuffer, piBuffer, (DWORD*)&value.Type); ExitOnFailure(hr, "Failed to read variable value type."); - // read variable value + // Read variable value. switch (value.Type) { case BURN_VARIANT_TYPE_NONE: @@ -931,22 +937,28 @@ extern "C" HRESULT VariableDeserialize( case BURN_VARIANT_TYPE_NUMERIC: hr = BuffReadNumber64(pbBuffer, cbBuffer, piBuffer, &qw); ExitOnFailure(hr, "Failed to read variable value as number."); + hr = BVariantSetNumeric(&value, static_cast(qw)); ExitOnFailure(hr, "Failed to set variable value."); + SecureZeroMemory(&qw, sizeof(qw)); break; case BURN_VARIANT_TYPE_VERSION: hr = BuffReadNumber64(pbBuffer, cbBuffer, piBuffer, &qw); ExitOnFailure(hr, "Failed to read variable value as number."); + hr = BVariantSetVersion(&value, qw); ExitOnFailure(hr, "Failed to set variable value."); + SecureZeroMemory(&qw, sizeof(qw)); break; case BURN_VARIANT_TYPE_STRING: hr = BuffReadString(pbBuffer, cbBuffer, piBuffer, &scz); ExitOnFailure(hr, "Failed to read variable value as string."); + hr = BVariantSetString(&value, scz, NULL); ExitOnFailure(hr, "Failed to set variable value."); + ReleaseNullStrSecure(scz); break; default: @@ -954,11 +966,11 @@ extern "C" HRESULT VariableDeserialize( ExitOnFailure(hr, "Unsupported variable type."); } - // set variable + // Set variable. hr = SetVariableValue(pVariables, sczName, &value, SET_VARIABLE_OVERRIDE_PERSISTED_BUILTINS, FALSE); ExitOnFailure(hr, "Failed to set variable."); - // clean up + // Clean up. BVariantUninitialize(&value); } @@ -1461,13 +1473,13 @@ static HRESULT SetVariableValue( hr = FindVariableIndexByName(pVariables, wzVariable, &iVariable); ExitOnFailure(hr, "Failed to find variable value '%ls'.", wzVariable); - // insert element if not found + // Insert element if not found. if (S_FALSE == hr) { hr = InsertVariable(pVariables, wzVariable, iVariable); ExitOnFailure(hr, "Failed to insert variable '%ls'.", wzVariable); } - else if (pVariables->rgVariables[iVariable].fBuiltIn) // built-in variables must be overridden + else if (pVariables->rgVariables[iVariable].fBuiltIn) // built-in variables must be overridden. { if (SET_VARIABLE_OVERRIDE_BUILTIN == setBuiltin || (SET_VARIABLE_OVERRIDE_PERSISTED_BUILTINS == setBuiltin && pVariables->rgVariables[iVariable].fPersisted)) @@ -1486,7 +1498,7 @@ static HRESULT SetVariableValue( AssertSz(SET_VARIABLE_OVERRIDE_BUILTIN != setBuiltin, "Intent to overwrite non-built-in variable."); } - // log value when not overwriting a built-in variable + // Log value when not overwriting a built-in variable. if (fLog && SET_VARIABLE_NOT_BUILTIN == setBuiltin) { if (pVariables->rgVariables[iVariable].fHidden) @@ -1527,7 +1539,7 @@ static HRESULT SetVariableValue( } } - // update variable value + // Update variable value. hr = BVariantSetValue(&pVariables->rgVariables[iVariable].Value, pVariant); ExitOnFailure(hr, "Failed to set value of variable: %ls", wzVariable); From ec235d79732523b1127b25f28dc07d266138a756 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 29 Mar 2015 18:21:43 -0500 Subject: [PATCH 2/2] WIXBUG:4630 - Serialize all variables to the elevated Burn process. --- History.md | 2 ++ src/burn/engine/core.cpp | 2 +- src/burn/engine/elevation.cpp | 10 +++++----- src/burn/engine/variable.cpp | 13 ++++++++----- src/burn/engine/variable.h | 1 + test/src/UnitTests/Burn/VariableTest.cpp | 2 +- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/History.md b/History.md index 1e58a94a..fc69cf84 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,5 @@ +* SeanHall: WIXBUG:4630 - Serialize all variables to the elevated Burn process. + ## WixBuild: Version 4.0.2719.0 * BobArnson: WIXBUG:4520 - Added blurb about using a PayloadGroup to get offline capability for .NET redist. diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp index b3c82cd9..da529294 100644 --- a/src/burn/engine/core.cpp +++ b/src/burn/engine/core.cpp @@ -179,7 +179,7 @@ extern "C" HRESULT CoreQueryRegistration( hr = RegistrationLoadState(&pEngineState->registration, &pbBuffer, &cbBuffer); if (SUCCEEDED(hr)) { - hr = VariableDeserialize(&pEngineState->variables, pbBuffer, cbBuffer, &iBuffer); + hr = VariableDeserialize(&pEngineState->variables, TRUE, pbBuffer, cbBuffer, &iBuffer); } // Log any failures and continue. diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index 3c53d3d0..899846e2 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp @@ -1602,7 +1602,7 @@ static HRESULT OnApplyInitialize( hr = BuffReadNumber(pbData, cbData, &iData, &dwTakeSystemRestorePoint); ExitOnFailure(hr, "Failed to read system restore point action."); - hr = VariableDeserialize(pVariables, pbData, cbData, &iData); + hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); ExitOnFailure(hr, "Failed to read variables."); // Initialize. @@ -1717,7 +1717,7 @@ static HRESULT OnSessionBegin( hr = BuffReadNumber64(pbData, cbData, &iData, &qwEstimatedSize); ExitOnFailure(hr, "Failed to read estimated size."); - hr = VariableDeserialize(pVariables, pbData, cbData, &iData); + hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); ExitOnFailure(hr, "Failed to read variables."); // Begin session in per-machine process. @@ -1998,7 +1998,7 @@ static HRESULT OnExecuteExePackage( hr = BuffReadString(pbData, cbData, &iData, &sczAncestors); ExitOnFailure(hr, "Failed to read the list of ancestors."); - hr = VariableDeserialize(pVariables, pbData, cbData, &iData); + hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); ExitOnFailure(hr, "Failed to read variables."); hr = PackageFindById(pPackages, sczPackage, &executeAction.exePackage.pPackage); @@ -2110,7 +2110,7 @@ static HRESULT OnExecuteMsiPackage( } } - hr = VariableDeserialize(pVariables, pbData, cbData, &iData); + hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); ExitOnFailure(hr, "Failed to read variables."); hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&fRollback); @@ -2202,7 +2202,7 @@ static HRESULT OnExecuteMspPackage( } } - hr = VariableDeserialize(pVariables, pbData, cbData, &iData); + hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); ExitOnFailure(hr, "Failed to read variables."); hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&fRollback); diff --git a/src/burn/engine/variable.cpp b/src/burn/engine/variable.cpp index bd7824e8..78c79b4b 100644 --- a/src/burn/engine/variable.cpp +++ b/src/burn/engine/variable.cpp @@ -55,6 +55,7 @@ enum SET_VARIABLE SET_VARIABLE_NOT_BUILTIN, SET_VARIABLE_OVERRIDE_BUILTIN, SET_VARIABLE_OVERRIDE_PERSISTED_BUILTINS, + SET_VARIABLE_ANY, }; // internal function declarations @@ -821,8 +822,8 @@ extern "C" HRESULT VariableSerialize( { BURN_VARIABLE* pVariable = &pVariables->rgVariables[i]; - // If we are persisting, include only variables that should be persisted. When not persisting, skip all the built-ins. - fIncluded = fPersisting ? pVariable->fPersisted : !pVariable->fBuiltIn; + // If we are persisting, include only variables that should be persisted. + fIncluded = !fPersisting || pVariable->fPersisted; // Write included flag. hr = BuffWriteNumber(ppbBuffer, piBuffer, (DWORD)fIncluded); @@ -890,6 +891,7 @@ LExit: extern "C" HRESULT VariableDeserialize( __in BURN_VARIABLES* pVariables, + __in BOOL fWasPersisted, __in_bcount(cbBuffer) BYTE* pbBuffer, __in SIZE_T cbBuffer, __inout SIZE_T* piBuffer @@ -967,7 +969,7 @@ extern "C" HRESULT VariableDeserialize( } // Set variable. - hr = SetVariableValue(pVariables, sczName, &value, SET_VARIABLE_OVERRIDE_PERSISTED_BUILTINS, FALSE); + hr = SetVariableValue(pVariables, sczName, &value, fWasPersisted ? SET_VARIABLE_OVERRIDE_PERSISTED_BUILTINS : SET_VARIABLE_ANY, FALSE); ExitOnFailure(hr, "Failed to set variable."); // Clean up. @@ -1482,7 +1484,8 @@ static HRESULT SetVariableValue( else if (pVariables->rgVariables[iVariable].fBuiltIn) // built-in variables must be overridden. { if (SET_VARIABLE_OVERRIDE_BUILTIN == setBuiltin || - (SET_VARIABLE_OVERRIDE_PERSISTED_BUILTINS == setBuiltin && pVariables->rgVariables[iVariable].fPersisted)) + (SET_VARIABLE_OVERRIDE_PERSISTED_BUILTINS == setBuiltin && pVariables->rgVariables[iVariable].fPersisted) || + SET_VARIABLE_ANY == setBuiltin) { hr = S_OK; } @@ -1499,7 +1502,7 @@ static HRESULT SetVariableValue( } // Log value when not overwriting a built-in variable. - if (fLog && SET_VARIABLE_NOT_BUILTIN == setBuiltin) + if (fLog && !pVariables->rgVariables[iVariable].fBuiltIn) { if (pVariables->rgVariables[iVariable].fHidden) { diff --git a/src/burn/engine/variable.h b/src/burn/engine/variable.h index 9aa203dd..afee0c2c 100644 --- a/src/burn/engine/variable.h +++ b/src/burn/engine/variable.h @@ -149,6 +149,7 @@ HRESULT VariableSerialize( ); HRESULT VariableDeserialize( __in BURN_VARIABLES* pVariables, + __in BOOL fWasPersisted, __in_bcount(cbBuffer) BYTE* pbBuffer, __in SIZE_T cbBuffer, __inout SIZE_T* piBuffer diff --git a/test/src/UnitTests/Burn/VariableTest.cpp b/test/src/UnitTests/Burn/VariableTest.cpp index b2c2917d..bfb232d6 100644 --- a/test/src/UnitTests/Burn/VariableTest.cpp +++ b/test/src/UnitTests/Burn/VariableTest.cpp @@ -384,7 +384,7 @@ namespace Bootstrapper hr = VariableInitialize(&variables2); TestThrowOnFailure(hr, L"Failed to initialize variables."); - hr = VariableDeserialize(&variables2, pbBuffer, cbBuffer, &iBuffer); + hr = VariableDeserialize(&variables2, FALSE, pbBuffer, cbBuffer, &iBuffer); TestThrowOnFailure(hr, L"Failed to deserialize variables."); Assert::Equal(gcnew String(L"VAL1"), VariableGetStringHelper(&variables2, L"PROP1"));