using System;
using System.Runtime.InteropServices;
namespace VisualStudioMock
{
///
/// Information about an instance of a product.
///
///
/// You can enumerate all properties of basic types by casting to an .
///
[ComImport]
[Guid("89143C9A-05AF-49B0-B717-72E218A2185C")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[TypeIdentifier]
[ComVisible(true)]
public interface ISetupInstance2 : ISetupInstance
{
///
/// Gets the instance identifier (should match the name of the parent instance directory).
///
/// The instance identifier.
[return: MarshalAs(UnmanagedType.BStr)]
new string GetInstanceId();
///
/// Gets the local date and time when the installation was originally installed.
///
[return: MarshalAs(UnmanagedType.Struct)]
new System.Runtime.InteropServices.ComTypes.FILETIME GetInstallDate();
///
/// Gets the unique name of the installation, often indicating the branch and other information used for telemetry.
///
[return: MarshalAs(UnmanagedType.BStr)]
new string GetInstallationName();
///
/// Gets the path to the installation root of the product.
///
[return: MarshalAs(UnmanagedType.BStr)]
new string GetInstallationPath();
///
/// Gets the version of the product installed in this instance.
///
[return: MarshalAs(UnmanagedType.BStr)]
new string GetInstallationVersion();
///
/// Gets the display name (title) of the product installed in this instance.
///
/// The LCID for the display name.
[return: MarshalAs(UnmanagedType.BStr)]
new string GetDisplayName([In][MarshalAs(UnmanagedType.U4)] int lcid = 0);
///
/// Gets the description of the product installed in this instance.
///
/// The LCID for the description.
[return: MarshalAs(UnmanagedType.BStr)]
new string GetDescription([In][MarshalAs(UnmanagedType.U4)] int lcid = 0);
///
/// Resolves the optional relative path to the root path of the instance.
///
/// A relative path within the instance to resolve, or NULL to get the root path.
/// The full path to the optional relative path within the instance. If the relative path is NULL, the root path will always terminate in a backslash.
[return: MarshalAs(UnmanagedType.BStr)]
new string ResolvePath([In][MarshalAs(UnmanagedType.LPWStr)] string pwszRelativePath = null);
///
/// Gets the state of the instance.
///
/// The state of the instance.
[return: MarshalAs(UnmanagedType.U4)]
InstanceState GetState();
///
/// Gets an array of package references registered to the instance.
///
/// An array of package references registered to the instance.
[return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UNKNOWN)]
ISetupPackageReference[] GetPackages();
///
/// Gets a package reference to the product registered to the instance
///
/// A package reference to the product registered to the instance. This may be null if does not return .
ISetupPackageReference GetProduct();
///
/// Gets the relative path to the product application, if available.
///
/// The relative path to the product application, if available.
[return: MarshalAs(UnmanagedType.BStr)]
string GetProductPath();
///
/// Gets the error state of the instance, if available.
///
/// The error state of the instance, if available.
ISetupErrorState GetErrors();
///
/// Gets a value indicating whether the instance can be launched.
///
/// Whether the instance can be launched.
///
/// An instance could have had errors during install but still be launched. Some features may not work correctly, but others will.
///
[return: MarshalAs(UnmanagedType.VariantBool)]
bool IsLaunchable();
///
/// Gets a value indicating whether the instance is complete.
///
/// Whether the instance is complete.
///
/// An instance is complete if it had no errors during install, resume, or repair.
///
[return: MarshalAs(UnmanagedType.VariantBool)]
bool IsComplete();
///
/// Gets product-specific properties.
///
/// An of product-specific properties, or null if no properties are defined.
ISetupPropertyStore GetProperties();
///
/// Gets the directory path to the setup engine that installed the instance.
///
/// The directory path to the setup engine that installed the instance.
[return: MarshalAs(UnmanagedType.BStr)]
string GetEnginePath();
}
}