From 62352fabd541aaa9d0a2c957c4bdd4b9c682df9c Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 11 Dec 2019 19:34:47 +1100 Subject: Import files from BootstrapperCore repo. --- .../IBootstrapperApplicationFactory.cs | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs (limited to 'src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs') diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs b/src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs new file mode 100644 index 00000000..414d28ed --- /dev/null +++ b/src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs @@ -0,0 +1,52 @@ +// 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. + +namespace WixToolset.BootstrapperCore +{ + using System; + using System.CodeDom.Compiler; + using System.Runtime.InteropServices; + + [ComVisible(true)] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [Guid("2965A12F-AC7B-43A0-85DF-E4B2168478A4")] + [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] + public interface IBootstrapperApplicationFactory + { + IBootstrapperApplication Create( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + ref Command command + ); + } + + [Serializable] + [StructLayout(LayoutKind.Sequential)] + [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] + public struct Command + { + [MarshalAs(UnmanagedType.U4)] private readonly LaunchAction action; + [MarshalAs(UnmanagedType.U4)] private readonly Display display; + [MarshalAs(UnmanagedType.U4)] private readonly Restart restart; + [MarshalAs(UnmanagedType.LPWStr)] private readonly string wzCommandLine; + [MarshalAs(UnmanagedType.I4)] private readonly int nCmdShow; + [MarshalAs(UnmanagedType.U4)] private readonly ResumeType resume; + private readonly IntPtr hwndSplashScreen; + [MarshalAs(UnmanagedType.I4)] private readonly RelationType relation; + [MarshalAs(UnmanagedType.Bool)] private readonly bool passthrough; + [MarshalAs(UnmanagedType.LPWStr)] private readonly string wzLayoutDirectory; + + public IBootstrapperCommand GetBootstrapperCommand() + { + return new BootstrapperCommand( + this.action, + this.display, + this.restart, + this.wzCommandLine, + this.nCmdShow, + this.resume, + this.hwndSplashScreen, + this.relation, + this.passthrough, + this.wzLayoutDirectory); + } + } +} -- cgit v1.2.3-55-g6feb