| ... | ... | @@ -0,0 +1,901 @@ |
| 1 | // The MIT License(MIT)
|
| 2 | // Copyright(C) Microsoft Corporation.All rights reserved.
|
| 3 | //
|
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 5 | // of this software and associated documentation files(the "Software"), to deal
|
| 6 | // in the Software without restriction, including without limitation the rights
|
| 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
| 8 | // copies of the Software, and to permit persons to whom the Software is
|
| 9 | // furnished to do so, subject to the following conditions :
|
| 10 | //
|
| 11 | // The above copyright notice and this permission notice shall be included in
|
| 12 | // all copies or substantial portions of the Software.
|
| 13 | //
|
| 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
| 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
| 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
| 20 | // IN THE SOFTWARE.
|
| 21 | //
|
| 22 |
|
| 23 | #pragma once
|
| 24 |
|
| 25 | // Windows headers
|
| 26 | #include <windows.h>
|
| 27 | #include <fcntl.h>
|
| 28 | #include <io.h>
|
| 29 | #include <shellapi.h>
|
| 30 |
|
| 31 | // COM support header files
|
| 32 | #include <comdef.h>
|
| 33 |
|
| 34 | // Constants
|
| 35 | //
|
| 36 | #ifndef E_NOTFOUND
|
| 37 | #define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
|
| 38 | #endif
|
| 39 |
|
| 40 | #ifndef E_FILENOTFOUND
|
| 41 | #define E_FILENOTFOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)
|
| 42 | #endif
|
| 43 |
|
| 44 | #ifndef E_NOTSUPPORTED
|
| 45 | #define E_NOTSUPPORTED HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)
|
| 46 | #endif
|
| 47 |
|
| 48 | // Enumerations
|
| 49 | //
|
| 50 | /// <summary>
|
| 51 | /// The state of an instance.
|
| 52 | /// </summary>
|
| 53 | enum InstanceState
|
| 54 | {
|
| 55 | 	/// <summary>
|
| 56 | 	/// The instance state has not been determined.
|
| 57 | 	/// </summary>
|
| 58 | 	eNone = 0,
|
| 59 |
|
| 60 | 	/// <summary>
|
| 61 | 	/// The instance installation path exists.
|
| 62 | 	/// </summary>
|
| 63 | 	eLocal = 1,
|
| 64 |
|
| 65 | 	/// <summary>
|
| 66 | 	/// A product is registered to the instance.
|
| 67 | 	/// </summary>
|
| 68 | 	eRegistered = 2,
|
| 69 |
|
| 70 | 	/// <summary>
|
| 71 | 	/// No reboot is required for the instance.
|
| 72 | 	/// </summary>
|
| 73 | 	eNoRebootRequired = 4,
|
| 74 |
|
| 75 | 	/// <summary>
|
| 76 | 	/// No errors were reported for the instance.
|
| 77 | 	/// </summary>
|
| 78 | 	eNoErrors = 8,
|
| 79 |
|
| 80 | 	/// <summary>
|
| 81 | 	/// The instance represents a complete install.
|
| 82 | 	/// </summary>
|
| 83 | 	eComplete = UINT_MAX,
|
| 84 | };
|
| 85 |
|
| 86 | // Forward interface declarations
|
| 87 | //
|
| 88 | #ifndef __ISetupInstance_FWD_DEFINED__
|
| 89 | #define __ISetupInstance_FWD_DEFINED__
|
| 90 | typedef struct ISetupInstance ISetupInstance;
|
| 91 | #endif
|
| 92 |
|
| 93 | #ifndef __ISetupInstance2_FWD_DEFINED__
|
| 94 | #define __ISetupInstance2_FWD_DEFINED__
|
| 95 | typedef struct ISetupInstance2 ISetupInstance2;
|
| 96 | #endif
|
| 97 |
|
| 98 | #ifndef __ISetupInstanceCatalog_FWD_DEFINED__
|
| 99 | #define __ISetupInstanceCatalog_FWD_DEFINED__
|
| 100 | typedef struct ISetupInstanceCatalog ISetupInstanceCatalog;
|
| 101 | #endif
|
| 102 |
|
| 103 | #ifndef __ISetupLocalizedProperties_FWD_DEFINED__
|
| 104 | #define __ISetupLocalizedProperties_FWD_DEFINED__
|
| 105 | typedef struct ISetupLocalizedProperties ISetupLocalizedProperties;
|
| 106 | #endif
|
| 107 |
|
| 108 | #ifndef __IEnumSetupInstances_FWD_DEFINED__
|
| 109 | #define __IEnumSetupInstances_FWD_DEFINED__
|
| 110 | typedef struct IEnumSetupInstances IEnumSetupInstances;
|
| 111 | #endif
|
| 112 |
|
| 113 | #ifndef __ISetupConfiguration_FWD_DEFINED__
|
| 114 | #define __ISetupConfiguration_FWD_DEFINED__
|
| 115 | typedef struct ISetupConfiguration ISetupConfiguration;
|
| 116 | #endif
|
| 117 |
|
| 118 | #ifndef __ISetupConfiguration2_FWD_DEFINED__
|
| 119 | #define __ISetupConfiguration2_FWD_DEFINED__
|
| 120 | typedef struct ISetupConfiguration2 ISetupConfiguration2;
|
| 121 | #endif
|
| 122 |
|
| 123 | #ifndef __ISetupPackageReference_FWD_DEFINED__
|
| 124 | #define __ISetupPackageReference_FWD_DEFINED__
|
| 125 | typedef struct ISetupPackageReference ISetupPackageReference;
|
| 126 | #endif
|
| 127 |
|
| 128 | #ifndef __ISetupHelper_FWD_DEFINED__
|
| 129 | #define __ISetupHelper_FWD_DEFINED__
|
| 130 | typedef struct ISetupHelper ISetupHelper;
|
| 131 | #endif
|
| 132 |
|
| 133 | #ifndef __ISetupErrorState_FWD_DEFINED__
|
| 134 | #define __ISetupErrorState_FWD_DEFINED__
|
| 135 | typedef struct ISetupErrorState ISetupErrorState;
|
| 136 | #endif
|
| 137 |
|
| 138 | #ifndef __ISetupErrorState2_FWD_DEFINED__
|
| 139 | #define __ISetupErrorState2_FWD_DEFINED__
|
| 140 | typedef struct ISetupErrorState2 ISetupErrorState2;
|
| 141 | #endif
|
| 142 |
|
| 143 | #ifndef __ISetupFailedPackageReference_FWD_DEFINED__
|
| 144 | #define __ISetupFailedPackageReference_FWD_DEFINED__
|
| 145 | typedef struct ISetupFailedPackageReference ISetupFailedPackageReference;
|
| 146 | #endif
|
| 147 |
|
| 148 | #ifndef __ISetupFailedPackageReference2_FWD_DEFINED__
|
| 149 | #define __ISetupFailedPackageReference2_FWD_DEFINED__
|
| 150 | typedef struct ISetupFailedPackageReference2 ISetupFailedPackageReference2;
|
| 151 | #endif
|
| 152 |
|
| 153 | #ifndef __ISetupPropertyStore_FWD_DEFINED__
|
| 154 | #define __ISetupPropertyStore_FWD_DEFINED__
|
| 155 | typedef struct ISetupPropertyStore ISetupPropertyStore;
|
| 156 | #endif
|
| 157 |
|
| 158 | #ifndef __ISetupLocalizedPropertyStore_FWD_DEFINED__
|
| 159 | #define __ISetupLocalizedPropertyStore_FWD_DEFINED__
|
| 160 | typedef struct ISetupLocalizedPropertyStore ISetupLocalizedPropertyStore;
|
| 161 | #endif
|
| 162 |
|
| 163 | // Forward class declarations
|
| 164 | //
|
| 165 | #ifndef __SetupConfiguration_FWD_DEFINED__
|
| 166 | #define __SetupConfiguration_FWD_DEFINED__
|
| 167 |
|
| 168 | #ifdef __cplusplus
|
| 169 | typedef class SetupConfiguration SetupConfiguration;
|
| 170 | #endif
|
| 171 |
|
| 172 | #endif
|
| 173 |
|
| 174 | #ifndef _MSC_VER
|
| 175 | #define _Deref_out_opt_
|
| 176 | #endif
|
| 177 |
|
| 178 | #ifdef __cplusplus
|
| 179 | extern "C" {
|
| 180 | #endif
|
| 181 |
|
| 182 | 	// Interface definitions
|
| 183 | 	//
|
| 184 | 	EXTERN_C const IID IID_ISetupInstance;
|
| 185 |
|
| 186 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 187 | 	/// <summary>
|
| 188 | 	/// Information about an instance of a product.
|
| 189 | 	/// </summary>
|
| 190 | 	struct DECLSPEC_UUID("B41463C3-8866-43B5-BC33-2B0676F7F42E") DECLSPEC_NOVTABLE ISetupInstance : public IUnknown
|
| 191 | 	{
|
| 192 | 		/// <summary>
|
| 193 | 		/// Gets the instance identifier (should match the name of the parent instance directory).
|
| 194 | 		/// </summary>
|
| 195 | 		/// <param name="pbstrInstanceId">The instance identifier.</param>
|
| 196 | 		/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist.</returns>
|
| 197 | 		STDMETHOD(GetInstanceId)(
|
| 198 | 			_Out_ BSTR* pbstrInstanceId
|
| 199 | 			) = 0;
|
| 200 |
|
| 201 | 	/// <summary>
|
| 202 | 	/// Gets the local date and time when the installation was originally installed.
|
| 203 | 	/// </summary>
|
| 204 | 	/// <param name="pInstallDate">The local date and time when the installation was originally installed.</param>
|
| 205 | 	/// <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>
|
| 206 | 	STDMETHOD(GetInstallDate)(
|
| 207 | 		_Out_ LPFILETIME pInstallDate
|
| 208 | 		) = 0;
|
| 209 |
|
| 210 | 	/// <summary>
|
| 211 | 	/// Gets the unique name of the installation, often indicating the branch and other information used for telemetry.
|
| 212 | 	/// </summary>
|
| 213 | 	/// <param name="pbstrInstallationName">The unique name of the installation, often indicating the branch and other information used for telemetry.</param>
|
| 214 | 	/// <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>
|
| 215 | 	STDMETHOD(GetInstallationName)(
|
| 216 | 		_Out_ BSTR* pbstrInstallationName
|
| 217 | 		) = 0;
|
| 218 |
|
| 219 | 	/// <summary>
|
| 220 | 	/// Gets the path to the installation root of the product.
|
| 221 | 	/// </summary>
|
| 222 | 	/// <param name="pbstrInstallationPath">The path to the installation root of the product.</param>
|
| 223 | 	/// <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>
|
| 224 | 	STDMETHOD(GetInstallationPath)(
|
| 225 | 		_Out_ BSTR* pbstrInstallationPath
|
| 226 | 		) = 0;
|
| 227 |
|
| 228 | 	/// <summary>
|
| 229 | 	/// Gets the version of the product installed in this instance.
|
| 230 | 	/// </summary>
|
| 231 | 	/// <param name="pbstrInstallationVersion">The version of the product installed in this instance.</param>
|
| 232 | 	/// <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>
|
| 233 | 	STDMETHOD(GetInstallationVersion)(
|
| 234 | 		_Out_ BSTR* pbstrInstallationVersion
|
| 235 | 		) = 0;
|
| 236 |
|
| 237 | 	/// <summary>
|
| 238 | 	/// Gets the display name (title) of the product installed in this instance.
|
| 239 | 	/// </summary>
|
| 240 | 	/// <param name="lcid">The LCID for the display name.</param>
|
| 241 | 	/// <param name="pbstrDisplayName">The display name (title) of the product installed in this instance.</param>
|
| 242 | 	/// <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>
|
| 243 | 	STDMETHOD(GetDisplayName)(
|
| 244 | 		_In_ LCID lcid,
|
| 245 | 		_Out_ BSTR* pbstrDisplayName
|
| 246 | 		) = 0;
|
| 247 |
|
| 248 | 	/// <summary>
|
| 249 | 	/// Gets the description of the product installed in this instance.
|
| 250 | 	/// </summary>
|
| 251 | 	/// <param name="lcid">The LCID for the description.</param>
|
| 252 | 	/// <param name="pbstrDescription">The description of the product installed in this instance.</param>
|
| 253 | 	/// <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>
|
| 254 | 	STDMETHOD(GetDescription)(
|
| 255 | 		_In_ LCID lcid,
|
| 256 | 		_Out_ BSTR* pbstrDescription
|
| 257 | 		) = 0;
|
| 258 |
|
| 259 | 	/// <summary>
|
| 260 | 	/// Resolves the optional relative path to the root path of the instance.
|
| 261 | 	/// </summary>
|
| 262 | 	/// <param name="pwszRelativePath">A relative path within the instance to resolve, or NULL to get the root path.</param>
|
| 263 | 	/// <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>
|
| 264 | 	/// <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>
|
| 265 | 	STDMETHOD(ResolvePath)(
|
| 266 | 		_In_opt_z_ LPCOLESTR pwszRelativePath,
|
| 267 | 		_Out_ BSTR* pbstrAbsolutePath
|
| 268 | 		) = 0;
|
| 269 | 	};
|
| 270 | #endif
|
| 271 |
|
| 272 | 	EXTERN_C const IID IID_ISetupInstance2;
|
| 273 |
|
| 274 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 275 | 	/// <summary>
|
| 276 | 	/// Information about an instance of a product.
|
| 277 | 	/// </summary>
|
| 278 | 	struct DECLSPEC_UUID("89143C9A-05AF-49B0-B717-72E218A2185C") DECLSPEC_NOVTABLE ISetupInstance2 : public ISetupInstance
|
| 279 | 	{
|
| 280 | 		/// <summary>
|
| 281 | 		/// Gets the state of the instance.
|
| 282 | 		/// </summary>
|
| 283 | 		/// <param name="pState">The state of the instance.</param>
|
| 284 | 		/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist.</returns>
|
| 285 | 		STDMETHOD(GetState)(
|
| 286 | 			_Out_ InstanceState* pState
|
| 287 | 			) = 0;
|
| 288 |
|
| 289 | 	/// <summary>
|
| 290 | 	/// Gets an array of package references registered to the instance.
|
| 291 | 	/// </summary>
|
| 292 | 	/// <param name="ppsaPackages">Pointer to an array of <see cref="ISetupPackageReference"/>.</param>
|
| 293 | 	/// <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>
|
| 294 | 	STDMETHOD(GetPackages)(
|
| 295 | 		_Out_ LPSAFEARRAY* ppsaPackages
|
| 296 | 		) = 0;
|
| 297 |
|
| 298 | 	/// <summary>
|
| 299 | 	/// Gets a pointer to the <see cref="ISetupPackageReference"/> that represents the registered product.
|
| 300 | 	/// </summary>
|
| 301 | 	/// <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>
|
| 302 | 	/// <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>
|
| 303 | 	STDMETHOD(GetProduct)(
|
| 304 | 		_Outptr_result_maybenull_ ISetupPackageReference** ppPackage
|
| 305 | 		) = 0;
|
| 306 |
|
| 307 | 	/// <summary>
|
| 308 | 	/// Gets the relative path to the product application, if available.
|
| 309 | 	/// </summary>
|
| 310 | 	/// <param name="pbstrProductPath">The relative path to the product application, if available.</param>
|
| 311 | 	/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist.</returns>
|
| 312 | 	STDMETHOD(GetProductPath)(
|
| 313 | 		_Outptr_result_maybenull_ BSTR* pbstrProductPath
|
| 314 | 		) = 0;
|
| 315 |
|
| 316 | 	/// <summary>
|
| 317 | 	/// Gets the error state of the instance, if available.
|
| 318 | 	/// </summary>
|
| 319 | 	/// <param name="pErrorState">The error state of the instance, if available.</param>
|
| 320 | 	/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist.</returns>
|
| 321 | 	STDMETHOD(GetErrors)(
|
| 322 | 		_Outptr_result_maybenull_ ISetupErrorState** ppErrorState
|
| 323 | 		) = 0;
|
| 324 |
|
| 325 | 	/// <summary>
|
| 326 | 	/// Gets a value indicating whether the instance can be launched.
|
| 327 | 	/// </summary>
|
| 328 | 	/// <param name="pfIsLaunchable">Whether the instance can be launched.</param>
|
| 329 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 330 | 	/// <remarks>
|
| 331 | 	/// An instance could have had errors during install but still be launched. Some features may not work correctly, but others will.
|
| 332 | 	/// </remarks>
|
| 333 | 	STDMETHOD(IsLaunchable)(
|
| 334 | 		_Out_ VARIANT_BOOL* pfIsLaunchable
|
| 335 | 		) = 0;
|
| 336 |
|
| 337 | 	/// <summary>
|
| 338 | 	/// Gets a value indicating whether the instance is complete.
|
| 339 | 	/// </summary>
|
| 340 | 	/// <param name="pfIsLaunchable">Whether the instance is complete.</param>
|
| 341 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 342 | 	/// <remarks>
|
| 343 | 	/// An instance is complete if it had no errors during install, resume, or repair.
|
| 344 | 	/// </remarks>
|
| 345 | 	STDMETHOD(IsComplete)(
|
| 346 | 		_Out_ VARIANT_BOOL* pfIsComplete
|
| 347 | 		) = 0;
|
| 348 |
|
| 349 | 	/// <summary>
|
| 350 | 	/// Gets product-specific properties.
|
| 351 | 	/// </summary>
|
| 352 | 	/// <param name="ppPropeties">A pointer to an instance of <see cref="ISetupPropertyStore"/>. This may be NULL if no properties are defined.</param>
|
| 353 | 	/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist.</returns>
|
| 354 | 	STDMETHOD(GetProperties)(
|
| 355 | 		_Outptr_result_maybenull_ ISetupPropertyStore** ppProperties
|
| 356 | 		) = 0;
|
| 357 |
|
| 358 | 	/// <summary>
|
| 359 | 	/// Gets the directory path to the setup engine that installed the instance.
|
| 360 | 	/// </summary>
|
| 361 | 	/// <param name="pbstrEnginePath">The directory path to the setup engine that installed the instance.</param>
|
| 362 | 	/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist.</returns>
|
| 363 | 	STDMETHOD(GetEnginePath)(
|
| 364 | 		_Outptr_result_maybenull_ BSTR* pbstrEnginePath
|
| 365 | 		) = 0;
|
| 366 | 	};
|
| 367 | #endif
|
| 368 |
|
| 369 | 	EXTERN_C const IID IID_ISetupInstanceCatalog;
|
| 370 |
|
| 371 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 372 | 	/// <summary>
|
| 373 | 	/// Information about a catalog used to install an instance.
|
| 374 | 	/// </summary>
|
| 375 | 	struct DECLSPEC_UUID("9AD8E40F-39A2-40F1-BF64-0A6C50DD9EEB") DECLSPEC_NOVTABLE ISetupInstanceCatalog : public IUnknown
|
| 376 | 	{
|
| 377 | 		/// <summary>
|
| 378 | 		/// Gets catalog information properties.
|
| 379 | 		/// </summary>
|
| 380 | 		/// <param name="ppCatalogInfo">A pointer to an instance of <see cref="ISetupPropertyStore"/>.</param>
|
| 381 | 		/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property does not exist.</returns>
|
| 382 | 		STDMETHOD(GetCatalogInfo)(
|
| 383 | 			_Out_ ISetupPropertyStore** ppCatalogInfo
|
| 384 | 			) = 0;
|
| 385 |
|
| 386 | 	/// <summary>
|
| 387 | 	/// Gets a value indicating whether the catalog is a prerelease.
|
| 388 | 	/// </summary>
|
| 389 | 	/// <param name="pfIsPrerelease">Whether the catalog for the instance is a prerelease version.</param>
|
| 390 | 	/// <returns>Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property does not exist.</returns>
|
| 391 | 	STDMETHOD(IsPrerelease)(
|
| 392 | 		_Out_ VARIANT_BOOL* pfIsPrerelease
|
| 393 | 		) = 0;
|
| 394 | 	};
|
| 395 | #endif
|
| 396 |
|
| 397 | 	EXTERN_C const IID IID_ISetupLocalizedProperties;
|
| 398 |
|
| 399 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 400 | 	/// <summary>
|
| 401 | 	/// Provides localized properties of an instance of a product.
|
| 402 | 	/// </summary>
|
| 403 | 	struct DECLSPEC_UUID("F4BD7382-FE27-4AB4-B974-9905B2A148B0") DECLSPEC_NOVTABLE ISetupLocalizedProperties : public IUnknown
|
| 404 | 	{
|
| 405 | 		/// <summary>
|
| 406 | 		/// Gets localized product-specific properties.
|
| 407 | 		/// </summary>
|
| 408 | 		/// <param name="ppLocalizedProperties">A pointer to an instance of <see cref="ISetupLocalizedPropertyStore"/>. This may be NULL if no properties are defined.</param>
|
| 409 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 410 | 		STDMETHOD(GetLocalizedProperties)(
|
| 411 | 			_Outptr_result_maybenull_ ISetupLocalizedPropertyStore** ppLocalizedProperties
|
| 412 | 			) = 0;
|
| 413 |
|
| 414 | 	/// <summary>
|
| 415 | 	/// Gets localized channel-specific properties.
|
| 416 | 	/// </summary>
|
| 417 | 	/// <param name="ppLocalizedChannelProperties">A pointer to an instance of <see cref="ISetupLocalizedPropertyStore"/>. This may be NULL if no channel properties are defined.</param>
|
| 418 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 419 | 	STDMETHOD(GetLocalizedChannelProperties)(
|
| 420 | 		_Outptr_result_maybenull_ ISetupLocalizedPropertyStore** ppLocalizedChannelProperties
|
| 421 | 		) = 0;
|
| 422 | 	};
|
| 423 | #endif
|
| 424 |
|
| 425 | 	EXTERN_C const IID IID_IEnumSetupInstances;
|
| 426 |
|
| 427 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 428 | 	/// <summary>
|
| 429 | 	/// An enumerator of installed <see cref="ISetupInstance"/> objects.
|
| 430 | 	/// </summary>
|
| 431 | 	struct DECLSPEC_UUID("6380BCFF-41D3-4B2E-8B2E-BF8A6810C848") DECLSPEC_NOVTABLE IEnumSetupInstances : public IUnknown
|
| 432 | 	{
|
| 433 | 		/// <summary>
|
| 434 | 		/// Retrieves the next set of product instances in the enumeration sequence.
|
| 435 | 		/// </summary>
|
| 436 | 		/// <param name="celt">The number of product instances to retrieve.</param>
|
| 437 | 		/// <param name="rgelt">A pointer to an array of <see cref="ISetupInstance"/>.</param>
|
| 438 | 		/// <param name="pceltFetched">A pointer to the number of product instances retrieved. If <paramref name="celt"/> is 1 this parameter may be NULL.</param>
|
| 439 | 		/// <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>
|
| 440 | 		STDMETHOD(Next)(
|
| 441 | 			_In_ ULONG celt,
|
| 442 | 			_Out_writes_to_(celt, *pceltFetched) ISetupInstance** rgelt,
|
| 443 | 			_Out_opt_ _Deref_out_range_(0, celt) ULONG* pceltFetched
|
| 444 | 			) = 0;
|
| 445 |
|
| 446 | 	/// <summary>
|
| 447 | 	/// Skips the next set of product instances in the enumeration sequence.
|
| 448 | 	/// </summary>
|
| 449 | 	/// <param name="celt">The number of product instances to skip.</param>
|
| 450 | 	/// <returns>S_OK if the number of elements could be skipped; otherwise, S_FALSE;</returns>
|
| 451 | 	STDMETHOD(Skip)(
|
| 452 | 		_In_ ULONG celt
|
| 453 | 		) = 0;
|
| 454 |
|
| 455 | 	/// <summary>
|
| 456 | 	/// Resets the enumeration sequence to the beginning.
|
| 457 | 	/// </summary>
|
| 458 | 	/// <returns>Always returns S_OK;</returns>
|
| 459 | 	STDMETHOD(Reset)(void) = 0;
|
| 460 |
|
| 461 | 	/// <summary>
|
| 462 | 	/// 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.
|
| 463 | 	/// </summary>
|
| 464 | 	/// <param name="ppenum">A pointer to a pointer to a new <see cref="IEnumSetupInstances"/> interface. If the method fails, this parameter is undefined.</param>
|
| 465 | 	/// <returns>S_OK if a clone was returned; otherwise, E_OUTOFMEMORY.</returns>
|
| 466 | 	STDMETHOD(Clone)(
|
| 467 | 		_Deref_out_opt_ IEnumSetupInstances** ppenum
|
| 468 | 		) = 0;
|
| 469 | 	};
|
| 470 | #endif
|
| 471 |
|
| 472 | 	EXTERN_C const IID IID_ISetupConfiguration;
|
| 473 |
|
| 474 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 475 |
|
| 476 | #ifdef __GNUC__
|
| 477 | __CRT_UUID_DECL(ISetupConfiguration, 0x42843719, 0xDB4C, 0x46C2, 0x8E, 0x7C, 0x64, 0xF1, 0x81, 0x6E, 0xFD, 0x5B);
|
| 478 | #endif
|
| 479 |
|
| 480 | 	/// <summary>
|
| 481 | 	/// Gets information about product instances installed on the machine.
|
| 482 | 	/// </summary>
|
| 483 | 	struct DECLSPEC_UUID("42843719-DB4C-46C2-8E7C-64F1816EFD5B") DECLSPEC_NOVTABLE ISetupConfiguration : public IUnknown
|
| 484 | 	{
|
| 485 | 		/// <summary>
|
| 486 | 		/// Enumerates all launchable product instances installed.
|
| 487 | 		/// </summary>
|
| 488 | 		/// <param name="ppEnumInstances">An enumeration of completed, installed product instances.</param>
|
| 489 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 490 | 		STDMETHOD(EnumInstances)(
|
| 491 | 			_Out_ IEnumSetupInstances** ppEnumInstances
|
| 492 | 			) = 0;
|
| 493 |
|
| 494 | 	/// <summary>
|
| 495 | 	/// Gets the instance for the current process path.
|
| 496 | 	/// </summary>
|
| 497 | 	/// <param name="ppInstance">The instance for the current process path.</param>
|
| 498 | 	/// <returns>
|
| 499 | 	/// The instance for the current process path, or E_NOTFOUND if not found.
|
| 500 | 	/// The <see cref="ISetupInstance::GetState"/> may indicate the instance is invalid.
|
| 501 | 	/// </returns>
|
| 502 | 	/// <remarks>
|
| 503 | 	/// The returned instance may not be launchable.
|
| 504 | 	/// </remarks>
|
| 505 | 	STDMETHOD(GetInstanceForCurrentProcess)(
|
| 506 | 		_Out_ ISetupInstance** ppInstance
|
| 507 | 		) = 0;
|
| 508 |
|
| 509 | 	/// <summary>
|
| 510 | 	/// Gets the instance for the given path.
|
| 511 | 	/// </summary>
|
| 512 | 	/// <param name="ppInstance">The instance for the given path.</param>
|
| 513 | 	/// <returns>
|
| 514 | 	/// The instance for the given path, or E_NOTFOUND if not found.
|
| 515 | 	/// The <see cref="ISetupInstance::GetState"/> may indicate the instance is invalid.
|
| 516 | 	/// </returns>
|
| 517 | 	/// <remarks>
|
| 518 | 	/// The returned instance may not be launchable.
|
| 519 | 	/// </remarks>
|
| 520 | 	STDMETHOD(GetInstanceForPath)(
|
| 521 | 		_In_z_ LPCWSTR wzPath,
|
| 522 | 		_Out_ ISetupInstance** ppInstance
|
| 523 | 		) = 0;
|
| 524 | 	};
|
| 525 | #endif
|
| 526 |
|
| 527 | 	EXTERN_C const IID IID_ISetupConfiguration2;
|
| 528 |
|
| 529 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 530 | 	/// <summary>
|
| 531 | 	/// Gets information about product instances.
|
| 532 | 	/// </summary>
|
| 533 | 	struct DECLSPEC_UUID("26AAB78C-4A60-49D6-AF3B-3C35BC93365D") DECLSPEC_NOVTABLE ISetupConfiguration2 : public ISetupConfiguration
|
| 534 | 	{
|
| 535 | 		/// <summary>
|
| 536 | 		/// Enumerates all product instances.
|
| 537 | 		/// </summary>
|
| 538 | 		/// <param name="ppEnumInstances">An enumeration of all product instances.</param>
|
| 539 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 540 | 		STDMETHOD(EnumAllInstances)(
|
| 541 | 			_Out_ IEnumSetupInstances** ppEnumInstances
|
| 542 | 			) = 0;
|
| 543 | 	};
|
| 544 | #endif
|
| 545 |
|
| 546 | 	EXTERN_C const IID IID_ISetupPackageReference;
|
| 547 |
|
| 548 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 549 | 	/// <summary>
|
| 550 | 	/// A reference to a package.
|
| 551 | 	/// </summary>
|
| 552 | 	struct DECLSPEC_UUID("da8d8a16-b2b6-4487-a2f1-594ccccd6bf5") DECLSPEC_NOVTABLE ISetupPackageReference : public IUnknown
|
| 553 | 	{
|
| 554 | 		/// <summary>
|
| 555 | 		/// Gets the general package identifier.
|
| 556 | 		/// </summary>
|
| 557 | 		/// <param name="pbstrId">The general package identifier.</param>
|
| 558 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 559 | 		STDMETHOD(GetId)(
|
| 560 | 			_Out_ BSTR* pbstrId
|
| 561 | 			) = 0;
|
| 562 |
|
| 563 | 	/// <summary>
|
| 564 | 	/// Gets the version of the package.
|
| 565 | 	/// </summary>
|
| 566 | 	/// <param name="pbstrVersion">The version of the package.</param>
|
| 567 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 568 | 	STDMETHOD(GetVersion)(
|
| 569 | 		_Out_ BSTR* pbstrVersion
|
| 570 | 		) = 0;
|
| 571 |
|
| 572 | 	/// <summary>
|
| 573 | 	/// Gets the target process architecture of the package.
|
| 574 | 	/// </summary>
|
| 575 | 	/// <param name="pbstrChip">The target process architecture of the package.</param>
|
| 576 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 577 | 	STDMETHOD(GetChip)(
|
| 578 | 		_Out_ BSTR* pbstrChip
|
| 579 | 		) = 0;
|
| 580 |
|
| 581 | 	/// <summary>
|
| 582 | 	/// Gets the language and optional region identifier.
|
| 583 | 	/// </summary>
|
| 584 | 	/// <param name="pbstrLanguage">The language and optional region identifier.</param>
|
| 585 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 586 | 	STDMETHOD(GetLanguage)(
|
| 587 | 		_Out_ BSTR* pbstrLanguage
|
| 588 | 		) = 0;
|
| 589 |
|
| 590 | 	/// <summary>
|
| 591 | 	/// Gets the build branch of the package.
|
| 592 | 	/// </summary>
|
| 593 | 	/// <param name="pbstrBranch">The build branch of the package.</param>
|
| 594 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 595 | 	STDMETHOD(GetBranch)(
|
| 596 | 		_Out_ BSTR* pbstrBranch
|
| 597 | 		) = 0;
|
| 598 |
|
| 599 | 	/// <summary>
|
| 600 | 	/// Gets the type of the package.
|
| 601 | 	/// </summary>
|
| 602 | 	/// <param name="pbstrType">The type of the package.</param>
|
| 603 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 604 | 	STDMETHOD(GetType)(
|
| 605 | 		_Out_ BSTR* pbstrType
|
| 606 | 		) = 0;
|
| 607 |
|
| 608 | 	/// <summary>
|
| 609 | 	/// Gets the unique identifier consisting of all defined tokens.
|
| 610 | 	/// </summary>
|
| 611 | 	/// <param name="pbstrUniqueId">The unique identifier consisting of all defined tokens.</param>
|
| 612 | 	/// <returns>Standard HRESULT indicating success or failure, including E_UNEXPECTED if no Id was defined (required).</returns>
|
| 613 | 	STDMETHOD(GetUniqueId)(
|
| 614 | 		_Out_ BSTR* pbstrUniqueId
|
| 615 | 		) = 0;
|
| 616 |
|
| 617 | 	/// <summary>
|
| 618 | 	/// Gets a value indicating whether the package refers to an external extension.
|
| 619 | 	/// </summary>
|
| 620 | 	/// <param name="pfIsExtension">A value indicating whether the package refers to an external extension.</param>
|
| 621 | 	/// <returns>Standard HRESULT indicating success or failure, including E_UNEXPECTED if no Id was defined (required).</returns>
|
| 622 | 	STDMETHOD(GetIsExtension)(
|
| 623 | 		_Out_ VARIANT_BOOL* pfIsExtension
|
| 624 | 		) = 0;
|
| 625 | 	};
|
| 626 | #endif
|
| 627 |
|
| 628 | 	EXTERN_C const IID IID_ISetupHelper;
|
| 629 |
|
| 630 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 631 | 	/// <summary>
|
| 632 | 	/// Helper functions.
|
| 633 | 	/// </summary>
|
| 634 | 	/// <remarks>
|
| 635 | 	/// You can query for this interface from the <see cref="SetupConfiguration"/> class.
|
| 636 | 	/// </remarks>
|
| 637 | 	struct DECLSPEC_UUID("42b21b78-6192-463e-87bf-d577838f1d5c") DECLSPEC_NOVTABLE ISetupHelper : public IUnknown
|
| 638 | 	{
|
| 639 | 		/// <summary>
|
| 640 | 		/// Parses a dotted quad version string into a 64-bit unsigned integer.
|
| 641 | 		/// </summary>
|
| 642 | 		/// <param name="pwszVersion">The dotted quad version string to parse, e.g. 1.2.3.4.</param>
|
| 643 | 		/// <param name="pullVersion">A 64-bit unsigned integer representing the version. You can compare this to other versions.</param>
|
| 644 | 		/// <returns>Standard HRESULT indicating success or failure, including E_INVALIDARG if the version is not valid.</returns>
|
| 645 | 		STDMETHOD(ParseVersion)(
|
| 646 | 			_In_ LPCOLESTR pwszVersion,
|
| 647 | 			_Out_ PULONGLONG pullVersion
|
| 648 | 			) = 0;
|
| 649 |
|
| 650 | 	/// <summary>
|
| 651 | 	/// Parses a dotted quad version string into a 64-bit unsigned integer.
|
| 652 | 	/// </summary>
|
| 653 | 	/// <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>
|
| 654 | 	/// <param name="pullMinVersion">A 64-bit unsigned integer representing the minimum version, which may be 0. You can compare this to other versions.</param>
|
| 655 | 	/// <param name="pullMaxVersion">A 64-bit unsigned integer representing the maximum version, which may be MAXULONGLONG. You can compare this to other versions.</param>
|
| 656 | 	/// <returns>Standard HRESULT indicating success or failure, including E_INVALIDARG if the version range is not valid.</returns>
|
| 657 | 	STDMETHOD(ParseVersionRange)(
|
| 658 | 		_In_ LPCOLESTR pwszVersionRange,
|
| 659 | 		_Out_ PULONGLONG pullMinVersion,
|
| 660 | 		_Out_ PULONGLONG pullMaxVersion
|
| 661 | 		) = 0;
|
| 662 | 	};
|
| 663 | #endif
|
| 664 |
|
| 665 | 	EXTERN_C const IID IID_ISetupErrorState;
|
| 666 |
|
| 667 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 668 | 	/// <summary>
|
| 669 | 	/// Information about the error state of an instance.
|
| 670 | 	/// </summary>
|
| 671 | 	struct DECLSPEC_UUID("46DCCD94-A287-476A-851E-DFBC2FFDBC20") DECLSPEC_NOVTABLE ISetupErrorState : public IUnknown
|
| 672 | 	{
|
| 673 | 		/// <summary>
|
| 674 | 		/// Gets an array of failed package references.
|
| 675 | 		/// </summary>
|
| 676 | 		/// <param name="ppsaPackages">Pointer to an array of <see cref="ISetupFailedPackageReference"/>, if packages have failed.</param>
|
| 677 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 678 | 		STDMETHOD(GetFailedPackages)(
|
| 679 | 			_Outptr_result_maybenull_ LPSAFEARRAY* ppsaFailedPackages
|
| 680 | 			) = 0;
|
| 681 |
|
| 682 | 	/// <summary>
|
| 683 | 	/// Gets an array of skipped package references.
|
| 684 | 	/// </summary>
|
| 685 | 	/// <param name="ppsaPackages">Pointer to an array of <see cref="ISetupPackageReference"/>, if packages have been skipped.</param>
|
| 686 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 687 | 	STDMETHOD(GetSkippedPackages)(
|
| 688 | 		_Outptr_result_maybenull_ LPSAFEARRAY* ppsaSkippedPackages
|
| 689 | 		) = 0;
|
| 690 | 	};
|
| 691 | #endif
|
| 692 |
|
| 693 | 	EXTERN_C const IID IID_ISetupErrorState2;
|
| 694 |
|
| 695 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 696 | 	/// <summary>
|
| 697 | 	/// Information about the error state of an instance.
|
| 698 | 	/// </summary>
|
| 699 | 	struct DECLSPEC_UUID("9871385B-CA69-48F2-BC1F-7A37CBF0B1EF") DECLSPEC_NOVTABLE ISetupErrorState2 : public ISetupErrorState
|
| 700 | 	{
|
| 701 | 		/// <summary>
|
| 702 | 		/// Gets the path to the error log.
|
| 703 | 		/// </summary>
|
| 704 | 		/// <param name="pbstrChip">The path to the error log.</param>
|
| 705 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 706 | 		STDMETHOD(GetErrorLogFilePath)(
|
| 707 | 			_Outptr_result_maybenull_ BSTR* pbstrErrorLogFilePath
|
| 708 | 			) = 0;
|
| 709 |
|
| 710 | 	/// <summary>
|
| 711 | 	/// Gets the path to the main setup log.
|
| 712 | 	/// </summary>
|
| 713 | 	/// <param name="pbstrChip">The path to the main setup log.</param>
|
| 714 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 715 | 	STDMETHOD(GetLogFilePath)(
|
| 716 | 		_Outptr_result_maybenull_ BSTR* pbstrLogFilePath
|
| 717 | 		) = 0;
|
| 718 | 	};
|
| 719 | #endif
|
| 720 |
|
| 721 | 	EXTERN_C const IID IID_ISetupFailedPackageReference;
|
| 722 |
|
| 723 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 724 | 	/// <summary>
|
| 725 | 	/// A reference to a failed package.
|
| 726 | 	/// </summary>
|
| 727 | 	struct DECLSPEC_UUID("E73559CD-7003-4022-B134-27DC650B280F") DECLSPEC_NOVTABLE ISetupFailedPackageReference : public ISetupPackageReference
|
| 728 | 	{
|
| 729 | 	};
|
| 730 |
|
| 731 | #endif
|
| 732 |
|
| 733 | 	EXTERN_C const IID IID_ISetupFailedPackageReference2;
|
| 734 |
|
| 735 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 736 | 	/// <summary>
|
| 737 | 	/// A reference to a failed package.
|
| 738 | 	/// </summary>
|
| 739 | 	struct DECLSPEC_UUID("0FAD873E-E874-42E3-B268-4FE2F096B9CA") DECLSPEC_NOVTABLE ISetupFailedPackageReference2 : public ISetupFailedPackageReference
|
| 740 | 	{
|
| 741 | 		/// <summary>
|
| 742 | 		/// Gets the path to the optional package log.
|
| 743 | 		/// </summary>
|
| 744 | 		/// <param name="pbstrId">The path to the optional package log.</param>
|
| 745 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 746 | 		STDMETHOD(GetLogFilePath)(
|
| 747 | 			_Outptr_result_maybenull_ BSTR* pbstrLogFilePath
|
| 748 | 			) = 0;
|
| 749 |
|
| 750 | 	/// <summary>
|
| 751 | 	/// Gets the description of the package failure.
|
| 752 | 	/// </summary>
|
| 753 | 	/// <param name="pbstrId">The description of the package failure.</param>
|
| 754 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 755 | 	STDMETHOD(GetDescription)(
|
| 756 | 		_Outptr_result_maybenull_ BSTR* pbstrDescription
|
| 757 | 		) = 0;
|
| 758 |
|
| 759 | 	/// <summary>
|
| 760 | 	/// Gets the signature to use for feedback reporting.
|
| 761 | 	/// </summary>
|
| 762 | 	/// <param name="pbstrId">The signature to use for feedback reporting.</param>
|
| 763 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 764 | 	STDMETHOD(GetSignature)(
|
| 765 | 		_Outptr_result_maybenull_ BSTR* pbstrSignature
|
| 766 | 		) = 0;
|
| 767 |
|
| 768 | 	/// <summary>
|
| 769 | 	/// Gets the array of details for this package failure.
|
| 770 | 	/// </summary>
|
| 771 | 	/// <param name="ppsaDetails">Pointer to an array of details as BSTRs.</param>
|
| 772 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 773 | 	STDMETHOD(GetDetails)(
|
| 774 | 		_Out_ LPSAFEARRAY* ppsaDetails
|
| 775 | 		) = 0;
|
| 776 |
|
| 777 | 	/// <summary>
|
| 778 | 	/// Gets an array of packages affected by this package failure.
|
| 779 | 	/// </summary>
|
| 780 | 	/// <param name="ppsaPackages">Pointer to an array of <see cref="ISetupPackageReference"/> for packages affected by this package failure. This may be NULL.</param>
|
| 781 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 782 | 	STDMETHOD(GetAffectedPackages)(
|
| 783 | 		_Out_ LPSAFEARRAY* ppsaAffectedPackages
|
| 784 | 		) = 0;
|
| 785 | 	};
|
| 786 |
|
| 787 | #endif
|
| 788 |
|
| 789 | 	EXTERN_C const IID IID_ISetupPropertyStore;
|
| 790 |
|
| 791 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 792 | 	/// <summary>
|
| 793 | 	/// Provides named properties.
|
| 794 | 	/// </summary>
|
| 795 | 	/// <remarks>
|
| 796 | 	/// You can get this from an <see cref="ISetupInstance"/>, <see cref="ISetupPackageReference"/>, or derivative.
|
| 797 | 	/// </remarks>
|
| 798 | 	struct DECLSPEC_UUID("C601C175-A3BE-44BC-91F6-4568D230FC83") DECLSPEC_NOVTABLE ISetupPropertyStore : public IUnknown
|
| 799 | 	{
|
| 800 | 		/// <summary>
|
| 801 | 		/// Gets an array of property names in this property store.
|
| 802 | 		/// </summary>
|
| 803 | 		/// <param name="ppsaNames">Pointer to an array of property names as BSTRs.</param>
|
| 804 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 805 | 		STDMETHOD(GetNames)(
|
| 806 | 			_Out_ LPSAFEARRAY* ppsaNames
|
| 807 | 			) = 0;
|
| 808 |
|
| 809 | 	/// <summary>
|
| 810 | 	/// Gets the value of a named property in this property store.
|
| 811 | 	/// </summary>
|
| 812 | 	/// <param name="pwszName">The name of the property to get.</param>
|
| 813 | 	/// <param name="pvtValue">The value of the property.</param>
|
| 814 | 	/// <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>
|
| 815 | 	STDMETHOD(GetValue)(
|
| 816 | 		_In_ LPCOLESTR pwszName,
|
| 817 | 		_Out_ LPVARIANT pvtValue
|
| 818 | 		) = 0;
|
| 819 | 	};
|
| 820 |
|
| 821 | #endif
|
| 822 |
|
| 823 | 	EXTERN_C const IID IID_ISetupLocalizedPropertyStore;
|
| 824 |
|
| 825 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
| 826 | 	/// <summary>
|
| 827 | 	/// Provides localized named properties.
|
| 828 | 	/// </summary>
|
| 829 | 	/// <remarks>
|
| 830 | 	/// You can get this from an <see cref="ISetupLocalizedProperties"/>.
|
| 831 | 	/// </remarks>
|
| 832 | 	struct DECLSPEC_UUID("5BB53126-E0D5-43DF-80F1-6B161E5C6F6C") DECLSPEC_NOVTABLE ISetupLocalizedPropertyStore : public IUnknown
|
| 833 | 	{
|
| 834 | 		/// <summary>
|
| 835 | 		/// Gets an array of property names in this property store.
|
| 836 | 		/// </summary>
|
| 837 | 		/// <param name="lcid">The LCID for the property names.</param>
|
| 838 | 		/// <param name="ppsaNames">Pointer to an array of property names as BSTRs.</param>
|
| 839 | 		/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 840 | 		STDMETHOD(GetNames)(
|
| 841 | 			_In_ LCID lcid,
|
| 842 | 			_Out_ LPSAFEARRAY* ppsaNames
|
| 843 | 			) = 0;
|
| 844 |
|
| 845 | 	/// <summary>
|
| 846 | 	/// Gets the value of a named property in this property store.
|
| 847 | 	/// </summary>
|
| 848 | 	/// <param name="pwszName">The name of the property to get.</param>
|
| 849 | 	/// <param name="lcid">The LCID for the property.</param>
|
| 850 | 	/// <param name="pvtValue">The value of the property.</param>
|
| 851 | 	/// <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>
|
| 852 | 	STDMETHOD(GetValue)(
|
| 853 | 		_In_ LPCOLESTR pwszName,
|
| 854 | 		_In_ LCID lcid,
|
| 855 | 		_Out_ LPVARIANT pvtValue
|
| 856 | 		) = 0;
|
| 857 | 	};
|
| 858 |
|
| 859 | #endif
|
| 860 |
|
| 861 | 	// Class declarations
|
| 862 | 	//
|
| 863 | 	EXTERN_C const CLSID CLSID_SetupConfiguration;
|
| 864 |
|
| 865 | #ifdef __cplusplus
|
| 866 |
|
| 867 | #ifdef __GNUC__
|
| 868 | __CRT_UUID_DECL(SetupConfiguration, 0x177F0C4A, 0x1CD3, 0x4DE7, 0xA3, 0x2C, 0x71, 0xDB, 0xBB, 0x9F, 0xA3, 0x6D);
|
| 869 | #endif
|
| 870 |
|
| 871 | 	/// <summary>
|
| 872 | 	/// This class implements <see cref="ISetupConfiguration"/>, <see cref="ISetupConfiguration2"/>, and <see cref="ISetupHelper"/>.
|
| 873 | 	/// </summary>
|
| 874 | 	class DECLSPEC_UUID("177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D") SetupConfiguration;
|
| 875 | #endif
|
| 876 | 	// Function declarations
|
| 877 | 	//
|
| 878 | 	/// <summary>
|
| 879 | 	/// Gets an <see cref="ISetupConfiguration"/> that provides information about product instances installed on the machine.
|
| 880 | 	/// </summary>
|
| 881 | 	/// <param name="ppConfiguration">The <see cref="ISetupConfiguration"/> that provides information about product instances installed on the machine.</param>
|
| 882 | 	/// <param name="pReserved">Reserved for future use.</param>
|
| 883 | 	/// <returns>Standard HRESULT indicating success or failure.</returns>
|
| 884 | 	STDMETHODIMP GetSetupConfiguration(
|
| 885 | 		_Out_ ISetupConfiguration** ppConfiguration,
|
| 886 | 		_Reserved_ LPVOID pReserved
|
| 887 | 	);
|
| 888 |
|
| 889 | #ifdef __cplusplus
|
| 890 | }
|
| 891 | #endif
|
| 892 |
|
| 893 | _COM_SMARTPTR_TYPEDEF(ISetupInstance, __uuidof(ISetupInstance));
|
| 894 | _COM_SMARTPTR_TYPEDEF(ISetupInstance2, __uuidof(ISetupInstance2));
|
| 895 | _COM_SMARTPTR_TYPEDEF(IEnumSetupInstances, __uuidof(IEnumSetupInstances));
|
| 896 | _COM_SMARTPTR_TYPEDEF(ISetupConfiguration, __uuidof(ISetupConfiguration));
|
| 897 | _COM_SMARTPTR_TYPEDEF(ISetupConfiguration2, __uuidof(ISetupConfiguration2));
|
| 898 | _COM_SMARTPTR_TYPEDEF(ISetupHelper, __uuidof(ISetupHelper));
|
| 899 | _COM_SMARTPTR_TYPEDEF(ISetupPackageReference, __uuidof(ISetupPackageReference));
|
| 900 | _COM_SMARTPTR_TYPEDEF(ISetupPropertyStore, __uuidof(ISetupPropertyStore));
|
| 901 | _COM_SMARTPTR_TYPEDEF(ISetupInstanceCatalog, __uuidof(ISetupInstanceCatalog));
|