taskschd.idl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. /*
  2. * Task Scheduler definitions
  3. *
  4. * Copyright 2013 Dmitry Timoshkov
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  19. */
  20. import "oaidl.idl";
  21. import "ocidl.idl";
  22. [
  23. uuid(e34cb9f1-c7f7-424c-be29-027dcc09363a),
  24. version(1.0)
  25. ]
  26. library TaskScheduler
  27. {
  28. importlib("stdole2.tlb");
  29. typedef enum _TASK_STATE
  30. {
  31. TASK_STATE_UNKNOWN,
  32. TASK_STATE_DISABLED,
  33. TASK_STATE_QUEUED,
  34. TASK_STATE_READY,
  35. TASK_STATE_RUNNING
  36. } TASK_STATE;
  37. typedef enum _TASK_ENUM_FLAGS
  38. {
  39. TASK_ENUM_HIDDEN = 0x0001
  40. } TASK_ENUM_FLAGS;
  41. typedef enum _TASK_LOGON_TYPE
  42. {
  43. TASK_LOGON_NONE,
  44. TASK_LOGON_PASSWORD,
  45. TASK_LOGON_S4U,
  46. TASK_LOGON_INTERACTIVE_TOKEN,
  47. TASK_LOGON_GROUP,
  48. TASK_LOGON_SERVICE_ACCOUNT,
  49. TASK_LOGON_INTERACTIVE_TOKEN_OR_PASSWORD
  50. } TASK_LOGON_TYPE;
  51. typedef enum _TASK_RUNLEVEL
  52. {
  53. TASK_RUNLEVEL_LUA,
  54. TASK_RUNLEVEL_HIGHEST
  55. } TASK_RUNLEVEL_TYPE;
  56. typedef enum _TASK_TRIGGER_TYPE2
  57. {
  58. TASK_TRIGGER_EVENT,
  59. TASK_TRIGGER_TIME,
  60. TASK_TRIGGER_DAILY,
  61. TASK_TRIGGER_WEEKLY,
  62. TASK_TRIGGER_MONTHLY,
  63. TASK_TRIGGER_MONTHLYDOW,
  64. TASK_TRIGGER_IDLE,
  65. TASK_TRIGGER_REGISTRATION,
  66. TASK_TRIGGER_BOOT,
  67. TASK_TRIGGER_LOGON,
  68. TASK_TRIGGER_SESSION_STATE_CHANGE = 11
  69. } TASK_TRIGGER_TYPE2;
  70. typedef enum _TASK_ACTION_TYPE
  71. {
  72. TASK_ACTION_EXEC = 0,
  73. TASK_ACTION_COM_HANDLER = 5,
  74. TASK_ACTION_SEND_EMAIL = 6,
  75. TASK_ACTION_SHOW_MESSAGE = 7
  76. } TASK_ACTION_TYPE;
  77. typedef enum _TASK_INSTANCES_POLICY
  78. {
  79. TASK_INSTANCES_PARALLEL,
  80. TASK_INSTANCES_QUEUE,
  81. TASK_INSTANCES_IGNORE_NEW,
  82. TASK_INSTANCES_STOP_EXISTING
  83. } TASK_INSTANCES_POLICY;
  84. typedef enum _TASK_COMPATIBILITY
  85. {
  86. TASK_COMPATIBILITY_AT,
  87. TASK_COMPATIBILITY_V1,
  88. TASK_COMPATIBILITY_V2,
  89. TASK_COMPATIBILITY_V2_1
  90. } TASK_COMPATIBILITY;
  91. typedef enum _TASK_CREATION
  92. {
  93. TASK_VALIDATE_ONLY = 1,
  94. TASK_CREATE = 2,
  95. TASK_UPDATE = 4,
  96. TASK_CREATE_OR_UPDATE = 6,
  97. TASK_DISABLE = 8,
  98. TASK_DONT_ADD_PRINCIPAL_ACE = 16,
  99. TASK_IGNORE_REGISTRATION_TRIGGERS = 32
  100. } TASK_CREATION;
  101. interface ITaskService;
  102. interface IRegisteredTask;
  103. interface IRegisteredTaskCollection;
  104. interface IRegistrationInfo;
  105. interface ITaskFolder;
  106. interface ITaskFolderCollection;
  107. interface ITaskDefinition;
  108. interface ITaskSettings;
  109. interface IIdleSettings;
  110. interface IRunningTask;
  111. interface IRunningTaskCollection;
  112. interface ITrigger;
  113. interface ITriggerCollection;
  114. interface ITimeTrigger;
  115. interface IRepetitionPattern;
  116. interface IAction;
  117. interface IActionCollection;
  118. interface IExecAction;
  119. interface INetworkSettings;
  120. interface IPrincipal;
  121. [
  122. object,
  123. oleautomation,
  124. uuid(2faba4c7-4da9-4013-9697-20cc3fd40f85)
  125. ]
  126. interface ITaskService : IDispatch
  127. {
  128. HRESULT GetFolder([in] BSTR path, [out, retval] ITaskFolder **folder );
  129. HRESULT GetRunningTasks([in] LONG flags, [out, retval] IRunningTaskCollection **tasks );
  130. HRESULT NewTask([in] DWORD flags, [out, retval] ITaskDefinition **definition );
  131. HRESULT Connect([in, optional] VARIANT server, [in, optional] VARIANT user, [in, optional] VARIANT domain, [in, optional] VARIANT password);
  132. [propget] HRESULT Connected([out, retval] VARIANT_BOOL *connected);
  133. [propget] HRESULT TargetServer([out, retval] BSTR *server);
  134. [propget] HRESULT ConnectedUser([out, retval] BSTR *user);
  135. [propget] HRESULT ConnectedDomain([out, retval] BSTR *domain);
  136. [propget] HRESULT HighestVersion([out, retval] DWORD *version);
  137. }
  138. [
  139. object,
  140. oleautomation,
  141. uuid(9c86f320-dee3-4dd1-b972-a303f26b061e)
  142. ]
  143. interface IRegisteredTask : IDispatch
  144. {
  145. [propget] HRESULT Name([out, retval] BSTR *name);
  146. [propget] HRESULT Path([out, retval] BSTR *path);
  147. [propget] HRESULT State([out, retval] TASK_STATE *state);
  148. [propget] HRESULT Enabled([out, retval] VARIANT_BOOL *enabled);
  149. [propput] HRESULT Enabled(VARIANT_BOOL enabled);
  150. HRESULT Run([in] VARIANT params, [out, retval] IRunningTask **task);
  151. HRESULT RunEx([in] VARIANT params, [in] LONG flags, [in] LONG sessionID, [in] BSTR user, [out, retval] IRunningTask **task);
  152. HRESULT GetInstances([in] LONG flags, [out, retval] IRunningTaskCollection **tasks);
  153. [propget] HRESULT LastRunTime([out, retval] DATE *date);
  154. [propget] HRESULT LastTaskResult([out, retval] LONG *result);
  155. [propget] HRESULT NumberOfMissedRuns([out, retval] LONG *runs);
  156. [propget] HRESULT NextRunTime([out, retval] DATE *date);
  157. [propget] HRESULT Definition([out, retval] ITaskDefinition **task);
  158. [propget] HRESULT Xml([out, retval] BSTR *xml);
  159. HRESULT GetSecurityDescriptor([in] LONG info, [out, retval] BSTR *sddl);
  160. HRESULT SetSecurityDescriptor([in] BSTR sddl, [in] LONG flags);
  161. HRESULT Stop([in] LONG flags);
  162. HRESULT GetRunTimes([in] const LPSYSTEMTIME start, [in] const LPSYSTEMTIME end, [in, out] DWORD *count, [out] LPSYSTEMTIME *time);
  163. }
  164. [
  165. object,
  166. oleautomation,
  167. uuid(86627eb4-42a7-41e4-a4d9-ac33a72f2d52)
  168. ]
  169. interface IRegisteredTaskCollection : IDispatch
  170. {
  171. [propget] HRESULT Count([out, retval] LONG *count);
  172. [propget] HRESULT Item([in] VARIANT index, [out, retval] IRegisteredTask **task);
  173. [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
  174. }
  175. [
  176. object,
  177. oleautomation,
  178. uuid(416d8b73-cb41-4ea1-805c-9be9a5ac4a74)
  179. ]
  180. interface IRegistrationInfo : IDispatch
  181. {
  182. [propget] HRESULT Description([out, retval] BSTR *description);
  183. [propput] HRESULT Description([in] BSTR description);
  184. [propget] HRESULT Author([out, retval] BSTR *author);
  185. [propput] HRESULT Author([in] BSTR author);
  186. [propget] HRESULT Version([out, retval] BSTR *version);
  187. [propput] HRESULT Version([in] BSTR version);
  188. [propget] HRESULT Date([out, retval] BSTR *date);
  189. [propput] HRESULT Date([in] BSTR date);
  190. [propget] HRESULT Documentation([out, retval] BSTR *doc);
  191. [propput] HRESULT Documentation([in] BSTR doc);
  192. [propget] HRESULT XmlText([out, retval] BSTR *xml);
  193. [propput] HRESULT XmlText([in] BSTR xml);
  194. [propget] HRESULT URI([out, retval] BSTR *uri);
  195. [propput] HRESULT URI([in] BSTR uri);
  196. [propget] HRESULT SecurityDescriptor([out, retval] VARIANT *sddl);
  197. [propput] HRESULT SecurityDescriptor([in] VARIANT sddl);
  198. [propget] HRESULT Source([out, retval] BSTR *source);
  199. [propput] HRESULT Source([in] BSTR source);
  200. }
  201. [
  202. object,
  203. oleautomation,
  204. uuid(8cfac062-a080-4c15-9a88-aa7c2af80dfc)
  205. ]
  206. interface ITaskFolder : IDispatch
  207. {
  208. [propget] HRESULT Name([out, retval] BSTR *name);
  209. [propget] HRESULT Path([out, retval] BSTR *path);
  210. HRESULT GetFolder([in] BSTR path, [out, retval] ITaskFolder **folder);
  211. HRESULT GetFolders([in] LONG flags, [out, retval] ITaskFolderCollection **folders);
  212. HRESULT CreateFolder([in] BSTR name, [in] VARIANT sddl, [out, retval] ITaskFolder **folder);
  213. HRESULT DeleteFolder([in] BSTR name, [in] LONG flags);
  214. HRESULT GetTask([in] BSTR path, [out, retval] IRegisteredTask **task);
  215. HRESULT GetTasks([in] LONG flags, [out, retval] IRegisteredTaskCollection **tasks);
  216. HRESULT DeleteTask([in] BSTR name, [in] LONG flags);
  217. HRESULT RegisterTask([in] BSTR path, [in] BSTR xml, [in] LONG flags, [in] VARIANT user, [in] VARIANT password,
  218. [in] TASK_LOGON_TYPE logonType, [in] VARIANT sddl, [out, retval] IRegisteredTask **task);
  219. HRESULT RegisterTaskDefinition([in] BSTR path, [in] ITaskDefinition *definition, [in] LONG flags,
  220. [in] VARIANT user, [in] VARIANT password, [in] TASK_LOGON_TYPE logon,
  221. [in] VARIANT sddl, [out, retval] IRegisteredTask **task);
  222. HRESULT GetSecurityDescriptor(LONG info, [out, retval] BSTR *sddl);
  223. HRESULT SetSecurityDescriptor([in] BSTR sddl, [in] LONG flags);
  224. }
  225. [
  226. object,
  227. oleautomation,
  228. uuid(79184a66-8664-423f-97f1-637356a5d812)
  229. ]
  230. interface ITaskFolderCollection : IDispatch
  231. {
  232. [propget] HRESULT Count([out, retval] LONG *count);
  233. [propget] HRESULT Item([in] VARIANT index, [out, retval] ITaskFolder **folder);
  234. [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
  235. }
  236. [
  237. object,
  238. oleautomation,
  239. uuid(f5bc8fc5-536d-4f77-b852-fbc1356fdeb6)
  240. ]
  241. interface ITaskDefinition : IDispatch
  242. {
  243. [propget] HRESULT RegistrationInfo([out, retval] IRegistrationInfo **info);
  244. [propput] HRESULT RegistrationInfo([in] IRegistrationInfo *info);
  245. [propget] HRESULT Triggers([out, retval] ITriggerCollection **triggers);
  246. [propput] HRESULT Triggers([in] ITriggerCollection *triggers);
  247. [propget] HRESULT Settings([out, retval] ITaskSettings **settings);
  248. [propput] HRESULT Settings([in] ITaskSettings *settings);
  249. [propget] HRESULT Data([out, retval] BSTR *data);
  250. [propput] HRESULT Data([in] BSTR data);
  251. [propget] HRESULT Principal([out, retval] IPrincipal **principal);
  252. [propput] HRESULT Principal([in] IPrincipal *principal);
  253. [propget] HRESULT Actions([out, retval] IActionCollection **actions);
  254. [propput] HRESULT Actions([in] IActionCollection *actions);
  255. [propget] HRESULT XmlText([out, retval] BSTR *xml);
  256. [propput] HRESULT XmlText([in] BSTR xml);
  257. }
  258. [
  259. object,
  260. oleautomation,
  261. uuid(8fd4711d-2d02-4c8c-87e3-eff699de127e)
  262. ]
  263. interface ITaskSettings : IDispatch
  264. {
  265. [propget] HRESULT AllowDemandStart([out, retval] VARIANT_BOOL *allow);
  266. [propput] HRESULT AllowDemandStart([in] VARIANT_BOOL allow);
  267. [propget] HRESULT RestartInterval([out, retval] BSTR *interval);
  268. [propput] HRESULT RestartInterval([in] BSTR interval);
  269. [propget] HRESULT RestartCount([out, retval] INT *count);
  270. [propput] HRESULT RestartCount([in] INT count);
  271. [propget] HRESULT MultipleInstances([out, retval] TASK_INSTANCES_POLICY *policy);
  272. [propput] HRESULT MultipleInstances([in] TASK_INSTANCES_POLICY policy);
  273. [propget] HRESULT StopIfGoingOnBatteries([out, retval] VARIANT_BOOL *stop);
  274. [propput] HRESULT StopIfGoingOnBatteries([in] VARIANT_BOOL stop);
  275. [propget] HRESULT DisallowStartIfOnBatteries([out, retval] VARIANT_BOOL *disallow);
  276. [propput] HRESULT DisallowStartIfOnBatteries([in] VARIANT_BOOL disallow);
  277. [propget] HRESULT AllowHardTerminate([out, retval] VARIANT_BOOL *allow);
  278. [propput] HRESULT AllowHardTerminate([in] VARIANT_BOOL allow);
  279. [propget] HRESULT StartWhenAvailable([out, retval] VARIANT_BOOL *start);
  280. [propput] HRESULT StartWhenAvailable([in] VARIANT_BOOL start);
  281. [propget] HRESULT XmlText([out, retval] BSTR *xml);
  282. [propput] HRESULT XmlText([in] BSTR xml);
  283. [propget] HRESULT RunOnlyIfNetworkAvailable([out, retval] VARIANT_BOOL *run);
  284. [propput] HRESULT RunOnlyIfNetworkAvailable([in] VARIANT_BOOL run);
  285. [propget] HRESULT ExecutionTimeLimit([out, retval] BSTR *limit);
  286. [propput] HRESULT ExecutionTimeLimit([in] BSTR limit);
  287. [propget] HRESULT Enabled([out, retval] VARIANT_BOOL *enabled);
  288. [propput] HRESULT Enabled([in] VARIANT_BOOL enabled);
  289. [propget] HRESULT DeleteExpiredTaskAfter([out, retval] BSTR *delay);
  290. [propput] HRESULT DeleteExpiredTaskAfter([in] BSTR delay);
  291. [propget] HRESULT Priority([out, retval] INT *priority);
  292. [propput] HRESULT Priority([in] INT priority);
  293. [propget] HRESULT Compatibility([out, retval] TASK_COMPATIBILITY *level);
  294. [propput] HRESULT Compatibility([in] TASK_COMPATIBILITY level);
  295. [propget] HRESULT Hidden([out, retval] VARIANT_BOOL *hidden);
  296. [propput] HRESULT Hidden([in] VARIANT_BOOL hidden);
  297. [propget] HRESULT IdleSettings([out, retval] IIdleSettings **settings);
  298. [propput] HRESULT IdleSettings([in] IIdleSettings *settings);
  299. [propget] HRESULT RunOnlyIfIdle([out, retval] VARIANT_BOOL *run);
  300. [propput] HRESULT RunOnlyIfIdle([in] VARIANT_BOOL run);
  301. [propget] HRESULT WakeToRun([out, retval] VARIANT_BOOL *wake);
  302. [propput] HRESULT WakeToRun([in] VARIANT_BOOL wake);
  303. [propget] HRESULT NetworkSettings([out, retval] INetworkSettings **settings);
  304. [propput] HRESULT NetworkSettings([in] INetworkSettings *settings);
  305. }
  306. [
  307. object,
  308. oleautomation,
  309. uuid(84594461-0053-4342-a8fd-088fabf11f32)
  310. ]
  311. interface IIdleSettings : IDispatch
  312. {
  313. [propget] HRESULT IdleDuration([out, retval] BSTR *delay);
  314. [propput] HRESULT IdleDuration([in] BSTR delay);
  315. [propget] HRESULT WaitTimeout([out, retval] BSTR *timeout);
  316. [propput] HRESULT WaitTimeout([in] BSTR timeout);
  317. [propget] HRESULT StopOnIdleEnd([out, retval] VARIANT_BOOL *stop);
  318. [propput] HRESULT StopOnIdleEnd([in] VARIANT_BOOL stop);
  319. [propget] HRESULT RestartOnIdle([out, retval] VARIANT_BOOL *restart);
  320. [propput] HRESULT RestartOnIdle([in] VARIANT_BOOL restart);
  321. }
  322. [
  323. object,
  324. oleautomation,
  325. uuid(653758fb-7b9a-4f1e-a471-beeb8e9b834e)
  326. ]
  327. interface IRunningTask : IDispatch
  328. {
  329. [propget] HRESULT Name([out, retval] BSTR *name);
  330. [propget] HRESULT InstanceGuid([out, retval] BSTR *guid);
  331. [propget] HRESULT Path([out, retval] BSTR *path);
  332. [propget] HRESULT State([out, retval] TASK_STATE *state);
  333. [propget] HRESULT CurrentAction([out, retval] BSTR *name);
  334. HRESULT Stop(void );
  335. HRESULT Refresh(void );
  336. [propget] HRESULT EnginePID([out, retval] DWORD *pid);
  337. }
  338. [
  339. object,
  340. oleautomation,
  341. uuid(6a67614b-6828-4fec-aa54-6d52e8f1f2db)
  342. ]
  343. interface IRunningTaskCollection : IDispatch
  344. {
  345. [propget] HRESULT Count([out, retval] LONG *count);
  346. [propget] HRESULT Item([in] VARIANT index, [out, retval] IRunningTask **task);
  347. [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
  348. }
  349. [
  350. object,
  351. oleautomation,
  352. uuid(09941815-ea89-4b5b-89e0-2a773801fac3)
  353. ]
  354. interface ITrigger : IDispatch
  355. {
  356. [propget] HRESULT Type([out, retval] TASK_TRIGGER_TYPE2 *type);
  357. [propget] HRESULT Id([out, retval] BSTR *id);
  358. [propput] HRESULT Id([in] BSTR id);
  359. [propget] HRESULT Repetition([out, retval] IRepetitionPattern **repeat);
  360. [propput] HRESULT Repetition([in] IRepetitionPattern *repeat);
  361. [propget] HRESULT ExecutionTimeLimit([out, retval] BSTR *limit);
  362. [propput] HRESULT ExecutionTimeLimit([in] BSTR limit);
  363. [propget] HRESULT StartBoundary([out, retval] BSTR *start);
  364. [propput] HRESULT StartBoundary([in] BSTR start);
  365. [propget] HRESULT EndBoundary([out, retval] BSTR *end);
  366. [propput] HRESULT EndBoundary([in] BSTR end);
  367. [propget] HRESULT Enabled([out, retval] VARIANT_BOOL *enabled);
  368. [propput] HRESULT Enabled([in] VARIANT_BOOL enabled);
  369. }
  370. [
  371. odl,
  372. uuid(126c5cd8-b288-41d5-8dbf-e491446adc5c),
  373. oleautomation,
  374. dual,
  375. nonextensible
  376. ]
  377. interface IDailyTrigger : ITrigger
  378. {
  379. [propget] HRESULT DaysInterval([out, retval] short *pDays);
  380. [propput] HRESULT DaysInterval([in] short days);
  381. [propget] HRESULT RandomDelay([out, retval] BSTR *pRandomDelay);
  382. [propput] HRESULT RandomDelay([in] BSTR randomDelay);
  383. }
  384. [
  385. object,
  386. oleautomation,
  387. uuid(85df5081-1b24-4f32-878a-d9d14df4cb77)
  388. ]
  389. interface ITriggerCollection : IDispatch
  390. {
  391. [propget] HRESULT Count([out, retval] LONG *count);
  392. [propget] HRESULT Item([in] LONG index, [out, retval] ITrigger **trigger);
  393. [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
  394. HRESULT Create([in] TASK_TRIGGER_TYPE2 type, [out, retval] ITrigger **trigger);
  395. HRESULT Remove([in] VARIANT index);
  396. HRESULT Clear();
  397. }
  398. [
  399. object,
  400. oleautomation,
  401. uuid(b45747e0-eba7-4276-9f29-85c5bb300006)
  402. ]
  403. interface ITimeTrigger : ITrigger
  404. {
  405. [propget] HRESULT RandomDelay([out, retval] BSTR *delay);
  406. [propput] HRESULT RandomDelay([in] BSTR delay);
  407. }
  408. [
  409. object,
  410. oleautomation,
  411. uuid(7fb9acf1-26be-400e-85b5-294b9c75dfd6)
  412. ]
  413. interface IRepetitionPattern : IDispatch
  414. {
  415. [propget] HRESULT Interval([out, retval] BSTR *interval);
  416. [propput] HRESULT Interval([in] BSTR interval);
  417. [propget] HRESULT Duration([out, retval] BSTR *duration);
  418. [propput] HRESULT Duration([in] BSTR duration);
  419. [propget] HRESULT StopAtDurationEnd([out, retval] VARIANT_BOOL *stop);
  420. [propput] HRESULT StopAtDurationEnd([in] VARIANT_BOOL sop);
  421. }
  422. [
  423. object,
  424. oleautomation,
  425. uuid(bae54997-48b1-4cbe-9965-d6be263ebea4)
  426. ]
  427. interface IAction : IDispatch
  428. {
  429. [propget] HRESULT Id([out, retval] BSTR *id);
  430. [propput] HRESULT Id([in] BSTR id);
  431. [propget] HRESULT Type([out, retval] TASK_ACTION_TYPE *type);
  432. }
  433. [
  434. object,
  435. oleautomation,
  436. uuid(02820e19-7b98-4ed2-b2e8-fdccceff619b)
  437. ]
  438. interface IActionCollection : IDispatch
  439. {
  440. [propget] HRESULT Count([out, retval] LONG *count);
  441. [propget] HRESULT Item([in] LONG index, [out, retval] IAction **action);
  442. [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
  443. [propget] HRESULT XmlText([out, retval] BSTR *xml);
  444. [propput] HRESULT XmlText([in] BSTR xml);
  445. HRESULT Create([in] TASK_ACTION_TYPE Type, [out, retval] IAction **action);
  446. HRESULT Remove([in] VARIANT index);
  447. HRESULT Clear();
  448. [propget] HRESULT Context([out, retval] BSTR *ctx);
  449. [propput] HRESULT Context([in] BSTR ctx);
  450. }
  451. [
  452. object,
  453. oleautomation,
  454. uuid(4c3d624d-fd6b-49a3-b9b7-09cb3cd3f047)
  455. ]
  456. interface IExecAction : IAction
  457. {
  458. [propget] HRESULT Path([out, retval] BSTR *path);
  459. [propput] HRESULT Path([in] BSTR path);
  460. [propget] HRESULT Arguments([out, retval] BSTR *argument);
  461. [propput] HRESULT Arguments([in] BSTR argument);
  462. [propget] HRESULT WorkingDirectory([out, retval] BSTR *directory);
  463. [propput] HRESULT WorkingDirectory([in] BSTR directory);
  464. }
  465. [
  466. object,
  467. oleautomation,
  468. uuid(9f7dea84-c30b-4245-80b6-00e9f646f1b4)
  469. ]
  470. interface INetworkSettings : IDispatch
  471. {
  472. [propget] HRESULT Name([out, retval] BSTR *name);
  473. [propput] HRESULT Name([in] BSTR name);
  474. [propget] HRESULT Id([out, retval] BSTR *id);
  475. [propput] HRESULT Id([in] BSTR id);
  476. }
  477. [
  478. object,
  479. oleautomation,
  480. uuid(d98d51e5-c9b4-496a-a9c1-18980261cf0f)
  481. ]
  482. interface IPrincipal : IDispatch
  483. {
  484. [propget] HRESULT Id([out, retval] BSTR *id);
  485. [propput] HRESULT Id([in] BSTR id);
  486. [propget] HRESULT DisplayName([out, retval] BSTR *name);
  487. [propput] HRESULT DisplayName([in] BSTR name);
  488. [propget] HRESULT UserId([out, retval] BSTR *user);
  489. [propput] HRESULT UserId([in] BSTR user);
  490. [propget] HRESULT LogonType([out, retval] TASK_LOGON_TYPE *logon);
  491. [propput] HRESULT LogonType([in] TASK_LOGON_TYPE logon);
  492. [propget] HRESULT GroupId([out, retval] BSTR *group);
  493. [propput] HRESULT GroupId([in] BSTR group);
  494. [propget] HRESULT RunLevel([out, retval] TASK_RUNLEVEL_TYPE *level);
  495. [propput] HRESULT RunLevel([in] TASK_RUNLEVEL_TYPE level);
  496. }
  497. [
  498. threading(both),
  499. progid("Schedule.Service.1"),
  500. vi_progid("Schedule.Service"),
  501. uuid(0f87369f-a4e5-4cfc-bd3e-73e6154572dd)
  502. ]
  503. coclass TaskScheduler
  504. {
  505. interface ITaskService;
  506. }
  507. } /* library TaskScheduler */