diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/baenginetypes.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/baenginetypes.h index b001c49fd..cc6117cd4 100644 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/baenginetypes.h +++ b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/baenginetypes.h @@ -120,7 +120,7 @@ enum BOOTSTRAPPER_ENGINE_MESSAGE typedef struct _BAENGINE_APPLY_ARGS { DWORD cbSize; - HWND hwndParent; + DWORD64 hwndParent; } BAENGINE_APPLY_ARGS; typedef struct _BAENGINE_APPLY_RESULTS @@ -148,13 +148,13 @@ typedef struct _BAENGINE_COMPAREVERSIONS_ARGS typedef struct _BAENGINE_COMPAREVERSIONS_RESULTS { DWORD cbSize; - int nResult; + INT32 nResult; } BAENGINE_COMPAREVERSIONS_RESULTS; typedef struct _BAENGINE_DETECT_ARGS { DWORD cbSize; - HWND hwndParent; + DWORD64 hwndParent; } BAENGINE_DETECT_ARGS; typedef struct _BAENGINE_DETECT_RESULTS @@ -165,7 +165,7 @@ typedef struct _BAENGINE_DETECT_RESULTS typedef struct _BAENGINE_ELEVATE_ARGS { DWORD cbSize; - HWND hwndParent; + DWORD64 hwndParent; } BAENGINE_ELEVATE_ARGS; typedef struct _BAENGINE_ELEVATE_RESULTS @@ -267,7 +267,7 @@ typedef struct _BAENGINE_GETVARIABLEVERSION_RESULTS typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_ARGS { DWORD cbSize; - HWND hwndParent; + DWORD64 hwndParent; LPCWSTR wzApprovedExeForElevationId; LPCWSTR wzArguments; DWORD dwWaitForInputIdleTimeout; @@ -335,7 +335,7 @@ typedef struct _BAENGINE_SENDEMBEDDEDERROR_ARGS typedef struct _BAENGINE_SENDEMBEDDEDERROR_RESULTS { DWORD cbSize; - int nResult; + INT32 nResult; } BAENGINE_SENDEMBEDDEDERROR_RESULTS; typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_ARGS @@ -348,7 +348,7 @@ typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_ARGS typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS { DWORD cbSize; - int nResult; + INT32 nResult; } BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS; typedef struct _BAENGINE_SETDOWNLOADSOURCE_ARGS diff --git a/src/api/burn/balutil/BalBootstrapperEngine.cpp b/src/api/burn/balutil/BalBootstrapperEngine.cpp index cc2dfa69c..4968bc065 100644 --- a/src/api/burn/balutil/BalBootstrapperEngine.cpp +++ b/src/api/burn/balutil/BalBootstrapperEngine.cpp @@ -1096,7 +1096,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine // Init send structs. args.cbSize = sizeof(args); - args.hwndParent = hwndParent; + args.hwndParent = reinterpret_cast(hwndParent); results.cbSize = sizeof(results); @@ -1104,7 +1104,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine hr = BuffWriteNumber(&pbData, &cbData, args.cbSize); ExitOnFailure(hr, "Failed to write size of Detect args."); - hr = BuffWriteNumber64(&pbData, &cbData, reinterpret_cast(args.hwndParent)); + hr = BuffWriteNumber64(&pbData, &cbData, args.hwndParent); ExitOnFailure(hr, "Failed to write parent window of Detect args."); // Send results. @@ -1172,7 +1172,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine // Init send structs. args.cbSize = sizeof(args); - args.hwndParent = hwndParent; + args.hwndParent = reinterpret_cast(hwndParent); results.cbSize = sizeof(results); @@ -1180,7 +1180,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine hr = BuffWriteNumber(&pbData, &cbData, args.cbSize); ExitOnFailure(hr, "Failed to write size of Elevate args."); - hr = BuffWriteNumber64(&pbData, &cbData, reinterpret_cast(args.hwndParent)); + hr = BuffWriteNumber64(&pbData, &cbData, args.hwndParent); ExitOnFailure(hr, "Failed to write parent window of Elevate args."); // Send results. @@ -1210,7 +1210,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine // Init send structs. args.cbSize = sizeof(args); - args.hwndParent = hwndParent; + args.hwndParent = reinterpret_cast(hwndParent); results.cbSize = sizeof(results); @@ -1218,7 +1218,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine hr = BuffWriteNumber(&pbData, &cbData, args.cbSize); ExitOnFailure(hr, "Failed to write size of Apply args."); - hr = BuffWriteNumber64(&pbData, &cbData, reinterpret_cast(args.hwndParent)); + hr = BuffWriteNumber64(&pbData, &cbData, args.hwndParent); ExitOnFailure(hr, "Failed to write parent window of Apply args."); // Send results. @@ -1290,7 +1290,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine // Init send structs. args.cbSize = sizeof(args); - args.hwndParent = hwndParent; + args.hwndParent = reinterpret_cast(hwndParent); args.wzApprovedExeForElevationId = wzApprovedExeForElevationId; args.wzArguments = wzArguments; args.dwWaitForInputIdleTimeout = dwWaitForInputIdleTimeout; @@ -1301,7 +1301,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine hr = BuffWriteNumberToBuffer(&buffer, args.cbSize); ExitOnFailure(hr, "Failed to write size of LaunchApprovedExe args."); - hr = BuffWriteNumber64ToBuffer(&buffer, reinterpret_cast(args.hwndParent)); + hr = BuffWriteNumber64ToBuffer(&buffer, args.hwndParent); ExitOnFailure(hr, "Failed to write parent window of LaunchApprovedExe args."); hr = BuffWriteStringToBuffer(&buffer, args.wzApprovedExeForElevationId); diff --git a/src/burn/engine/baengine.cpp b/src/burn/engine/baengine.cpp index fb1a260cd..f45a8e640 100644 --- a/src/burn/engine/baengine.cpp +++ b/src/burn/engine/baengine.cpp @@ -1118,17 +1118,14 @@ static HRESULT BAEngineDetect( HRESULT hr = S_OK; BAENGINE_DETECT_ARGS args = { }; BAENGINE_DETECT_RESULTS results = { }; - DWORD64 dw64 = 0; // Unpack args. hr = BuffReaderReadNumber(pReader, &args.cbSize); ExitOnFailure(hr, "Failed to read size of BAEngineDetect args."); - hr = BuffReaderReadNumber64(pReader, &dw64); + hr = BuffReaderReadNumber64(pReader, &args.hwndParent); ExitOnFailure(hr, "Failed to read parent window of BAEngineDetect args."); - args.hwndParent = reinterpret_cast(dw64); - hr = BuffReaderSkipExtraData(pReader, sizeof(args), args.cbSize); ExitOnRootFailure(hr, "BAEngineDetect args size does not match expected size."); @@ -1137,7 +1134,7 @@ static HRESULT BAEngineDetect( ExitOnFailure(hr, "Failed to read size of BAEngineDetect results."); // Execute. - hr = ExternalEngineDetect(pContext, args.hwndParent); + hr = ExternalEngineDetect(pContext, reinterpret_cast(args.hwndParent)); ExitOnFailure(hr, "Failed to detect in the engine."); // Pack result. @@ -1193,17 +1190,14 @@ static HRESULT BAEngineElevate( HRESULT hr = S_OK; BAENGINE_ELEVATE_ARGS args = { }; BAENGINE_ELEVATE_RESULTS results = { }; - DWORD64 dw64 = 0; // Unpack args. hr = BuffReaderReadNumber(pReader, &args.cbSize); ExitOnFailure(hr, "Failed to read size of BAEngineElevate args."); - hr = BuffReaderReadNumber64(pReader, &dw64); + hr = BuffReaderReadNumber64(pReader, &args.hwndParent); ExitOnFailure(hr, "Failed to read parent window of BAEngineElevate args."); - args.hwndParent = reinterpret_cast(dw64); - hr = BuffReaderSkipExtraData(pReader, sizeof(args), args.cbSize); ExitOnRootFailure(hr, "BAEngineElevate args size does not match expected size."); @@ -1212,7 +1206,7 @@ static HRESULT BAEngineElevate( ExitOnFailure(hr, "Failed to read size of BAEngineElevate results."); // Execute. - hr = ExternalEngineElevate(pContext, args.hwndParent); + hr = ExternalEngineElevate(pContext, reinterpret_cast(args.hwndParent)); ExitOnFailure(hr, "Failed to detect in the engine."); // Pack result. @@ -1232,17 +1226,14 @@ static HRESULT BAEngineApply( HRESULT hr = S_OK; BAENGINE_APPLY_ARGS args = { }; BAENGINE_APPLY_RESULTS results = { }; - DWORD64 dw64 = 0; // Unpack args. hr = BuffReaderReadNumber(pReader, &args.cbSize); ExitOnFailure(hr, "Failed to read size of BAEngineApply args."); - hr = BuffReaderReadNumber64(pReader, &dw64); + hr = BuffReaderReadNumber64(pReader, &args.hwndParent); ExitOnFailure(hr, "Failed to read parent window of BAEngineApply args."); - args.hwndParent = reinterpret_cast(dw64); - hr = BuffReaderSkipExtraData(pReader, sizeof(args), args.cbSize); ExitOnRootFailure(hr, "BAEngineApply args size does not match expected size."); @@ -1251,7 +1242,7 @@ static HRESULT BAEngineApply( ExitOnFailure(hr, "Failed to read size of BAEngineApply results."); // Execute. - hr = ExternalEngineApply(pContext, args.hwndParent); + hr = ExternalEngineApply(pContext, reinterpret_cast(args.hwndParent)); ExitOnFailure(hr, "Failed to detect in the engine."); // Pack result. @@ -1309,17 +1300,14 @@ static HRESULT BAEngineLaunchApprovedExe( BAENGINE_LAUNCHAPPROVEDEXE_RESULTS results = { }; LPWSTR sczApprovedExeForElevationId = NULL; LPWSTR sczArguments = NULL; - DWORD64 dw64 = 0; // Unpack args. hr = BuffReaderReadNumber(pReader, &args.cbSize); ExitOnFailure(hr, "Failed to read size of BAEngineLaunchApprovedExe args."); - hr = BuffReaderReadNumber64(pReader, &dw64); + hr = BuffReaderReadNumber64(pReader, &args.hwndParent); ExitOnFailure(hr, "Failed to read parent window of BAEngineLaunchApprovedExe args."); - args.hwndParent = reinterpret_cast(dw64); - hr = BuffReaderReadString(pReader, &sczApprovedExeForElevationId); ExitOnFailure(hr, "Failed to read approved exe elevation id of BAEngineLaunchApprovedExe args."); @@ -1341,7 +1329,7 @@ static HRESULT BAEngineLaunchApprovedExe( ExitOnFailure(hr, "Failed to read size of BAEngineLaunchApprovedExe results."); // Execute. - hr = ExternalEngineLaunchApprovedExe(pContext, args.hwndParent, args.wzApprovedExeForElevationId, args.wzArguments, args.dwWaitForInputIdleTimeout); + hr = ExternalEngineLaunchApprovedExe(pContext, reinterpret_cast(args.hwndParent), args.wzApprovedExeForElevationId, args.wzArguments, args.dwWaitForInputIdleTimeout); ExitOnFailure(hr, "Failed to quit the engine."); // Pack result. diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs index ed9e6f7bf..11cc46f02 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs @@ -6,11 +6,13 @@ namespace Example.EarliestCoreMBA internal class Program { - private static void Main() + private static int Main() { var application = new EarliestCoreBA(); ManagedBootstrapperApplication.Run(application); + + return 0; } } } diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs b/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs index 19f35373d..067fefe84 100644 --- a/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs +++ b/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs @@ -6,11 +6,13 @@ namespace Example.FullFramework2MBA internal class Program { - private static void Main() + private static int Main() { var application = new FullFramework2BA(); ManagedBootstrapperApplication.Run(application); + + return 0; } } } diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs b/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs index 3220a62e7..23fb68514 100644 --- a/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs +++ b/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs @@ -6,11 +6,13 @@ namespace Example.FullFramework4MBA internal class Program { - private static void Main() + private static int Main() { var application = new FullFramework4BA(); ManagedBootstrapperApplication.Run(application); + + return 0; } } } diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs b/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs index fbb8a40a4..94da360b4 100644 --- a/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs +++ b/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs @@ -6,11 +6,13 @@ namespace Example.LatestCoreMBA internal class Program { - private static void Main() + private static int Main() { var application = new LatestCoreBA(); ManagedBootstrapperApplication.Run(application); + + return 0; } } } diff --git a/src/test/burn/TestBA/Program.cs b/src/test/burn/TestBA/Program.cs index 10c45c52f..6986a0575 100644 --- a/src/test/burn/TestBA/Program.cs +++ b/src/test/burn/TestBA/Program.cs @@ -6,11 +6,13 @@ namespace WixToolset.Test.BA internal class Program { - private static void Main() + private static int Main() { var application = new TestBA(); ManagedBootstrapperApplication.Run(application); + + return 0; } } } diff --git a/src/test/burn/TestBA/TestBA.csproj b/src/test/burn/TestBA/TestBA.csproj index 4bd644d17..715ac5bcf 100644 --- a/src/test/burn/TestBA/TestBA.csproj +++ b/src/test/burn/TestBA/TestBA.csproj @@ -11,7 +11,7 @@ win-x86 true true - true + false Major diff --git a/src/test/burn/TestBA/TestBA_x64.csproj b/src/test/burn/TestBA/TestBA_x64.csproj index 7c09dad28..1f8659a0e 100644 --- a/src/test/burn/TestBA/TestBA_x64.csproj +++ b/src/test/burn/TestBA/TestBA_x64.csproj @@ -11,7 +11,7 @@ win-x64 true true - true + false Major diff --git a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs index 74b4b4041..ca49b9c15 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs @@ -5,6 +5,7 @@ + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs index 6088bd172..f12c9461a 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs @@ -5,6 +5,7 @@ + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs index d890dd594..4855c66e4 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs @@ -5,6 +5,7 @@ + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs index 54e2b4ad2..98c3acb23 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs +++ b/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs @@ -2,6 +2,9 @@ + + + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs index b555346e0..ce8dc4bb1 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs +++ b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs @@ -3,6 +3,7 @@ + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs index 0b99c5442..ef465e23b 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs +++ b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs @@ -3,6 +3,7 @@ + diff --git a/src/test/burn/WixToolset.WixBA/Program.cs b/src/test/burn/WixToolset.WixBA/Program.cs index 1fc435098..670d8313f 100644 --- a/src/test/burn/WixToolset.WixBA/Program.cs +++ b/src/test/burn/WixToolset.WixBA/Program.cs @@ -6,11 +6,13 @@ namespace WixToolset.WixBA internal class Program { - private static void Main() + private static int Main() { var application = new WixBA(); ManagedBootstrapperApplication.Run(application); + + return 0; } } } diff --git a/src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj b/src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj index 2e3c02481..a0b477443 100644 --- a/src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj +++ b/src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj @@ -17,7 +17,7 @@ false true true - true + false Major true diff --git a/src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj b/src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj index 983811dd8..b17622a62 100644 --- a/src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj +++ b/src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj @@ -17,7 +17,7 @@ false true true - true + false Major true