// 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.Dtf.WindowsInstaller { using System.Diagnostics.CodeAnalysis; /// /// [MSI 4.5] Interface for an embedded external user interface for an installation. /// /// /// Classes which implement this interface must have a public constructor that takes no parameters. /// public interface IEmbeddedUI { /// /// Initializes the embedded UI. /// /// Handle to the installer which can be used to get and set properties. /// The handle is only valid for the duration of this method call. /// Path to the directory that contains all the files from the MsiEmbeddedUI table. /// On entry, contains the current UI level for the installation. After this /// method returns, the installer resets the UI level to the returned value of this parameter. /// True if the embedded UI was successfully initialized; false if the installation /// should continue without the embedded UI. /// The installation was canceled by the user. /// The embedded UI failed to initialize and /// causes the installation to fail. ///

/// Win32 MSI API: /// InitializeEmbeddedUI ///

[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference")] bool Initialize(Session session, string resourcePath, ref InstallUIOptions internalUILevel); /// /// Processes information and progress messages sent to the user interface. /// /// Message type. /// Record that contains message data. /// Message buttons. /// Message box icon. /// Message box default button. /// Result of processing the message. ///

/// Win32 MSI API: /// EmbeddedUIHandler ///

MessageResult ProcessMessage( InstallMessage messageType, Record messageRecord, MessageButtons buttons, MessageIcon icon, MessageDefaultButton defaultButton); /// /// Shuts down the embedded UI at the end of the installation. /// /// /// If the installation was canceled during initialization, this method will not be called. /// If the installation was canceled or failed at any later point, this method will be called at the end. ///

/// Win32 MSI API: /// ShutdownEmbeddedUI ///

void Shutdown(); } }