CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/uso_trigger/MiniUsoClient.h
Views: 11766
1
#pragma once
2
3
#include <comdef.h>
4
#pragma comment(lib, "rpcrt4.lib")
5
6
typedef enum UsoAction {
7
USO_STARTSCAN,
8
USO_STARTDOWNLOAD,
9
USO_STARTINSTALL,
10
USO_REFRESHSETTINGS,
11
USO_STARTINTERACTIVESCAN,
12
USO_RESTARTDEVICE,
13
USO_SCANINSTALLWAIT,
14
USO_RESUMEUPDATE
15
} UsoAction;
16
17
class MiniUsoClient
18
{
19
private:
20
bool _ready = false;
21
void ThrowOnError(HRESULT hResult);
22
23
public:
24
MiniUsoClient();
25
~MiniUsoClient();
26
27
public:
28
bool Run(UsoAction action);
29
};
30
31
struct Struct_5 {
32
int Member0;
33
int Member4;
34
};
35
36
struct Struct_23 {
37
GUID Member0;
38
int Member10;
39
};
40
41
struct Struct_24 {
42
int Member0;
43
int Member4;
44
int Member8;
45
};
46
47
struct Struct_25 {
48
int Member0;
49
int Member4;
50
};
51
52
struct Struct_26 {
53
int Member0;
54
int Member4;
55
struct Struct_5 Member8;
56
struct Struct_25 Member10;
57
};
58
59
struct Struct_33 {
60
int Member0;
61
int Member4;
62
};
63
64
struct Struct_49 {
65
short Member0;
66
short Member2;
67
short Member4;
68
short Member6;
69
short Member8;
70
short MemberA;
71
short MemberC;
72
short MemberE;
73
};
74
75
class __declspec(uuid("d960b85b-11b6-4442-a45c-771283ed293a")) IUsoUpdate : public IUnknown {
76
public:
77
virtual HRESULT __stdcall Proc3(struct Struct_26* p0) = 0;
78
virtual HRESULT __stdcall Proc4(int* p0) = 0;
79
virtual HRESULT __stdcall Proc5(int* p0) = 0;
80
virtual HRESULT __stdcall Proc6(BSTR* p0) = 0;
81
virtual HRESULT __stdcall Proc7(BSTR* p0) = 0;
82
virtual HRESULT __stdcall Proc8(short* p0) = 0;
83
virtual HRESULT __stdcall Proc9(struct Struct_23* p0) = 0;
84
virtual HRESULT __stdcall Proc10(BSTR* p0, int* p1) = 0; // HRESULT Proc10(/* Stack Offset: 8 */ [Out] /* C:(FC_TOP_LEVEL_CONFORMANCE)(16)(FC_DEREFERENCE)(FC_LONG)(0) */ BSTR[]* p0, /* Stack Offset: 16 */ [Out] int* p1);
85
virtual HRESULT __stdcall Proc11(BSTR* p0) = 0;
86
virtual HRESULT __stdcall Proc12(double* p0) = 0;
87
virtual HRESULT __stdcall Proc13(VARIANT* p0) = 0;
88
virtual HRESULT __stdcall Proc14(BSTR* p0) = 0;
89
virtual HRESULT __stdcall Proc15(long* p0) = 0;
90
virtual HRESULT __stdcall Proc16(long* p0) = 0;
91
virtual HRESULT __stdcall Proc17(long* p0) = 0;
92
virtual HRESULT __stdcall Proc18() = 0;
93
virtual HRESULT __stdcall Proc19(BSTR p0, VARIANT* p1) = 0;
94
virtual HRESULT __stdcall Proc20(BSTR p0, VARIANT* p1) = 0;
95
virtual HRESULT __stdcall Proc21(int p0, VARIANT* p1) = 0;
96
virtual HRESULT __stdcall Proc22() = 0;
97
};
98
99
_COM_SMARTPTR_TYPEDEF(IUsoUpdate, __uuidof(IUsoUpdate));
100
101
102
class __declspec(uuid("a1e78367-46b7-4ac8-affa-d9f55645223b")) IUsoUpdateCollection : public IUnknown {
103
public:
104
virtual HRESULT __stdcall Proc3(int p0, IUsoUpdate** p1) = 0;
105
virtual HRESULT __stdcall Proc4(IUnknown** p0) = 0;
106
virtual HRESULT __stdcall Proc5(int* p0) = 0;
107
virtual HRESULT __stdcall Proc6() = 0;
108
virtual HRESULT __stdcall Proc7(int p0) = 0;
109
};
110
111
_COM_SMARTPTR_TYPEDEF(IUsoUpdateCollection, __uuidof(IUsoUpdateCollection));
112
113
114
class __declspec(uuid("580cf13a-20a4-4adc-9322-6dcb8f5c0d0c")) IUsoUpdateHistoryEntry : public IUnknown {
115
public:
116
virtual HRESULT __stdcall Proc3(struct Struct_23* p0) = 0;
117
virtual HRESULT __stdcall Proc4(int* p0) = 0;
118
virtual HRESULT __stdcall Proc5(int* p0) = 0;
119
virtual HRESULT __stdcall Proc6(int* p0) = 0;
120
virtual HRESULT __stdcall Proc7(double* p0) = 0;
121
virtual HRESULT __stdcall Proc8(BSTR* p0) = 0;
122
virtual HRESULT __stdcall Proc9(BSTR* p0) = 0;
123
virtual HRESULT __stdcall Proc10(BSTR* p0) = 0;
124
virtual HRESULT __stdcall Proc11(int* p0) = 0;
125
virtual HRESULT __stdcall Proc12(BSTR* p0, int* p1) = 0; // HRESULT Proc12(/* Stack Offset: 8 */ [Out] /* C:(FC_TOP_LEVEL_CONFORMANCE)(16)(FC_DEREFERENCE)(FC_LONG)(0) */ BSTR[]* p0, /* Stack Offset: 16 */ [Out] int* p1);
126
virtual HRESULT __stdcall Proc13(int* p0) = 0;
127
virtual HRESULT __stdcall Proc14(BSTR* p0) = 0;
128
};
129
130
_COM_SMARTPTR_TYPEDEF(IUsoUpdateHistoryEntry, __uuidof(IUsoUpdateHistoryEntry));
131
132
133
class __declspec(uuid("7b51947d-62f0-4e71-af2d-c337dff99e57")) IUsoUpdateHistoryEntryCollection : public IUnknown {
134
public:
135
virtual HRESULT __stdcall Proc3(int* p0) = 0;
136
virtual HRESULT __stdcall Proc4(int p0, IUsoUpdateHistoryEntry** p1) = 0;
137
};
138
139
_COM_SMARTPTR_TYPEDEF(IUsoUpdateHistoryEntryCollection, __uuidof(IUsoUpdateHistoryEntryCollection));
140
141
142
class __declspec(uuid("b357f841-2130-454e-802c-5c398b549f8e")) IUsoSession : public IUnknown {
143
public:
144
virtual HRESULT __stdcall Proc3(GUID* p0) = 0;
145
virtual HRESULT __stdcall Proc4(int* p0) = 0;
146
virtual HRESULT __stdcall Proc5(struct Struct_24* p0) = 0;
147
virtual HRESULT __stdcall Proc6(struct Struct_25* p0) = 0;
148
virtual HRESULT __stdcall Proc7(int p0, IUsoUpdateCollection** p1) = 0;
149
virtual HRESULT __stdcall Proc8(int* p0) = 0;
150
virtual HRESULT __stdcall Proc9(struct Struct_5* p0) = 0;
151
virtual HRESULT __stdcall Proc10(struct Struct_5* p0) = 0;
152
virtual HRESULT __stdcall Proc11(struct Struct_5* p0) = 0;
153
virtual HRESULT __stdcall Proc12(int* p0) = 0;
154
virtual HRESULT __stdcall Proc13(int* p0) = 0;
155
virtual HRESULT __stdcall Proc14(short* p0) = 0;
156
virtual HRESULT __stdcall Proc15(BSTR* p0) = 0;
157
virtual HRESULT __stdcall Proc16(BSTR* p0) = 0;
158
virtual HRESULT __stdcall Proc17(int* p0) = 0;
159
virtual HRESULT __stdcall Proc18() = 0;
160
virtual HRESULT __stdcall Proc19() = 0;
161
virtual HRESULT __stdcall Proc20(int p0, int p1, int* p2, short p3, short p4, int p5) = 0;
162
virtual HRESULT __stdcall Proc21(short p0, short p1, const wchar_t* p2) = 0; // Proc21(short p0, short p1, wchar_t* p2) = 0;
163
virtual HRESULT __stdcall Proc22(short p0) = 0;
164
virtual HRESULT __stdcall Proc23(short p0) = 0;
165
virtual HRESULT __stdcall Proc24() = 0;
166
virtual HRESULT __stdcall Proc25(int p0, int p1, IUsoUpdateHistoryEntryCollection** p2) = 0;
167
virtual HRESULT __stdcall Proc26(int* p0) = 0;
168
virtual HRESULT __stdcall Proc27(int* p0) = 0;
169
virtual HRESULT __stdcall Proc28(wchar_t* p0, int p1, wchar_t* p2) = 0; // HRESULT Proc28(/* Stack Offset: 8 */ [In] /* C:(FC_TOP_LEVEL_CONFORMANCE)(16)(FC_ZERO)(FC_ULONG)(0) */ /* unique */wchar_t*[]* p0, /* Stack Offset: 16 */ [In] int p1, /* Stack Offset: 24 */ [In] wchar_t* p2);
170
virtual HRESULT __stdcall Proc29(int p0, wchar_t* p1, int p2) = 0; // HRESULT Proc29(/* Stack Offset: 8 */ [In] int p0, /* Stack Offset: 16 */ [Out] /* (FC_TOP_LEVEL_CONFORMANCE)(24)(FC_ZERO)(FC_ULONG)(0) */wchar_t[1]* p1, /* Stack Offset: 24 */ [In] int p2);
171
virtual HRESULT __stdcall Proc30() = 0;
172
virtual HRESULT __stdcall Proc31(int p0) = 0;
173
};
174
175
_COM_SMARTPTR_TYPEDEF(IUsoSession, __uuidof(IUsoSession));
176
177
class IUsoSettingObject;
178
class __declspec(uuid("da4baa07-66c8-499a-828d-ba8ff181717c")) IUsoSettingArray : public IUnknown {
179
public:
180
virtual HRESULT __stdcall Proc3(int p0, VARIANT* p1) = 0;
181
virtual HRESULT __stdcall Proc4(int* p0) = 0;
182
virtual HRESULT __stdcall Proc5(int p0, IUsoSettingObject** p1) = 0;
183
virtual HRESULT __stdcall Proc6(int p0, IUsoSettingArray** p1) = 0;
184
};
185
186
_COM_SMARTPTR_TYPEDEF(IUsoSettingArray, __uuidof(IUsoSettingArray));
187
188
189
class __declspec(uuid("edb89974-450a-4370-be41-70132df7119e")) IUsoSettingObject : public IUnknown {
190
public:
191
virtual HRESULT __stdcall Proc3(wchar_t* p0, VARIANT* p1) = 0;
192
virtual HRESULT __stdcall Proc4(wchar_t* p0, IUsoSettingObject** p1) = 0;
193
virtual HRESULT __stdcall Proc5(wchar_t* p0, IUsoSettingArray** p1) = 0;
194
};
195
196
_COM_SMARTPTR_TYPEDEF(IUsoSettingObject, __uuidof(IUsoSettingObject));
197
198
199
class __declspec(uuid("fccc288d-b47e-41fa-970c-935ec952f4a4")) IUsoSessionCommon : public IUsoSession {
200
public:
201
virtual HRESULT __stdcall Proc32(IUsoUpdateCollection** p0) = 0;
202
virtual HRESULT __stdcall Proc33(short* p0) = 0;
203
virtual HRESULT __stdcall Proc34(short* p0) = 0;
204
virtual HRESULT __stdcall Proc35(short p0) = 0;
205
virtual HRESULT __stdcall Proc36(int p0) = 0;
206
virtual HRESULT __stdcall Proc37(int* p0) = 0;
207
virtual HRESULT __stdcall Proc38(wchar_t* p0, VARIANT* p1) = 0;
208
virtual HRESULT __stdcall Proc39(wchar_t* p0, VARIANT* p1) = 0;
209
virtual HRESULT __stdcall Proc40(int p0, VARIANT* p1) = 0;
210
virtual HRESULT __stdcall Proc41(int p0, VARIANT* p1) = 0;
211
virtual HRESULT __stdcall Proc42(wchar_t* p0, wchar_t* p1, wchar_t* p2) = 0;
212
virtual HRESULT __stdcall Proc43(wchar_t* p0, wchar_t* p1, wchar_t* p2) = 0;
213
virtual HRESULT __stdcall Proc44(int p0, VARIANT* p1, int* p2) = 0;
214
virtual HRESULT __stdcall Proc45(int p0, long* p1, long* p2) = 0;
215
virtual HRESULT __stdcall Proc46() = 0;
216
virtual HRESULT __stdcall Proc47(int p0, short p1, VARIANT* p2) = 0;
217
virtual HRESULT __stdcall Proc48(int p0, int p1, int p2, int* p3) = 0;
218
virtual HRESULT __stdcall Proc49(int p0, VARIANT* p1, int* p2) = 0;
219
virtual HRESULT __stdcall Proc50(int* p0) = 0;
220
virtual HRESULT __stdcall Proc51(wchar_t* p0, VARIANT* p1) = 0;
221
virtual HRESULT __stdcall Proc52() = 0;
222
virtual HRESULT __stdcall Proc53(wchar_t* p0, VARIANT* p1) = 0;
223
virtual HRESULT __stdcall Proc54(int* p0) = 0;
224
virtual HRESULT __stdcall Proc55() = 0;
225
virtual HRESULT __stdcall Proc56(wchar_t* p0, VARIANT* p1) = 0;
226
virtual HRESULT __stdcall Proc57(int p0, VARIANT* p1, int* p2, int* p3) = 0;
227
virtual HRESULT __stdcall Proc58(int p0, VARIANT* p1, int* p2, int* p3) = 0;
228
virtual HRESULT __stdcall Proc59(int p0, IUsoSettingObject** p1) = 0;
229
virtual HRESULT __stdcall Proc60(int p0, IUsoSettingArray** p1) = 0;
230
virtual HRESULT __stdcall Proc61() = 0;
231
virtual HRESULT __stdcall Proc62() = 0;
232
virtual HRESULT __stdcall Proc63() = 0;
233
virtual HRESULT __stdcall Proc64(int p0, int* p1) = 0;
234
virtual HRESULT __stdcall Proc65(int* p0, int* p1, struct Struct_33* p2) = 0;
235
virtual HRESULT __stdcall Proc66(IUsoUpdateCollection** p0) = 0;
236
virtual HRESULT __stdcall Proc67() = 0;
237
virtual HRESULT __stdcall Proc68() = 0;
238
};
239
240
_COM_SMARTPTR_TYPEDEF(IUsoSessionCommon, __uuidof(IUsoSessionCommon));
241
242
243
class __declspec(uuid("a244654f-a777-4739-a8e2-5fd4abbd6799")) IUsoSessionCollection : public IUnknown {
244
public:
245
virtual HRESULT __stdcall Proc3(int* p0) = 0;
246
virtual HRESULT __stdcall Proc4(int p0, IUsoSession** p1) = 0;
247
};
248
249
_COM_SMARTPTR_TYPEDEF(IUsoSessionCollection, __uuidof(IUsoSessionCollection));
250
251
252
class __declspec(uuid("833ee9a0-2999-432c-8ef2-87a8ec2d748d")) IUxUpdateManager : public IUnknown {
253
public:
254
virtual HRESULT __stdcall Proc3(int p0, int* p1, int* p2) = 0;
255
virtual HRESULT __stdcall Proc4(int p0, int* p1, int* p2) = 0;
256
virtual HRESULT __stdcall Proc5(int p0, struct Struct_49* p1, int* p2) = 0;
257
virtual HRESULT __stdcall Proc6(int p0, int p1) = 0;
258
virtual HRESULT __stdcall Proc7(int p0, int p1) = 0;
259
virtual HRESULT __stdcall Proc8(int p0, struct Struct_49* p1) = 0;
260
virtual HRESULT __stdcall Proc9(int p0) = 0;
261
virtual HRESULT __stdcall Proc10(int* p0, struct Struct_49* p1) = 0;
262
virtual HRESULT __stdcall Proc11(wchar_t* p0, struct Struct_49* p1) = 0;
263
virtual HRESULT __stdcall Proc12() = 0;
264
virtual HRESULT __stdcall Proc13() = 0;
265
virtual HRESULT __stdcall Proc14() = 0;
266
virtual HRESULT __stdcall Proc15(struct Struct_49* p0) = 0;
267
virtual HRESULT __stdcall Proc16() = 0;
268
virtual HRESULT __stdcall Proc17(int* p0) = 0;
269
virtual HRESULT __stdcall Proc18() = 0;
270
virtual HRESULT __stdcall Proc19() = 0;
271
virtual HRESULT __stdcall Proc20() = 0;
272
virtual HRESULT __stdcall Proc21() = 0;
273
virtual HRESULT __stdcall Proc22() = 0;
274
virtual HRESULT __stdcall Proc23() = 0;
275
virtual HRESULT __stdcall Proc24(int p0, int p1, int* p2, short p3, short p4, int p5) = 0;
276
virtual HRESULT __stdcall Proc25(int p0, int p1, int p2, int* p3) = 0;
277
virtual HRESULT __stdcall Proc26(int p0, int p1, int* p2) = 0;
278
virtual HRESULT __stdcall Proc27(int p0, VARIANT* p1, int* p2, int* p3) = 0;
279
virtual HRESULT __stdcall Proc28(int p0, VARIANT* p1, int* p2, int* p3) = 0;
280
virtual HRESULT __stdcall Proc29(int p0, short p1, VARIANT* p2) = 0;
281
virtual HRESULT __stdcall Proc30(int* p0) = 0;
282
virtual HRESULT __stdcall Proc31(int p0) = 0;
283
virtual HRESULT __stdcall Proc32(int p0, int* p1) = 0;
284
virtual HRESULT __stdcall Proc33(int* p0) = 0;
285
};
286
287
_COM_SMARTPTR_TYPEDEF(IUxUpdateManager, __uuidof(IUxUpdateManager));
288
289
290
class __declspec(uuid("c53f3549-0dbf-429a-8297-c812ba00742d")) IUniversalOrchestrator : public IUnknown {
291
public:
292
virtual HRESULT __stdcall Proc3(wchar_t* p0, int* p1) = 0;
293
virtual HRESULT __stdcall Proc4(wchar_t* p0, wchar_t* p1, wchar_t* p2, wchar_t* p3) = 0;
294
virtual HRESULT __stdcall Proc5(wchar_t* p0, int p1) = 0;
295
};
296
297
_COM_SMARTPTR_TYPEDEF(IUniversalOrchestrator, __uuidof(IUniversalOrchestrator));
298
299
300
class __declspec(uuid("07f3afac-7c8a-4ce7-a5e0-3d24ee8a77e0")) IUpdateSessionOrchestrator : public IUnknown {
301
public:
302
virtual HRESULT __stdcall CreateUpdateSession(int param_1, GUID* param_2, IUsoSessionCommon** param_3) = 0;
303
virtual HRESULT __stdcall GetCurrentActiveUpdateSessions(IUsoSessionCollection** param_1) = 0;
304
virtual HRESULT __stdcall LogTaskRunning(const wchar_t* param_1) = 0;
305
virtual HRESULT __stdcall CreateUxUpdateManager(IUxUpdateManager** param_1) = 0;
306
virtual HRESULT __stdcall CreateUniversalOrchestrator(IUniversalOrchestrator** param_1) = 0;
307
};
308
309
_COM_SMARTPTR_TYPEDEF(IUpdateSessionOrchestrator, __uuidof(IUpdateSessionOrchestrator));
310
311
312