/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist.</returns>
STDMETHOD(GetInstanceId)(
_Out_BSTR*pbstrInstanceId
)=0;
/// <summary>
/// Gets the local date and time when the installation was originally installed.
/// </summary>
/// <param name="pInstallDate">The local date and time when the installation was originally installed.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined.</returns>
STDMETHOD(GetInstallDate)(
_Out_LPFILETIMEpInstallDate
)=0;
/// <summary>
/// Gets the unique name of the installation, often indicating the branch and other information used for telemetry.
/// </summary>
/// <param name="pbstrInstallationName">The unique name of the installation, often indicating the branch and other information used for telemetry.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined.</returns>
STDMETHOD(GetInstallationName)(
_Out_BSTR*pbstrInstallationName
)=0;
/// <summary>
/// Gets the path to the installation root of the product.
/// </summary>
/// <param name="pbstrInstallationPath">The path to the installation root of the product.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined.</returns>
STDMETHOD(GetInstallationPath)(
_Out_BSTR*pbstrInstallationPath
)=0;
/// <summary>
/// Gets the version of the product installed in this instance.
/// </summary>
/// <param name="pbstrInstallationVersion">The version of the product installed in this instance.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined.</returns>
STDMETHOD(GetInstallationVersion)(
_Out_BSTR*pbstrInstallationVersion
)=0;
/// <summary>
/// Gets the display name (title) of the product installed in this instance.
/// </summary>
/// <param name="lcid">The LCID for the display name.</param>
/// <param name="pbstrDisplayName">The display name (title) of the product installed in this instance.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined.</returns>
STDMETHOD(GetDisplayName)(
_In_LCIDlcid,
_Out_BSTR*pbstrDisplayName
)=0;
/// <summary>
/// Gets the description of the product installed in this instance.
/// </summary>
/// <param name="lcid">The LCID for the description.</param>
/// <param name="pbstrDescription">The description of the product installed in this instance.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined.</returns>
STDMETHOD(GetDescription)(
_In_LCIDlcid,
_Out_BSTR*pbstrDescription
)=0;
/// <summary>
/// Resolves the optional relative path to the root path of the instance.
/// </summary>
/// <param name="pwszRelativePath">A relative path within the instance to resolve, or NULL to get the root path.</param>
/// <param name="pbstrAbsolutePath">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.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined.</returns>
/// <param name="pState">The state of the instance.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist.</returns>
STDMETHOD(GetState)(
_Out_InstanceState*pState
)=0;
/// <summary>
/// Gets an array of package references registered to the instance.
/// </summary>
/// <param name="ppsaPackages">Pointer to an array of <see cref="ISetupPackageReference"/>.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the packages property is not defined.</returns>
STDMETHOD(GetPackages)(
_Out_LPSAFEARRAY*ppsaPackages
)=0;
/// <summary>
/// Gets a pointer to the <see cref="ISetupPackageReference"/> that represents the registered product.
/// </summary>
/// <param name="ppPackage">Pointer to an instance of <see cref="ISetupPackageReference"/>. This may be NULL if <see cref="GetState"/> does not return <see cref="eComplete"/>.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the packages property is not defined.</returns>
/// <param name="ppLocalizedProperties">A pointer to an instance of <see cref="ISetupLocalizedPropertyStore"/>. This may be NULL if no properties are defined.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
/// <param name="ppLocalizedChannelProperties">A pointer to an instance of <see cref="ISetupLocalizedPropertyStore"/>. This may be NULL if no channel properties are defined.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
/// Retrieves the next set of product instances in the enumeration sequence.
/// </summary>
/// <param name="celt">The number of product instances to retrieve.</param>
/// <param name="rgelt">A pointer to an array of <see cref="ISetupInstance"/>.</param>
/// <param name="pceltFetched">A pointer to the number of product instances retrieved. If <paramref name="celt"/> is 1 this parameter may be NULL.</param>
/// <returns>S_OK if the number of elements were fetched, S_FALSE if nothing was fetched (at end of enumeration), E_INVALIDARG if <paramref name="celt"/> is greater than 1 and pceltFetched is NULL, or E_OUTOFMEMORY if an <see cref="ISetupInstance"/> could not be allocated.</returns>
/// Skips the next set of product instances in the enumeration sequence.
/// </summary>
/// <param name="celt">The number of product instances to skip.</param>
/// <returns>S_OK if the number of elements could be skipped; otherwise, S_FALSE;</returns>
STDMETHOD(Skip)(
_In_ULONGcelt
)=0;
/// <summary>
/// Resets the enumeration sequence to the beginning.
/// </summary>
/// <returns>Always returns S_OK;</returns>
STDMETHOD(Reset)(void)=0;
/// <summary>
/// Creates a new enumeration object in the same state as the current enumeration object: the new object points to the same place in the enumeration sequence.
/// </summary>
/// <param name="ppenum">A pointer to a pointer to a new <see cref="IEnumSetupInstances"/> interface. If the method fails, this parameter is undefined.</param>
/// <returns>S_OK if a clone was returned; otherwise, E_OUTOFMEMORY.</returns>
STDMETHOD(Clone)(
_Deref_out_opt_IEnumSetupInstances**ppenum
)=0;
};
#endif
EXTERN_CconstIIDIID_ISetupConfiguration;
#if defined(__cplusplus) && !defined(CINTERFACE)
/// <summary>
/// Gets information about product instances installed on the machine.
/// Parses a dotted quad version string into a 64-bit unsigned integer.
/// </summary>
/// <param name="pwszVersion">The dotted quad version string to parse, e.g. 1.2.3.4.</param>
/// <param name="pullVersion">A 64-bit unsigned integer representing the version. You can compare this to other versions.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_INVALIDARG if the version is not valid.</returns>
STDMETHOD(ParseVersion)(
_In_LPCOLESTRpwszVersion,
_Out_PULONGLONGpullVersion
)=0;
/// <summary>
/// Parses a dotted quad version string into a 64-bit unsigned integer.
/// </summary>
/// <param name="pwszVersionRange">The string containing 1 or 2 dotted quad version strings to parse, e.g. [1.0,) that means 1.0.0.0 or newer.</param>
/// <param name="pullMinVersion">A 64-bit unsigned integer representing the minimum version, which may be 0. You can compare this to other versions.</param>
/// <param name="pullMaxVersion">A 64-bit unsigned integer representing the maximum version, which may be MAXULONGLONG. You can compare this to other versions.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_INVALIDARG if the version range is not valid.</returns>
STDMETHOD(ParseVersionRange)(
_In_LPCOLESTRpwszVersionRange,
_Out_PULONGLONGpullMinVersion,
_Out_PULONGLONGpullMaxVersion
)=0;
};
#endif
EXTERN_CconstIIDIID_ISetupErrorState;
#if defined(__cplusplus) && !defined(CINTERFACE)
/// <summary>
/// Information about the error state of an instance.
/// <param name="pbstrId">The path to the optional package log.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
STDMETHOD(GetLogFilePath)(
_Outptr_result_maybenull_BSTR*pbstrLogFilePath
)=0;
/// <summary>
/// Gets the description of the package failure.
/// </summary>
/// <param name="pbstrId">The description of the package failure.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
STDMETHOD(GetDescription)(
_Outptr_result_maybenull_BSTR*pbstrDescription
)=0;
/// <summary>
/// Gets the signature to use for feedback reporting.
/// </summary>
/// <param name="pbstrId">The signature to use for feedback reporting.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
STDMETHOD(GetSignature)(
_Outptr_result_maybenull_BSTR*pbstrSignature
)=0;
/// <summary>
/// Gets the array of details for this package failure.
/// </summary>
/// <param name="ppsaDetails">Pointer to an array of details as BSTRs.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
STDMETHOD(GetDetails)(
_Out_LPSAFEARRAY*ppsaDetails
)=0;
/// <summary>
/// Gets an array of packages affected by this package failure.
/// </summary>
/// <param name="ppsaPackages">Pointer to an array of <see cref="ISetupPackageReference"/> for packages affected by this package failure. This may be NULL.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
STDMETHOD(GetAffectedPackages)(
_Out_LPSAFEARRAY*ppsaAffectedPackages
)=0;
};
#endif
EXTERN_CconstIIDIID_ISetupPropertyStore;
#if defined(__cplusplus) && !defined(CINTERFACE)
/// <summary>
/// Provides named properties.
/// </summary>
/// <remarks>
/// You can get this from an <see cref="ISetupInstance"/>, <see cref="ISetupPackageReference"/>, or derivative.
/// Gets an array of property names in this property store.
/// </summary>
/// <param name="ppsaNames">Pointer to an array of property names as BSTRs.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
STDMETHOD(GetNames)(
_Out_LPSAFEARRAY*ppsaNames
)=0;
/// <summary>
/// Gets the value of a named property in this property store.
/// </summary>
/// <param name="pwszName">The name of the property to get.</param>
/// <param name="pvtValue">The value of the property.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_NOTFOUND if the property is not defined or E_NOTSUPPORTED if the property type is not supported.</returns>
STDMETHOD(GetValue)(
_In_LPCOLESTRpwszName,
_Out_LPVARIANTpvtValue
)=0;
};
#endif
EXTERN_CconstIIDIID_ISetupLocalizedPropertyStore;
#if defined(__cplusplus) && !defined(CINTERFACE)
/// <summary>
/// Provides localized named properties.
/// </summary>
/// <remarks>
/// You can get this from an <see cref="ISetupLocalizedProperties"/>.
/// Gets an array of property names in this property store.
/// </summary>
/// <param name="lcid">The LCID for the property names.</param>
/// <param name="ppsaNames">Pointer to an array of property names as BSTRs.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>
STDMETHOD(GetNames)(
_In_LCIDlcid,
_Out_LPSAFEARRAY*ppsaNames
)=0;
/// <summary>
/// Gets the value of a named property in this property store.
/// </summary>
/// <param name="pwszName">The name of the property to get.</param>
/// <param name="lcid">The LCID for the property.</param>
/// <param name="pvtValue">The value of the property.</param>
/// <returns>Standard HRESULT indicating success or failure, including E_NOTFOUND if the property is not defined or E_NOTSUPPORTED if the property type is not supported.</returns>
STDMETHOD(GetValue)(
_In_LPCOLESTRpwszName,
_In_LCIDlcid,
_Out_LPVARIANTpvtValue
)=0;
};
#endif
// Class declarations
//
EXTERN_CconstCLSIDCLSID_SetupConfiguration;
#ifdef __cplusplus
/// <summary>
/// This class implements <see cref="ISetupConfiguration"/>, <see cref="ISetupConfiguration2"/>, and <see cref="ISetupHelper"/>.
/// Gets an <see cref="ISetupConfiguration"/> that provides information about product instances installed on the machine.
/// </summary>
/// <param name="ppConfiguration">The <see cref="ISetupConfiguration"/> that provides information about product instances installed on the machine.</param>
/// <param name="pReserved">Reserved for future use.</param>
/// <returns>Standard HRESULT indicating success or failure.</returns>