1use ctypes::{c_long, c_short};
7use shared::minwindef::{DWORD, INT};
8use shared::wtypes::{BSTR, DATE, VARIANT_BOOL};
9use um::minwinbase::SYSTEMTIME;
10use um::oaidl::{IDispatch, IDispatchVtbl, SAFEARRAY, VARIANT};
11use um::unknwnbase::{IUnknown, IUnknownVtbl, LPUNKNOWN};
12use um::winnt::{HRESULT, LONG};
13RIDL!{#[uuid(0x0f87369f, 0xa4e5, 0x4cfc, 0xbd, 0x3e, 0x73, 0xe6, 0x15, 0x45, 0x72, 0xdd)]
14class TaskScheduler;}
15RIDL!{#[uuid(0xf2a69db7, 0xda2c, 0x4352, 0x90, 0x66, 0x86, 0xfe, 0xe6, 0xda, 0xca, 0xc9)]
16class TaskHandlerPS;}
17RIDL!{#[uuid(0x9f15266d, 0xd7ba, 0x48f0, 0x93, 0xc1, 0xe6, 0x89, 0x5f, 0x6f, 0xe5, 0xac)]
18class TaskHandlerStatusPS;}
19RIDL!{#[uuid(0x79184a66, 0x8664, 0x423f, 0x97, 0xf1, 0x63, 0x73, 0x56, 0xa5, 0xd8, 0x12)]
20interface ITaskFolderCollection(ITaskFolderCollectionVtbl): IDispatch(IDispatchVtbl) {
21 fn get_Count(
22 pCount: *mut LONG,
23 ) -> HRESULT,
24 fn get_Item(
25 index: VARIANT,
26 ppFolder: *mut *mut ITaskFolder,
27 ) -> HRESULT,
28 fn get__NewEnum(
29 ppEnum: *mut LPUNKNOWN,
30 ) -> HRESULT,
31}}
32RIDL!{#[uuid(0x8cfac062, 0xa080, 0x4c15, 0x9a, 0x88, 0xaa, 0x7c, 0x2a, 0xf8, 0x0d, 0xfc)]
33interface ITaskFolder(ITaskFolderVtbl): IDispatch(IDispatchVtbl) {
34 fn get_Name(
35 pName: *mut BSTR,
36 ) -> HRESULT,
37 fn get_Path(
38 pPath: *mut BSTR,
39 ) -> HRESULT,
40 fn GetFolder(
41 Path: BSTR,
42 ppFolder: *mut *mut ITaskFolder,
43 ) -> HRESULT,
44 fn GetFolders(
45 flags: LONG,
46 ppFolders: *mut *mut ITaskFolderCollection,
47 ) -> HRESULT,
48 fn CreateFolder(
49 subFolderName: BSTR,
50 sddl: VARIANT,
51 ppFolder: *mut *mut ITaskFolder,
52 ) -> HRESULT,
53 fn DeleteFolder(
54 subFolderName: BSTR,
55 flags: LONG,
56 ) -> HRESULT,
57 fn GetTask(
58 Path: BSTR,
59 ppTask: *mut *mut IRegisteredTask,
60 ) -> HRESULT,
61 fn GetTasks(
62 flags: LONG,
63 ppTasks: *mut *mut IRegisteredTaskCollection,
64 ) -> HRESULT,
65 fn DeleteTask(
66 Name: BSTR,
67 flags: LONG,
68 ) -> HRESULT,
69 fn RegisterTask(
70 Path: BSTR,
71 XmlText: BSTR,
72 flags: LONG,
73 UserId: VARIANT,
74 password: VARIANT,
75 LogonType: TASK_LOGON_TYPE,
76 sddl: VARIANT,
77 ppTask: *mut *mut IRegisteredTask,
78 ) -> HRESULT,
79 fn RegisterTaskDefinition(
80 Path: BSTR,
81 pDefinition: *const ITaskDefinition,
82 flags: LONG,
83 UserId: VARIANT,
84 password: VARIANT,
85 LogonType: TASK_LOGON_TYPE,
86 sddl: VARIANT,
87 ppTask: *mut *mut IRegisteredTask,
88 ) -> HRESULT,
89 fn GetSecurityDescriptor(
90 securityInformation: LONG,
91 pSddl: *mut BSTR,
92 ) -> HRESULT,
93 fn SetSecurityDescriptor(
94 sddl: BSTR,
95 flags: LONG,
96 ) -> HRESULT,
97}}
98RIDL!{#[uuid(0x9c86f320, 0xdee3, 0x4dd1, 0xb9, 0x72, 0xa3, 0x03, 0xf2, 0x6b, 0x06, 0x1e)]
99interface IRegisteredTask(IRegisteredTaskVtbl): IDispatch(IDispatchVtbl) {
100 fn get_Name(
101 pName: *mut BSTR,
102 ) -> HRESULT,
103 fn get_Path(
104 pPath: *mut BSTR,
105 ) -> HRESULT,
106 fn get_State(
107 pState: *mut TASK_STATE,
108 ) -> HRESULT,
109 fn get_Enabled(
110 pEnabled: *mut VARIANT_BOOL,
111 ) -> HRESULT,
112 fn put_Enabled(
113 pEnabled: VARIANT_BOOL,
114 ) -> HRESULT,
115 fn Run(
116 params: VARIANT,
117 ppRunningTask: *mut *mut IRunningTask,
118 ) -> HRESULT,
119 fn RunEx(
120 params: VARIANT,
121 flags: LONG,
122 sessionID: LONG,
123 user: BSTR,
124 ppRunningTask: *mut *mut IRunningTask,
125 ) -> HRESULT,
126 fn GetInstances(
127 flags: LONG,
128 ppRunningTasks: *mut *mut IRunningTaskCollection,
129 ) -> HRESULT,
130 fn get_LastRunTime(
131 pLastRunTime: *mut DATE,
132 ) -> HRESULT,
133 fn get_LastTaskResult(
134 pLastTaskResult: *mut LONG,
135 ) -> HRESULT,
136 fn get_NumberOfMissedRuns(
137 pNumberOfMissedRuns: *mut LONG,
138 ) -> HRESULT,
139 fn get_NextRunTime(
140 pNextRunTime: *mut DATE,
141 ) -> HRESULT,
142 fn get_Definition(
143 ppDefinition: *mut *mut ITaskDefinition,
144 ) -> HRESULT,
145 fn get_Xml(
146 pXml: *mut BSTR,
147 ) -> HRESULT,
148 fn GetSecurityDescriptor(
149 securityInformation: LONG,
150 pSddl: *mut BSTR,
151 ) -> HRESULT,
152 fn SetSecurityDescriptor(
153 sddl: BSTR,
154 flags: LONG,
155 ) -> HRESULT,
156 fn Stop(
157 flags: LONG,
158 ) -> HRESULT,
159 fn GetRunTimes(
160 pstStart: *const SYSTEMTIME,
161 pstEnd: *const SYSTEMTIME,
162 pCount: *mut DWORD,
163 pRunTimes: *mut *mut SYSTEMTIME,
164 ) -> HRESULT,
165}}
166ENUM!{enum TASK_STATE {
167 TASK_STATE_UNKNOWN = 0,
168 TASK_STATE_DISABLED = 1,
169 TASK_STATE_QUEUED = 2,
170 TASK_STATE_READY = 3,
171 TASK_STATE_RUNNING = 4,
172}}
173RIDL!{#[uuid(0x653758fb, 0x7b9a, 0x4f1e, 0xa4, 0x71, 0xbe, 0xeb, 0x8e, 0x9b, 0x83, 0x4e)]
174interface IRunningTask(IRunningTaskVtbl): IDispatch(IDispatchVtbl) {
175 fn get_Name(
176 pName: *mut BSTR,
177 ) -> HRESULT,
178 fn get_InstanceGuid(
179 pGuid: *mut BSTR,
180 ) -> HRESULT,
181 fn get_Path(
182 pPath: *mut BSTR,
183 ) -> HRESULT,
184 fn get_State(
185 pState: *mut TASK_STATE,
186 ) -> HRESULT,
187 fn get_CurrentAction(
188 pName: *mut BSTR,
189 ) -> HRESULT,
190 fn Stop() -> HRESULT,
191 fn Refresh() -> HRESULT,
192 fn get_EnginePID(
193 pPID: *mut DWORD,
194 ) -> HRESULT,
195}}
196RIDL!{#[uuid(0x6a67614b, 0x6828, 0x4fec, 0xaa, 0x54, 0x6d, 0x52, 0xe8, 0xf1, 0xf2, 0xdb)]
197interface IRunningTaskCollection(IRunningTaskCollectionVtbl): IDispatch(IDispatchVtbl) {
198 fn get_Count(
199 pCount: *mut LONG,
200 ) -> HRESULT,
201 fn get_Item(
202 index: VARIANT,
203 ppRunningTask: *mut *mut IRunningTask,
204 ) -> HRESULT,
205 fn get__NewEnum(
206 ppEnum: *mut LPUNKNOWN,
207 ) -> HRESULT,
208}}
209RIDL!{#[uuid(0xf5bc8fc5, 0x536d, 0x4f77, 0xb8, 0x52, 0xfb, 0xc1, 0x35, 0x6f, 0xde, 0xb6)]
210interface ITaskDefinition(ITaskDefinitionVtbl): IDispatch(IDispatchVtbl) {
211 fn get_RegistrationInfo(
212 ppRegistrationInfo: *mut *mut IRegistrationInfo,
213 ) -> HRESULT,
214 fn put_RegistrationInfo(
215 ppRegistrationInfo: *const IRegistrationInfo,
216 ) -> HRESULT,
217 fn get_Triggers(
218 ppTriggers: *mut *mut ITriggerCollection,
219 ) -> HRESULT,
220 fn put_Triggers(
221 ppTriggers: *const ITriggerCollection,
222 ) -> HRESULT,
223 fn get_Settings(
224 ppSettings: *mut *mut ITaskSettings,
225 ) -> HRESULT,
226 fn put_Settings(
227 ppSettings: *const ITaskSettings,
228 ) -> HRESULT,
229 fn get_Data(
230 pData: *mut BSTR,
231 ) -> HRESULT,
232 fn put_Data(
233 pData: BSTR,
234 ) -> HRESULT,
235 fn get_Principal(
236 ppPrincipal: *mut *mut IPrincipal,
237 ) -> HRESULT,
238 fn put_Principal(
239 ppPrincipal: *const IPrincipal,
240 ) -> HRESULT,
241 fn get_Actions(
242 ppActions: *mut *mut IActionCollection,
243 ) -> HRESULT,
244 fn put_Actions(
245 ppActions: *const IActionCollection,
246 ) -> HRESULT,
247 fn get_XmlText(
248 pXml: *mut BSTR,
249 ) -> HRESULT,
250 fn put_XmlText(
251 pXml: BSTR,
252 ) -> HRESULT,
253}}
254RIDL!{#[uuid(0x416d8b73, 0xcb41, 0x4ea1, 0x80, 0x5c, 0x9b, 0xe9, 0xa5, 0xac, 0x4a, 0x74)]
255interface IRegistrationInfo(IRegistrationInfoVtbl): IDispatch(IDispatchVtbl) {
256 fn get_Description(
257 pDescription: *mut BSTR,
258 ) -> HRESULT,
259 fn put_Description(
260 pDescription: BSTR,
261 ) -> HRESULT,
262 fn get_Author(
263 pAuthor: *mut BSTR,
264 ) -> HRESULT,
265 fn put_Author(
266 pAuthor: BSTR,
267 ) -> HRESULT,
268 fn get_Version(
269 pVersion: *mut BSTR,
270 ) -> HRESULT,
271 fn put_Version(
272 pVersion: BSTR,
273 ) -> HRESULT,
274 fn get_Date(
275 pDate: *mut BSTR,
276 ) -> HRESULT,
277 fn put_Date(
278 pDate: BSTR,
279 ) -> HRESULT,
280 fn get_Documentation(
281 pDocumentation: *mut BSTR,
282 ) -> HRESULT,
283 fn put_Documentation(
284 pDocumentation: BSTR,
285 ) -> HRESULT,
286 fn get_XmlText(
287 pText: *mut BSTR,
288 ) -> HRESULT,
289 fn put_XmlText(
290 pText: BSTR,
291 ) -> HRESULT,
292 fn get_URI(
293 pUri: *mut BSTR,
294 ) -> HRESULT,
295 fn put_URI(
296 pUri: BSTR,
297 ) -> HRESULT,
298 fn get_SecurityDescriptor(
299 pSddl: *mut VARIANT,
300 ) -> HRESULT,
301 fn put_SecurityDescriptor(
302 pSddl: VARIANT,
303 ) -> HRESULT,
304 fn get_Source(
305 pSource: *mut BSTR,
306 ) -> HRESULT,
307 fn put_Source(
308 pSource: BSTR,
309 ) -> HRESULT,
310}}
311RIDL!{#[uuid(0x85df5081, 0x1b24, 0x4f32, 0x87, 0x8a, 0xd9, 0xd1, 0x4d, 0xf4, 0xcb, 0x77)]
312interface ITriggerCollection(ITriggerCollectionVtbl): IDispatch(IDispatchVtbl) {
313 fn get_Count(
314 pCount: *mut c_long,
315 ) -> HRESULT,
316 fn get_Item(
317 index: c_long,
318 ppTrigger: *mut *mut ITrigger,
319 ) -> HRESULT,
320 fn get__NewEnum(
321 ppEnum: *mut LPUNKNOWN,
322 ) -> HRESULT,
323 fn Create(
324 Type: TASK_TRIGGER_TYPE2,
325 ppTrigger: *mut *mut ITrigger,
326 ) -> HRESULT,
327 fn Remove(
328 index: VARIANT,
329 ) -> HRESULT,
330 fn Clear() -> HRESULT,
331}}
332RIDL!{#[uuid(0x09941815, 0xea89, 0x4b5b, 0x89, 0xe0, 0x2a, 0x77, 0x38, 0x01, 0xfa, 0xc3)]
333interface ITrigger(ITriggerVtbl): IDispatch(IDispatchVtbl) {
334 fn get_Type(
335 pType: *mut TASK_TRIGGER_TYPE2,
336 ) -> HRESULT,
337 fn get_Id(
338 pId: *mut BSTR,
339 ) -> HRESULT,
340 fn put_Id(
341 pId: BSTR,
342 ) -> HRESULT,
343 fn get_Repetition(
344 ppRepeat: *mut *mut IRepetitionPattern,
345 ) -> HRESULT,
346 fn put_Repetition(
347 ppRepeat: *const IRepetitionPattern,
348 ) -> HRESULT,
349 fn get_ExecutionTimeLimit(
350 pTimeLimit: *mut BSTR,
351 ) -> HRESULT,
352 fn put_ExecutionTimeLimit(
353 pTimeLimit: BSTR,
354 ) -> HRESULT,
355 fn get_StartBoundary(
356 pStart: *mut BSTR,
357 ) -> HRESULT,
358 fn put_StartBoundary(
359 pStart: BSTR,
360 ) -> HRESULT,
361 fn get_EndBoundary(
362 pEnd: *mut BSTR,
363 ) -> HRESULT,
364 fn put_EndBoundary(
365 pEnd: BSTR,
366 ) -> HRESULT,
367 fn get_Enabled(
368 pEnabled: *mut VARIANT_BOOL,
369 ) -> HRESULT,
370 fn put_Enabled(
371 pEnabled: VARIANT_BOOL,
372 ) -> HRESULT,
373}}
374ENUM!{enum TASK_TRIGGER_TYPE2 {
375 TASK_TRIGGER_EVENT = 0,
376 TASK_TRIGGER_TIME = 1,
377 TASK_TRIGGER_DAILY = 2,
378 TASK_TRIGGER_WEEKLY = 3,
379 TASK_TRIGGER_MONTHLY = 4,
380 TASK_TRIGGER_MONTHLYDOW = 5,
381 TASK_TRIGGER_IDLE = 6,
382 TASK_TRIGGER_REGISTRATION = 7,
383 TASK_TRIGGER_BOOT = 8,
384 TASK_TRIGGER_LOGON = 9,
385 TASK_TRIGGER_SESSION_STATE_CHANGE = 11,
386 TASK_TRIGGER_CUSTOM_TRIGGER_01 = 12,
387}}
388RIDL!{#[uuid(0x7fb9acf1, 0x26be, 0x400e, 0x85, 0xb5, 0x29, 0x4b, 0x9c, 0x75, 0xdf, 0xd6)]
389interface IRepetitionPattern(IRepetitionPatternVtbl): IDispatch(IDispatchVtbl) {
390 fn get_Interval(
391 pInterval: *mut BSTR,
392 ) -> HRESULT,
393 fn put_Interval(
394 pInterval: BSTR,
395 ) -> HRESULT,
396 fn get_Duration(
397 pDuration: *mut BSTR,
398 ) -> HRESULT,
399 fn put_Duration(
400 pDuration: BSTR,
401 ) -> HRESULT,
402 fn get_StopAtDurationEnd(
403 pStop: *mut VARIANT_BOOL,
404 ) -> HRESULT,
405 fn put_StopAtDurationEnd(
406 pStop: VARIANT_BOOL,
407 ) -> HRESULT,
408}}
409RIDL!{#[uuid(0x8fd4711d, 0x2d02, 0x4c8c, 0x87, 0xe3, 0xef, 0xf6, 0x99, 0xde, 0x12, 0x7e)]
410interface ITaskSettings(ITaskSettingsVtbl): IDispatch(IDispatchVtbl) {
411 fn get_AllowDemandStart(
412 pAllowDemandStart: *mut VARIANT_BOOL,
413 ) -> HRESULT,
414 fn put_AllowDemandStart(
415 pAllowDemandStart: VARIANT_BOOL,
416 ) -> HRESULT,
417 fn get_RestartInterval(
418 pRestartInterval: *mut BSTR,
419 ) -> HRESULT,
420 fn put_RestartInterval(
421 pRestartInterval: BSTR,
422 ) -> HRESULT,
423 fn get_RestartCount(
424 pRestartCount: *mut INT,
425 ) -> HRESULT,
426 fn put_RestartCount(
427 pRestartCount: INT,
428 ) -> HRESULT,
429 fn get_MultipleInstances(
430 pPolicy: *mut TASK_INSTANCES_POLICY,
431 ) -> HRESULT,
432 fn put_MultipleInstances(
433 pPolicy: TASK_INSTANCES_POLICY,
434 ) -> HRESULT,
435 fn get_StopIfGoingOnBatteries(
436 pStopIfOnBatteries: *mut VARIANT_BOOL,
437 ) -> HRESULT,
438 fn put_StopIfGoingOnBatteries(
439 pStopIfOnBatteries: VARIANT_BOOL,
440 ) -> HRESULT,
441 fn get_DisallowStartIfOnBatteries(
442 pDisallowStart: *mut VARIANT_BOOL,
443 ) -> HRESULT,
444 fn put_DisallowStartIfOnBatteries(
445 pDisallowStart: VARIANT_BOOL,
446 ) -> HRESULT,
447 fn get_AllowHardTerminate(
448 pAllowHardTerminate: *mut VARIANT_BOOL,
449 ) -> HRESULT,
450 fn put_AllowHardTerminate(
451 pAllowHardTerminate: VARIANT_BOOL,
452 ) -> HRESULT,
453 fn get_StartWhenAvailable(
454 pStartWhenAvailable: *mut VARIANT_BOOL,
455 ) -> HRESULT,
456 fn put_StartWhenAvailable(
457 pStartWhenAvailable: VARIANT_BOOL,
458 ) -> HRESULT,
459 fn get_XmlText(
460 pText: *mut BSTR,
461 ) -> HRESULT,
462 fn put_XmlText(
463 pText: BSTR,
464 ) -> HRESULT,
465 fn get_RunOnlyIfNetworkAvailable(
466 pRunOnlyIfNetworkAvailable: *mut VARIANT_BOOL,
467 ) -> HRESULT,
468 fn put_RunOnlyIfNetworkAvailable(
469 pRunOnlyIfNetworkAvailable: VARIANT_BOOL,
470 ) -> HRESULT,
471 fn get_ExecutionTimeLimit(
472 pExecutionTimeLimit: *mut BSTR,
473 ) -> HRESULT,
474 fn put_ExecutionTimeLimit(
475 pExecutionTimeLimit: BSTR,
476 ) -> HRESULT,
477 fn get_Enabled(
478 pEnabled: *mut VARIANT_BOOL,
479 ) -> HRESULT,
480 fn put_Enabled(
481 pEnabled: VARIANT_BOOL,
482 ) -> HRESULT,
483 fn get_DeleteExpiredTaskAfter(
484 pExpirationDelay: *mut BSTR,
485 ) -> HRESULT,
486 fn put_DeleteExpiredTaskAfter(
487 pExpirationDelay: BSTR,
488 ) -> HRESULT,
489 fn get_Priority(
490 pPriority: *mut INT,
491 ) -> HRESULT,
492 fn put_Priority(
493 pPriority: INT,
494 ) -> HRESULT,
495 fn get_Compatibility(
496 pCompatLevel: *mut TASK_COMPATIBILITY,
497 ) -> HRESULT,
498 fn put_Compatibility(
499 pCompatLevel: TASK_COMPATIBILITY,
500 ) -> HRESULT,
501 fn get_Hidden(
502 pHidden: *mut VARIANT_BOOL,
503 ) -> HRESULT,
504 fn put_Hidden(
505 pHidden: VARIANT_BOOL,
506 ) -> HRESULT,
507 fn get_IdleSettings(
508 ppIdleSettings: *mut *mut IIdleSettings,
509 ) -> HRESULT,
510 fn put_IdleSettings(
511 ppIdleSettings: *const IIdleSettings,
512 ) -> HRESULT,
513 fn get_RunOnlyIfIdle(
514 pRunOnlyIfIdle: *mut VARIANT_BOOL,
515 ) -> HRESULT,
516 fn put_RunOnlyIfIdle(
517 pRunOnlyIfIdle: VARIANT_BOOL,
518 ) -> HRESULT,
519 fn get_WakeToRun(
520 pWake: *mut VARIANT_BOOL,
521 ) -> HRESULT,
522 fn put_WakeToRun(
523 pWake: VARIANT_BOOL,
524 ) -> HRESULT,
525 fn get_NetworkSettings(
526 ppNetworkSettings: *mut *mut INetworkSettings,
527 ) -> HRESULT,
528 fn put_NetworkSettings(
529 ppNetworkSettings: *const INetworkSettings,
530 ) -> HRESULT,
531}}
532ENUM!{enum TASK_INSTANCES_POLICY {
533 TASK_INSTANCES_PARALLEL = 0,
534 TASK_INSTANCES_QUEUE = 1,
535 TASK_INSTANCES_IGNORE_NEW = 2,
536 TASK_INSTANCES_STOP_EXISTING = 3,
537}}
538ENUM!{enum TASK_COMPATIBILITY {
539 TASK_COMPATIBILITY_AT = 0,
540 TASK_COMPATIBILITY_V1 = 1,
541 TASK_COMPATIBILITY_V2 = 2,
542 TASK_COMPATIBILITY_V2_1 = 3,
543 TASK_COMPATIBILITY_V2_2 = 4,
544 TASK_COMPATIBILITY_V2_3 = 5,
545 TASK_COMPATIBILITY_V2_4 = 6,
546}}
547RIDL!{#[uuid(0x84594461, 0x0053, 0x4342, 0xa8, 0xfd, 0x08, 0x8f, 0xab, 0xf1, 0x1f, 0x32)]
548interface IIdleSettings(IIdleSettingsVtbl): IDispatch(IDispatchVtbl) {
549 fn get_IdleDuration(
550 pDelay: *mut BSTR,
551 ) -> HRESULT,
552 fn put_IdleDuration(
553 pDelay: BSTR,
554 ) -> HRESULT,
555 fn get_WaitTimeout(
556 pTimeout: *mut BSTR,
557 ) -> HRESULT,
558 fn put_WaitTimeout(
559 pTimeout: BSTR,
560 ) -> HRESULT,
561 fn get_StopOnIdleEnd(
562 pStop: *mut VARIANT_BOOL,
563 ) -> HRESULT,
564 fn put_StopOnIdleEnd(
565 pStop: VARIANT_BOOL,
566 ) -> HRESULT,
567 fn get_RestartOnIdle(
568 pRestart: *mut VARIANT_BOOL,
569 ) -> HRESULT,
570 fn put_RestartOnIdle(
571 pRestart: VARIANT_BOOL,
572 ) -> HRESULT,
573}}
574RIDL!{#[uuid(0x9f7dea84, 0xc30b, 0x4245, 0x80, 0xb6, 0x00, 0xe9, 0xf6, 0x46, 0xf1, 0xb4)]
575interface INetworkSettings(INetworkSettingsVtbl): IDispatch(IDispatchVtbl) {
576 fn get_Name(
577 pName: *mut BSTR,
578 ) -> HRESULT,
579 fn put_Name(
580 pName: BSTR,
581 ) -> HRESULT,
582 fn get_Id(
583 pId: *mut BSTR,
584 ) -> HRESULT,
585 fn put_Id(
586 pId: BSTR,
587 ) -> HRESULT,
588}}
589RIDL!{#[uuid(0xd98d51e5, 0xc9b4, 0x496a, 0xa9, 0xc1, 0x18, 0x98, 0x02, 0x61, 0xcf, 0x0f)]
590interface IPrincipal(IPrincipalVtbl): IDispatch(IDispatchVtbl) {
591 fn get_Id(
592 pId: *mut BSTR,
593 ) -> HRESULT,
594 fn put_Id(
595 pId: BSTR,
596 ) -> HRESULT,
597 fn get_DisplayName(
598 pName: *mut BSTR,
599 ) -> HRESULT,
600 fn put_DisplayName(
601 pName: BSTR,
602 ) -> HRESULT,
603 fn get_UserId(
604 pUser: *mut BSTR,
605 ) -> HRESULT,
606 fn put_UserId(
607 pUser: BSTR,
608 ) -> HRESULT,
609 fn get_LogonType(
610 pLogon: *mut TASK_LOGON_TYPE,
611 ) -> HRESULT,
612 fn put_LogonType(
613 pLogon: TASK_LOGON_TYPE,
614 ) -> HRESULT,
615 fn get_GroupId(
616 pGroup: *mut BSTR,
617 ) -> HRESULT,
618 fn put_GroupId(
619 pGroup: BSTR,
620 ) -> HRESULT,
621 fn get_RunLevel(
622 pRunLevel: *mut TASK_RUNLEVEL,
623 ) -> HRESULT,
624 fn put_RunLevel(
625 pRunLevel: TASK_RUNLEVEL,
626 ) -> HRESULT,
627}}
628ENUM!{enum TASK_LOGON_TYPE {
629 TASK_LOGON_NONE = 0,
630 TASK_LOGON_PASSWORD = 1,
631 TASK_LOGON_S4U = 2,
632 TASK_LOGON_INTERACTIVE_TOKEN = 3,
633 TASK_LOGON_GROUP = 4,
634 TASK_LOGON_SERVICE_ACCOUNT = 5,
635 TASK_LOGON_INTERACTIVE_TOKEN_OR_PASSWORD = 6,
636}}
637ENUM!{enum TASK_RUNLEVEL {
638 TASK_RUNLEVEL_LUA = 0,
639 TASK_RUNLEVEL_HIGHEST = 1,
640}}
641RIDL!{#[uuid(0x02820e19, 0x7b98, 0x4ed2, 0xb2, 0xe8, 0xfd, 0xcc, 0xce, 0xff, 0x61, 0x9b)]
642interface IActionCollection(IActionCollectionVtbl): IDispatch(IDispatchVtbl) {
643 fn get_Count(
644 pCount: *mut c_long,
645 ) -> HRESULT,
646 fn get_Item(
647 index: c_long,
648 ppAction: *mut *mut IAction,
649 ) -> HRESULT,
650 fn get__NewEnum(
651 ppEnum: *mut LPUNKNOWN,
652 ) -> HRESULT,
653 fn get_XmlText(
654 pText: *mut BSTR,
655 ) -> HRESULT,
656 fn put_XmlText(
657 pText: BSTR,
658 ) -> HRESULT,
659 fn Create(
660 Type: TASK_ACTION_TYPE,
661 ppAction: *mut *mut IAction,
662 ) -> HRESULT,
663 fn Remove(
664 index: VARIANT,
665 ) -> HRESULT,
666 fn Clear() -> HRESULT,
667 fn get_Context(
668 pContext: *mut BSTR,
669 ) -> HRESULT,
670 fn put_Context(
671 pContext: BSTR,
672 ) -> HRESULT,
673}}
674RIDL!{#[uuid(0xbae54997, 0x48b1, 0x4cbe, 0x99, 0x65, 0xd6, 0xbe, 0x26, 0x3e, 0xbe, 0xa4)]
675interface IAction(IActionVtbl): IDispatch(IDispatchVtbl) {
676 fn get_Id(
677 pId: *mut BSTR,
678 ) -> HRESULT,
679 fn put_Id(
680 pId: BSTR,
681 ) -> HRESULT,
682 fn get_Type(
683 pType: *mut TASK_ACTION_TYPE,
684 ) -> HRESULT,
685}}
686ENUM!{enum TASK_ACTION_TYPE {
687 TASK_ACTION_EXEC = 0,
688 TASK_ACTION_COM_HANDLER = 5,
689 TASK_ACTION_SEND_EMAIL = 6,
690 TASK_ACTION_SHOW_MESSAGE = 7,
691}}
692RIDL!{#[uuid(0x86627eb4, 0x42a7, 0x41e4, 0xa4, 0xd9, 0xac, 0x33, 0xa7, 0x2f, 0x2d, 0x52)]
693interface IRegisteredTaskCollection(IRegisteredTaskCollectionVtbl): IDispatch(IDispatchVtbl) {
694 fn get_Count(
695 pCount: *mut LONG,
696 ) -> HRESULT,
697 fn get_Item(
698 index: VARIANT,
699 ppRegisteredTask: *mut *mut IRegisteredTask,
700 ) -> HRESULT,
701 fn get__NewEnum(
702 ppEnum: *mut LPUNKNOWN,
703 ) -> HRESULT,
704}}
705RIDL!{#[uuid(0x2faba4c7, 0x4da9, 0x4013, 0x96, 0x97, 0x20, 0xcc, 0x3f, 0xd4, 0x0f, 0x85)]
706interface ITaskService(ITaskServiceVtbl): IDispatch(IDispatchVtbl) {
707 fn GetFolder(
708 Path: BSTR,
709 ppFolder: *mut *mut ITaskFolder,
710 ) -> HRESULT,
711 fn GetRunningTasks(
712 flags: LONG,
713 ppRunningTasks: *mut *mut IRunningTaskCollection,
714 ) -> HRESULT,
715 fn NewTask(
716 flags: DWORD,
717 ppDefinition: *mut *mut ITaskDefinition,
718 ) -> HRESULT,
719 fn Connect(
720 serverName: VARIANT,
721 user: VARIANT,
722 domain: VARIANT,
723 password: VARIANT,
724 ) -> HRESULT,
725 fn get_Connected(
726 pConnected: *mut VARIANT_BOOL,
727 ) -> HRESULT,
728 fn get_TargetServer(
729 pServer: *mut BSTR,
730 ) -> HRESULT,
731 fn get_ConnectedUser(
732 pUser: *mut BSTR,
733 ) -> HRESULT,
734 fn get_ConnectedDomain(
735 pDomain: *mut BSTR,
736 ) -> HRESULT,
737 fn get_HighestVersion(
738 pVersion: *mut DWORD,
739 ) -> HRESULT,
740}}
741RIDL!{#[uuid(0x839d7762, 0x5121, 0x4009, 0x92, 0x34, 0x4f, 0x0d, 0x19, 0x39, 0x4f, 0x04)]
742interface ITaskHandler(ITaskHandlerVtbl): IUnknown(IUnknownVtbl) {
743 fn Start(
744 pHandlerServices: LPUNKNOWN,
745 Data: BSTR,
746 ) -> HRESULT,
747 fn Stop(
748 pRetCode: *mut HRESULT,
749 ) -> HRESULT,
750 fn Pause() -> HRESULT,
751 fn Resume() -> HRESULT,
752}}
753RIDL!{#[uuid(0xeaec7a8f, 0x27a0, 0x4ddc, 0x86, 0x75, 0x14, 0x72, 0x6a, 0x01, 0xa3, 0x8a)]
754interface ITaskHandlerStatus(ITaskHandlerStatusVtbl): IUnknown(IUnknownVtbl) {
755 fn UpdateStatus(
756 percentComplete: c_short,
757 statusMessage: BSTR,
758 ) -> HRESULT,
759 fn TaskCompleted(
760 taskErrCode: HRESULT,
761 ) -> HRESULT,
762}}
763RIDL!{#[uuid(0x3e4c9351, 0xd966, 0x4b8b, 0xbb, 0x87, 0xce, 0xba, 0x68, 0xbb, 0x01, 0x07)]
764interface ITaskVariables(ITaskVariablesVtbl): IUnknown(IUnknownVtbl) {
765 fn GetInput(
766 pInput: *mut BSTR,
767 ) -> HRESULT,
768 fn SetOutput(
769 input: BSTR,
770 ) -> HRESULT,
771 fn GetContext(
772 pContext: *mut BSTR,
773 ) -> HRESULT,
774}}
775RIDL!{#[uuid(0x39038068, 0x2b46, 0x4afd, 0x86, 0x62, 0x7b, 0xb6, 0xf8, 0x68, 0xd2, 0x21)]
776interface ITaskNamedValuePair(ITaskNamedValuePairVtbl): IDispatch(IDispatchVtbl) {
777 fn get_Name(
778 pName: *mut BSTR,
779 ) -> HRESULT,
780 fn put_Name(
781 pName: BSTR,
782 ) -> HRESULT,
783 fn get_Value(
784 pValue: *mut BSTR,
785 ) -> HRESULT,
786 fn put_Value(
787 pValue: BSTR,
788 ) -> HRESULT,
789}}
790RIDL!{#[uuid(0xb4ef826b, 0x63c3, 0x46e4, 0xa5, 0x04, 0xef, 0x69, 0xe4, 0xf7, 0xea, 0x4d)]
791interface ITaskNamedValueCollection(ITaskNamedValueCollectionVtbl): IDispatch(IDispatchVtbl) {
792 fn get_Count(
793 pCount: *mut c_long,
794 ) -> HRESULT,
795 fn get_Item(
796 index: LONG,
797 ppPair: *mut *mut ITaskNamedValuePair,
798 ) -> HRESULT,
799 fn get__NewEnum(
800 ppEnum: *mut LPUNKNOWN,
801 ) -> HRESULT,
802 fn Create(
803 Name: BSTR,
804 Value: BSTR,
805 ppPair: *mut *mut ITaskNamedValuePair,
806 ) -> HRESULT,
807 fn Remove(
808 index: LONG,
809 ) -> HRESULT,
810 fn Clear() -> HRESULT,
811}}
812RIDL!{#[uuid(0xd537d2b0, 0x9fb3, 0x4d34, 0x97, 0x39, 0x1f, 0xf5, 0xce, 0x7b, 0x1e, 0xf3)]
813interface IIdleTrigger(IIdleTriggerVtbl): ITrigger(ITriggerVtbl) {}}
814RIDL!{#[uuid(0x72dade38, 0xfae4, 0x4b3e, 0xba, 0xf4, 0x5d, 0x00, 0x9a, 0xf0, 0x2b, 0x1c)]
815interface ILogonTrigger(ILogonTriggerVtbl): ITrigger(ITriggerVtbl) {
816 fn get_Delay(
817 pDelay: *mut BSTR,
818 ) -> HRESULT,
819 fn put_Delay(
820 pDelay: BSTR,
821 ) -> HRESULT,
822 fn get_UserId(
823 pUser: *mut BSTR,
824 ) -> HRESULT,
825 fn put_UserId(
826 pUser: BSTR,
827 ) -> HRESULT,
828}}
829RIDL!{#[uuid(0x754da71b, 0x4385, 0x4475, 0x9d, 0xd9, 0x59, 0x82, 0x94, 0xfa, 0x36, 0x41)]
830interface ISessionStateChangeTrigger(ISessionStateChangeTriggerVtbl): ITrigger(ITriggerVtbl) {
831 fn get_Delay(
832 pDelay: *mut BSTR,
833 ) -> HRESULT,
834 fn put_Delay(
835 pDelay: BSTR,
836 ) -> HRESULT,
837 fn get_UserId(
838 pUser: *mut BSTR,
839 ) -> HRESULT,
840 fn put_UserId(
841 pUser: BSTR,
842 ) -> HRESULT,
843 fn get_StateChange(
844 pType: *mut TASK_SESSION_STATE_CHANGE_TYPE,
845 ) -> HRESULT,
846 fn put_StateChange(
847 pType: TASK_SESSION_STATE_CHANGE_TYPE,
848 ) -> HRESULT,
849}}
850ENUM!{enum TASK_SESSION_STATE_CHANGE_TYPE {
851 TASK_CONSOLE_CONNECT = 1,
852 TASK_CONSOLE_DISCONNECT = 2,
853 TASK_REMOTE_CONNECT = 3,
854 TASK_REMOTE_DISCONNECT = 4,
855 TASK_SESSION_LOCK = 7,
856 TASK_SESSION_UNLOCK = 8,
857}}
858RIDL!{#[uuid(0xd45b0167, 0x9653, 0x4eef, 0xb9, 0x4f, 0x07, 0x32, 0xca, 0x7a, 0xf2, 0x51)]
859interface IEventTrigger(IEventTriggerVtbl): ITrigger(ITriggerVtbl) {
860 fn get_Subscription(
861 pQuery: *mut BSTR,
862 ) -> HRESULT,
863 fn put_Subscription(
864 pQuery: BSTR,
865 ) -> HRESULT,
866 fn get_Delay(
867 pDelay: *mut BSTR,
868 ) -> HRESULT,
869 fn put_Delay(
870 pDelay: BSTR,
871 ) -> HRESULT,
872 fn get_ValueQueries(
873 ppNamedXPaths: *mut *mut ITaskNamedValueCollection,
874 ) -> HRESULT,
875 fn put_ValueQueries(
876 ppNamedXPaths: *const ITaskNamedValueCollection,
877 ) -> HRESULT,
878}}
879RIDL!{#[uuid(0xb45747e0, 0xeba7, 0x4276, 0x9f, 0x29, 0x85, 0xc5, 0xbb, 0x30, 0x00, 0x06)]
880interface ITimeTrigger(ITimeTriggerVtbl): ITrigger(ITriggerVtbl) {
881 fn get_RandomDelay(
882 pRandomDelay: *mut BSTR,
883 ) -> HRESULT,
884 fn put_RandomDelay(
885 pRandomDelay: BSTR,
886 ) -> HRESULT,
887}}
888RIDL!{#[uuid(0x126c5cd8, 0xb288, 0x41d5, 0x8d, 0xbf, 0xe4, 0x91, 0x44, 0x6a, 0xdc, 0x5c)]
889interface IDailyTrigger(IDailyTriggerVtbl): ITrigger(ITriggerVtbl) {
890 fn get_DaysInterval(
891 pDays: *mut c_short,
892 ) -> HRESULT,
893 fn put_DaysInterval(
894 pDays: c_short,
895 ) -> HRESULT,
896 fn get_RandomDelay(
897 pRandomDelay: *mut BSTR,
898 ) -> HRESULT,
899 fn put_RandomDelay(
900 pRandomDelay: BSTR,
901 ) -> HRESULT,
902}}
903RIDL!{#[uuid(0x5038fc98, 0x82ff, 0x436d, 0x87, 0x28, 0xa5, 0x12, 0xa5, 0x7c, 0x9d, 0xc1)]
904interface IWeeklyTrigger(IWeeklyTriggerVtbl): ITrigger(ITriggerVtbl) {
905 fn get_DaysOfWeek(
906 pDays: *mut c_short,
907 ) -> HRESULT,
908 fn put_DaysOfWeek(
909 pDays: c_short,
910 ) -> HRESULT,
911 fn get_WeeksInterval(
912 pWeeks: *mut c_short,
913 ) -> HRESULT,
914 fn put_WeeksInterval(
915 pWeeks: c_short,
916 ) -> HRESULT,
917 fn get_RandomDelay(
918 pRandomDelay: *mut BSTR,
919 ) -> HRESULT,
920 fn put_RandomDelay(
921 pRandomDelay: BSTR,
922 ) -> HRESULT,
923}}
924RIDL!{#[uuid(0x97c45ef1, 0x6b02, 0x4a1a, 0x9c, 0x0e, 0x1e, 0xbf, 0xba, 0x15, 0x00, 0xac)]
925interface IMonthlyTrigger(IMonthlyTriggerVtbl): ITrigger(ITriggerVtbl) {
926 fn get_DaysOfMonth(
927 pDays: *mut c_long,
928 ) -> HRESULT,
929 fn put_DaysOfMonth(
930 pDays: c_long,
931 ) -> HRESULT,
932 fn get_MonthsOfYear(
933 pMonths: *mut c_short,
934 ) -> HRESULT,
935 fn put_MonthsOfYear(
936 pMonths: c_short,
937 ) -> HRESULT,
938 fn get_RunOnLastDayOfMonth(
939 pLastDay: *mut VARIANT_BOOL,
940 ) -> HRESULT,
941 fn put_RunOnLastDayOfMonth(
942 pLastDay: VARIANT_BOOL,
943 ) -> HRESULT,
944 fn get_RandomDelay(
945 pRandomDelay: *mut BSTR,
946 ) -> HRESULT,
947 fn put_RandomDelay(
948 pRandomDelay: BSTR,
949 ) -> HRESULT,
950}}
951RIDL!{#[uuid(0x77d025a3, 0x90fa, 0x43aa, 0xb5, 0x2e, 0xcd, 0xa5, 0x49, 0x9b, 0x94, 0x6a)]
952interface IMonthlyDOWTrigger(IMonthlyDOWTriggerVtbl): ITrigger(ITriggerVtbl) {
953 fn get_DaysOfWeek(
954 pDays: *mut c_short,
955 ) -> HRESULT,
956 fn put_DaysOfWeek(
957 pDays: c_short,
958 ) -> HRESULT,
959 fn get_WeeksOfMonth(
960 pWeeks: *mut c_short,
961 ) -> HRESULT,
962 fn put_WeeksOfMonth(
963 pWeeks: c_short,
964 ) -> HRESULT,
965 fn get_MonthsOfYear(
966 pMonths: *mut c_short,
967 ) -> HRESULT,
968 fn put_MonthsOfYear(
969 pMonths: c_short,
970 ) -> HRESULT,
971 fn get_RunOnLastWeekOfMonth(
972 pLastWeek: *mut VARIANT_BOOL,
973 ) -> HRESULT,
974 fn put_RunOnLastWeekOfMonth(
975 pLastWeek: VARIANT_BOOL,
976 ) -> HRESULT,
977 fn get_RandomDelay(
978 pRandomDelay: *mut BSTR,
979 ) -> HRESULT,
980 fn put_RandomDelay(
981 pRandomDelay: BSTR,
982 ) -> HRESULT,
983}}
984RIDL!{#[uuid(0x2a9c35da, 0xd357, 0x41f4, 0xbb, 0xc1, 0x20, 0x7a, 0xc1, 0xb1, 0xf3, 0xcb)]
985interface IBootTrigger(IBootTriggerVtbl): ITrigger(ITriggerVtbl) {
986 fn get_Delay(
987 pDelay: *mut BSTR,
988 ) -> HRESULT,
989 fn put_Delay(
990 pDelay: BSTR,
991 ) -> HRESULT,
992}}
993RIDL!{#[uuid(0x4c8fec3a, 0xc218, 0x4e0c, 0xb2, 0x3d, 0x62, 0x90, 0x24, 0xdb, 0x91, 0xa2)]
994interface IRegistrationTrigger(IRegistrationTriggerVtbl): ITrigger(ITriggerVtbl) {
995 fn get_Delay(
996 pDelay: *mut BSTR,
997 ) -> HRESULT,
998 fn put_Delay(
999 pDelay: BSTR,
1000 ) -> HRESULT,
1001}}
1002RIDL!{#[uuid(0x4c3d624d, 0xfd6b, 0x49a3, 0xb9, 0xb7, 0x09, 0xcb, 0x3c, 0xd3, 0xf0, 0x47)]
1003interface IExecAction(IExecActionVtbl): IAction(IActionVtbl) {
1004 fn get_Path(
1005 pPath: *mut BSTR,
1006 ) -> HRESULT,
1007 fn put_Path(
1008 pPath: BSTR,
1009 ) -> HRESULT,
1010 fn get_Arguments(
1011 pArgument: *mut BSTR,
1012 ) -> HRESULT,
1013 fn put_Arguments(
1014 pArgument: BSTR,
1015 ) -> HRESULT,
1016 fn get_WorkingDirectory(
1017 pWorkingDirectory: *mut BSTR,
1018 ) -> HRESULT,
1019 fn put_WorkingDirectory(
1020 pWorkingDirectory: BSTR,
1021 ) -> HRESULT,
1022}}
1023RIDL!{#[uuid(0xf2a82542, 0xbda5, 0x4e6b, 0x91, 0x43, 0xe2, 0xbf, 0x4f, 0x89, 0x87, 0xb6)]
1024interface IExecAction2(IExecAction2Vtbl): IExecAction(IExecActionVtbl) {
1025 fn get_HideAppWindow(
1026 pHideAppWindow: *mut VARIANT_BOOL,
1027 ) -> HRESULT,
1028 fn put_HideAppWindow(
1029 pHideAppWindow: VARIANT_BOOL,
1030 ) -> HRESULT,
1031}}
1032RIDL!{#[uuid(0x505e9e68, 0xaf89, 0x46b8, 0xa3, 0x0f, 0x56, 0x16, 0x2a, 0x83, 0xd5, 0x37)]
1033interface IShowMessageAction(IShowMessageActionVtbl): IAction(IActionVtbl) {
1034 fn get_Title(
1035 pTitle: *mut BSTR,
1036 ) -> HRESULT,
1037 fn put_Title(
1038 pTitle: BSTR,
1039 ) -> HRESULT,
1040 fn get_MessageBody(
1041 pMessageBody: *mut BSTR,
1042 ) -> HRESULT,
1043 fn put_MessageBody(
1044 pMessageBody: BSTR,
1045 ) -> HRESULT,
1046}}
1047RIDL!{#[uuid(0x6d2fd252, 0x75c5, 0x4f66, 0x90, 0xba, 0x2a, 0x7d, 0x8c, 0xc3, 0x03, 0x9f)]
1048interface IComHandlerAction(IComHandlerActionVtbl): IAction(IActionVtbl) {
1049 fn get_ClassId(
1050 pClsid: *mut BSTR,
1051 ) -> HRESULT,
1052 fn put_ClassId(
1053 pClsid: BSTR,
1054 ) -> HRESULT,
1055 fn get_Data(
1056 pData: *mut BSTR,
1057 ) -> HRESULT,
1058 fn put_Data(
1059 pData: BSTR,
1060 ) -> HRESULT,
1061}}
1062RIDL!{#[uuid(0x10f62c64, 0x7e16, 0x4314, 0xa0, 0xc2, 0x0c, 0x36, 0x83, 0xf9, 0x9d, 0x40)]
1063interface IEmailAction(IEmailActionVtbl): IAction(IActionVtbl) {
1064 fn get_Server(
1065 pServer: *mut BSTR,
1066 ) -> HRESULT,
1067 fn put_Server(
1068 pServer: BSTR,
1069 ) -> HRESULT,
1070 fn get_Subject(
1071 pSubject: *mut BSTR,
1072 ) -> HRESULT,
1073 fn put_Subject(
1074 pSubject: BSTR,
1075 ) -> HRESULT,
1076 fn get_To(
1077 pTo: *mut BSTR,
1078 ) -> HRESULT,
1079 fn put_To(
1080 pTo: BSTR,
1081 ) -> HRESULT,
1082 fn get_Cc(
1083 pCc: *mut BSTR,
1084 ) -> HRESULT,
1085 fn put_Cc(
1086 pCc: BSTR,
1087 ) -> HRESULT,
1088 fn get_Bcc(
1089 pBcc: *mut BSTR,
1090 ) -> HRESULT,
1091 fn put_Bcc(
1092 pBcc: BSTR,
1093 ) -> HRESULT,
1094 fn get_ReplyTo(
1095 pReplyTo: *mut BSTR,
1096 ) -> HRESULT,
1097 fn put_ReplyTo(
1098 pReplyTo: BSTR,
1099 ) -> HRESULT,
1100 fn get_From(
1101 pFrom: *mut BSTR,
1102 ) -> HRESULT,
1103 fn put_From(
1104 pFrom: BSTR,
1105 ) -> HRESULT,
1106 fn get_HeaderFields(
1107 ppHeaderFields: *mut *mut ITaskNamedValueCollection,
1108 ) -> HRESULT,
1109 fn put_HeaderFields(
1110 ppHeaderFields: *const ITaskNamedValueCollection,
1111 ) -> HRESULT,
1112 fn get_Body(
1113 pBody: *mut BSTR,
1114 ) -> HRESULT,
1115 fn put_Body(
1116 pBody: BSTR,
1117 ) -> HRESULT,
1118 fn get_Attachments(
1119 pAttachements: *mut SAFEARRAY,
1120 ) -> HRESULT,
1121 fn put_Attachments(
1122 pAttachements: SAFEARRAY,
1123 ) -> HRESULT,
1124}}
1125RIDL!{#[uuid(0x248919ae, 0xe345, 0x4a6d, 0x8a, 0xeb, 0xe0, 0xd3, 0x16, 0x5c, 0x90, 0x4e)]
1126interface IPrincipal2(IPrincipal2Vtbl): IDispatch(IDispatchVtbl) {
1127 fn get_ProcessTokenSidType(
1128 pProcessTokenSidType: *mut TASK_PROCESSTOKENSID,
1129 ) -> HRESULT,
1130 fn put_ProcessTokenSidType(
1131 pProcessTokenSidType: TASK_PROCESSTOKENSID,
1132 ) -> HRESULT,
1133 fn get_RequiredPrivilegeCount(
1134 pCount: *mut c_long,
1135 ) -> HRESULT,
1136 fn get_RequiredPrivilege(
1137 index: c_long,
1138 pPrivilege: *mut BSTR,
1139 ) -> HRESULT,
1140 fn AddRequiredPrivilege(
1141 privilege: BSTR,
1142 ) -> HRESULT,
1143}}
1144ENUM!{enum TASK_PROCESSTOKENSID {
1145 TASK_PROCESSTOKENSID_NONE = 0,
1146 TASK_PROCESSTOKENSID_UNRESTRICTED = 1,
1147 TASK_PROCESSTOKENSID_DEFAULT = 2,
1148}}
1149RIDL!{#[uuid(0x2c05c3f0, 0x6eed, 0x4c05, 0xa1, 0x5f, 0xed, 0x7d, 0x7a, 0x98, 0xa3, 0x69)]
1150interface ITaskSettings2(ITaskSettings2Vtbl): IDispatch(IDispatchVtbl) {
1151 fn get_DisallowStartOnRemoteAppSession(
1152 pDisallowStart: *mut VARIANT_BOOL,
1153 ) -> HRESULT,
1154 fn put_DisallowStartOnRemoteAppSession(
1155 pDisallowStart: VARIANT_BOOL,
1156 ) -> HRESULT,
1157 fn get_UseUnifiedSchedulingEngine(
1158 pUseUnifiedEngine: *mut VARIANT_BOOL,
1159 ) -> HRESULT,
1160 fn put_UseUnifiedSchedulingEngine(
1161 pUseUnifiedEngine: VARIANT_BOOL,
1162 ) -> HRESULT,
1163}}
1164RIDL!{#[uuid(0x0ad9d0d7, 0x0c7f, 0x4ebb, 0x9a, 0x5f, 0xd1, 0xc6, 0x48, 0xdc, 0xa5, 0x28)]
1165interface ITaskSettings3(ITaskSettings3Vtbl): ITaskSettings(ITaskSettingsVtbl) {
1166 fn get_DisallowStartOnRemoteAppSession(
1167 pDisallowStart: *mut VARIANT_BOOL,
1168 ) -> HRESULT,
1169 fn put_DisallowStartOnRemoteAppSession(
1170 pDisallowStart: VARIANT_BOOL,
1171 ) -> HRESULT,
1172 fn get_UseUnifiedSchedulingEngine(
1173 pUseUnifiedEngine: *mut VARIANT_BOOL,
1174 ) -> HRESULT,
1175 fn put_UseUnifiedSchedulingEngine(
1176 pUseUnifiedEngine: VARIANT_BOOL,
1177 ) -> HRESULT,
1178 fn get_MaintenanceSettings(
1179 ppMaintenanceSettings: *mut *mut IMaintenanceSettings,
1180 ) -> HRESULT,
1181 fn put_MaintenanceSettings(
1182 ppMaintenanceSettings: *const IMaintenanceSettings,
1183 ) -> HRESULT,
1184 fn CreateMaintenanceSettings(
1185 ppMaintenanceSettings: *mut *mut IMaintenanceSettings,
1186 ) -> HRESULT,
1187 fn get_Volatile(
1188 pVolatile: *mut VARIANT_BOOL,
1189 ) -> HRESULT,
1190 fn put_Volatile(
1191 pVolatile: VARIANT_BOOL,
1192 ) -> HRESULT,
1193}}
1194RIDL!{#[uuid(0xa6024fa8, 0x9652, 0x4adb, 0xa6, 0xbf, 0x5c, 0xfc, 0xd8, 0x77, 0xa7, 0xba)]
1195interface IMaintenanceSettings(IMaintenanceSettingsVtbl): IDispatch(IDispatchVtbl) {
1196 fn put_Period(
1197 target: BSTR,
1198 ) -> HRESULT,
1199 fn get_Period(
1200 target: *mut BSTR,
1201 ) -> HRESULT,
1202 fn put_Deadline(
1203 target: BSTR,
1204 ) -> HRESULT,
1205 fn get_Deadline(
1206 target: *mut BSTR,
1207 ) -> HRESULT,
1208 fn put_Exclusive(
1209 target: VARIANT_BOOL,
1210 ) -> HRESULT,
1211 fn get_Exclusive(
1212 target: *mut VARIANT_BOOL,
1213 ) -> HRESULT,
1214}}
1215ENUM!{enum TASK_RUN_FLAGS {
1216 TASK_RUN_NO_FLAGS = 0,
1217 TASK_RUN_AS_SELF = 1,
1218 TASK_RUN_IGNORE_CONSTRAINTS = 2,
1219 TASK_RUN_USE_SESSION_ID = 4,
1220 TASK_RUN_USER_SID = 8,
1221}}
1222ENUM!{enum TASK_ENUM_FLAGS {
1223 TASK_ENUM_HIDDEN = 1,
1224}}
1225ENUM!{enum TASK_CREATION {
1226 TASK_VALIDATE_ONLY = 1,
1227 TASK_CREATE = 2,
1228 TASK_UPDATE = 4,
1229 TASK_CREATE_OR_UPDATE = 6,
1230 TASK_DISABLE = 8,
1231 TASK_DONT_ADD_PRINCIPAL_ACE = 16,
1232 TASK_IGNORE_REGISTRATION_TRIGGERS = 32,
1233}}