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