authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-09 14:03:39-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-09 14:04:38-07:00
log4d10fbef10f79334b866c0f52f802c203ef9690c
treea5d1a61ead6bfaaff47ce061d7006c9f1621840b
parente0d5ae75af98cf38cab701cd4d915ca53cb48684

windows_com: add missing __CRT_UUID_DECL() for IEnumSetupInstances

This is intended to fix this error: lld-link: error: undefined symbol: _GUID const& __mingw_uuidof<IEnumSetupInstances>() >>> referenced by D:\a\1\s\src\windows_com.hpp:898 >>> D:\a\1\s\zig-cache\o\a5030d467932f0ce2f6511feb7d6af12\windows_sdk.obj:(__IEnumSetupInstances_IID_getter()) Thank you to Martin Storsjö for suggesting the fix.

1 files changed, 909 insertions(+), 904 deletions(-)

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