taskschd.idl 18.5 KB
Newer Older
1
/*
2 3
 * Task Scheduler definitions
 *
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 * Copyright 2013 Dmitry Timoshkov
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

import "oaidl.idl";
import "ocidl.idl";

24 25 26 27 28 29 30
[
    uuid(e34cb9f1-c7f7-424c-be29-027dcc09363a),
    version(1.0)
]
library TaskScheduler
{
importlib("stdole2.tlb");
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

typedef enum _TASK_STATE
{
    TASK_STATE_UNKNOWN,
    TASK_STATE_DISABLED,
    TASK_STATE_QUEUED,
    TASK_STATE_READY,
    TASK_STATE_RUNNING
} TASK_STATE;

typedef enum _TASK_ENUM_FLAGS
{
    TASK_ENUM_HIDDEN = 0x0001
} TASK_ENUM_FLAGS;

typedef enum _TASK_LOGON_TYPE
{
    TASK_LOGON_NONE,
    TASK_LOGON_PASSWORD,
    TASK_LOGON_S4U,
    TASK_LOGON_INTERACTIVE_TOKEN,
    TASK_LOGON_GROUP,
    TASK_LOGON_SERVICE_ACCOUNT,
    TASK_LOGON_INTERACTIVE_TOKEN_OR_PASSWORD
} TASK_LOGON_TYPE;

typedef enum _TASK_RUNLEVEL
{
    TASK_RUNLEVEL_LUA,
    TASK_RUNLEVEL_HIGHEST
61
} TASK_RUNLEVEL_TYPE;
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

typedef enum _TASK_TRIGGER_TYPE2
{
    TASK_TRIGGER_EVENT,
    TASK_TRIGGER_TIME,
    TASK_TRIGGER_DAILY,
    TASK_TRIGGER_WEEKLY,
    TASK_TRIGGER_MONTHLY,
    TASK_TRIGGER_MONTHLYDOW,
    TASK_TRIGGER_IDLE,
    TASK_TRIGGER_REGISTRATION,
    TASK_TRIGGER_BOOT,
    TASK_TRIGGER_LOGON,
    TASK_TRIGGER_SESSION_STATE_CHANGE = 11
} TASK_TRIGGER_TYPE2;

typedef enum _TASK_ACTION_TYPE
{
    TASK_ACTION_EXEC = 0,
    TASK_ACTION_COM_HANDLER = 5,
    TASK_ACTION_SEND_EMAIL = 6,
    TASK_ACTION_SHOW_MESSAGE = 7
} TASK_ACTION_TYPE;

typedef enum _TASK_INSTANCES_POLICY
{
    TASK_INSTANCES_PARALLEL,
    TASK_INSTANCES_QUEUE,
    TASK_INSTANCES_IGNORE_NEW,
    TASK_INSTANCES_STOP_EXISTING
} TASK_INSTANCES_POLICY;

typedef enum _TASK_COMPATIBILITY
{
    TASK_COMPATIBILITY_AT,
    TASK_COMPATIBILITY_V1,
    TASK_COMPATIBILITY_V2,
    TASK_COMPATIBILITY_V2_1
} TASK_COMPATIBILITY;
101

102 103 104 105 106 107 108 109 110 111 112
typedef enum _TASK_CREATION
{
    TASK_VALIDATE_ONLY = 1,
    TASK_CREATE = 2,
    TASK_UPDATE = 4,
    TASK_CREATE_OR_UPDATE = 6,
    TASK_DISABLE = 8,
    TASK_DONT_ADD_PRINCIPAL_ACE = 16,
    TASK_IGNORE_REGISTRATION_TRIGGERS = 32
} TASK_CREATION;

113 114 115
interface ITaskService;
interface IRegisteredTask;
interface IRegisteredTaskCollection;
116
interface IRegistrationInfo;
117 118 119
interface ITaskFolder;
interface ITaskFolderCollection;
interface ITaskDefinition;
120 121
interface ITaskSettings;
interface IIdleSettings;
122 123
interface IRunningTask;
interface IRunningTaskCollection;
124 125
interface ITrigger;
interface ITriggerCollection;
126
interface ITimeTrigger;
127 128 129
interface IRepetitionPattern;
interface IAction;
interface IActionCollection;
130
interface IExecAction;
131 132
interface INetworkSettings;
interface IPrincipal;
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190

[
    object,
    oleautomation,
    uuid(2faba4c7-4da9-4013-9697-20cc3fd40f85)
]
interface ITaskService : IDispatch
{
    HRESULT GetFolder([in] BSTR path, [out, retval] ITaskFolder **folder );
    HRESULT GetRunningTasks([in] LONG flags, [out, retval] IRunningTaskCollection **tasks );
    HRESULT NewTask([in] DWORD flags, [out, retval] ITaskDefinition **definition );
    HRESULT Connect([in, optional] VARIANT server, [in, optional] VARIANT user, [in, optional] VARIANT domain, [in, optional] VARIANT password);
    [propget] HRESULT Connected([out, retval] VARIANT_BOOL *connected);
    [propget] HRESULT TargetServer([out, retval] BSTR *server);
    [propget] HRESULT ConnectedUser([out, retval] BSTR *user);
    [propget] HRESULT ConnectedDomain([out, retval] BSTR *domain);
    [propget] HRESULT HighestVersion([out, retval] DWORD *version);
}

[
    object,
    oleautomation,
    uuid(9c86f320-dee3-4dd1-b972-a303f26b061e)
]
interface IRegisteredTask : IDispatch
{
    [propget] HRESULT Name([out, retval] BSTR *name);
    [propget] HRESULT Path([out, retval] BSTR *path);
    [propget] HRESULT State([out, retval] TASK_STATE *state);
    [propget] HRESULT Enabled([out, retval] VARIANT_BOOL *enabled);
    [propput] HRESULT Enabled(VARIANT_BOOL enabled);
    HRESULT Run([in] VARIANT params, [out, retval] IRunningTask **task);
    HRESULT RunEx([in] VARIANT params, [in] LONG flags, [in] LONG sessionID, [in] BSTR user, [out, retval] IRunningTask **task);
    HRESULT GetInstances([in] LONG flags, [out, retval] IRunningTaskCollection **tasks);
    [propget] HRESULT LastRunTime([out, retval] DATE *date);
    [propget] HRESULT LastTaskResult([out, retval] LONG *result);
    [propget] HRESULT NumberOfMissedRuns([out, retval] LONG *runs);
    [propget] HRESULT NextRunTime([out, retval] DATE *date);
    [propget] HRESULT Definition([out, retval] ITaskDefinition **task);
    [propget] HRESULT Xml([out, retval] BSTR *xml);
    HRESULT GetSecurityDescriptor([in] LONG info, [out, retval] BSTR *sddl);
    HRESULT SetSecurityDescriptor([in] BSTR sddl, [in] LONG flags);
    HRESULT Stop([in] LONG flags);
    HRESULT GetRunTimes([in] const LPSYSTEMTIME start, [in] const LPSYSTEMTIME end, [in, out] DWORD *count, [out] LPSYSTEMTIME *time);
}

[
    object,
    oleautomation,
    uuid(86627eb4-42a7-41e4-a4d9-ac33a72f2d52)
]
interface IRegisteredTaskCollection : IDispatch
{
    [propget] HRESULT Count([out, retval] LONG *count);
    [propget] HRESULT Item([in] VARIANT index, [out, retval] IRegisteredTask **task);
    [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
}

191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
[
    object,
    oleautomation,
    uuid(416d8b73-cb41-4ea1-805c-9be9a5ac4a74)
]
interface IRegistrationInfo : IDispatch
{
    [propget] HRESULT Description([out, retval] BSTR *description);
    [propput] HRESULT Description([in] BSTR description);
    [propget] HRESULT Author([out, retval] BSTR *author);
    [propput] HRESULT Author([in] BSTR author);
    [propget] HRESULT Version([out, retval] BSTR *version);
    [propput] HRESULT Version([in] BSTR version);
    [propget] HRESULT Date([out, retval] BSTR *date);
    [propput] HRESULT Date([in] BSTR date);
    [propget] HRESULT Documentation([out, retval] BSTR *doc);
    [propput] HRESULT Documentation([in] BSTR doc);
    [propget] HRESULT XmlText([out, retval] BSTR *xml);
    [propput] HRESULT XmlText([in] BSTR xml);
    [propget] HRESULT URI([out, retval] BSTR *uri);
    [propput] HRESULT URI([in] BSTR uri);
    [propget] HRESULT SecurityDescriptor([out, retval] VARIANT *sddl);
    [propput] HRESULT SecurityDescriptor([in] VARIANT sddl);
    [propget] HRESULT Source([out, retval] BSTR *source);
    [propput] HRESULT Source([in] BSTR source);
}

218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
[
    object,
    oleautomation,
    uuid(8cfac062-a080-4c15-9a88-aa7c2af80dfc)
]
interface ITaskFolder : IDispatch
{
    [propget] HRESULT Name([out, retval] BSTR *name);
    [propget] HRESULT Path([out, retval] BSTR *path);
    HRESULT GetFolder([in] BSTR path, [out, retval] ITaskFolder **folder);
    HRESULT GetFolders([in] LONG flags, [out, retval] ITaskFolderCollection **folders);
    HRESULT CreateFolder([in] BSTR name, [in] VARIANT sddl, [out, retval] ITaskFolder **folder);
    HRESULT DeleteFolder([in] BSTR name, [in] LONG flags);
    HRESULT GetTask([in] BSTR path, [out, retval] IRegisteredTask **task);
    HRESULT GetTasks([in] LONG flags, [out, retval] IRegisteredTaskCollection **tasks);
    HRESULT DeleteTask([in] BSTR name, [in] LONG flags);
    HRESULT RegisterTask([in] BSTR path, [in] BSTR xml, [in] LONG flags, [in] VARIANT user, [in] VARIANT password,
                         [in] TASK_LOGON_TYPE logonType, [in] VARIANT sddl, [out, retval] IRegisteredTask **task);
    HRESULT RegisterTaskDefinition([in] BSTR path, [in] ITaskDefinition *definition, [in] LONG flags,
                                   [in] VARIANT user,  [in] VARIANT password,  [in] TASK_LOGON_TYPE logon,
                                   [in] VARIANT sddl, [out, retval] IRegisteredTask **task);
    HRESULT GetSecurityDescriptor(LONG info, [out, retval] BSTR *sddl);
    HRESULT SetSecurityDescriptor([in] BSTR sddl, [in] LONG flags);
}

[
    object,
    oleautomation,
    uuid(79184a66-8664-423f-97f1-637356a5d812)
]
interface ITaskFolderCollection : IDispatch
{
    [propget] HRESULT Count([out, retval] LONG *count);
    [propget] HRESULT Item([in] VARIANT index, [out, retval] ITaskFolder **folder);
    [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
}

255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
[
    object,
    oleautomation,
    uuid(f5bc8fc5-536d-4f77-b852-fbc1356fdeb6)
]
interface ITaskDefinition : IDispatch
{
    [propget] HRESULT RegistrationInfo([out, retval] IRegistrationInfo **info);
    [propput] HRESULT RegistrationInfo([in] IRegistrationInfo *info);
    [propget] HRESULT Triggers([out, retval] ITriggerCollection **triggers);
    [propput] HRESULT Triggers([in] ITriggerCollection *triggers);
    [propget] HRESULT Settings([out, retval] ITaskSettings **settings);
    [propput] HRESULT Settings([in] ITaskSettings *settings);
    [propget] HRESULT Data([out, retval] BSTR *data);
    [propput] HRESULT Data([in] BSTR data);
    [propget] HRESULT Principal([out, retval] IPrincipal **principal);
    [propput] HRESULT Principal([in] IPrincipal *principal);
    [propget] HRESULT Actions([out, retval] IActionCollection **actions);
    [propput] HRESULT Actions([in] IActionCollection *actions);
    [propget] HRESULT XmlText([out, retval] BSTR *xml);
    [propput] HRESULT XmlText([in] BSTR xml);
}

[
    object,
    oleautomation,
    uuid(8fd4711d-2d02-4c8c-87e3-eff699de127e)
]
interface ITaskSettings : IDispatch
{
    [propget] HRESULT AllowDemandStart([out, retval] VARIANT_BOOL *allow);
    [propput] HRESULT AllowDemandStart([in] VARIANT_BOOL allow);
    [propget] HRESULT RestartInterval([out, retval] BSTR *interval);
    [propput] HRESULT RestartInterval([in] BSTR interval);
    [propget] HRESULT RestartCount([out, retval] INT *count);
    [propput] HRESULT RestartCount([in] INT count);
    [propget] HRESULT MultipleInstances([out, retval] TASK_INSTANCES_POLICY *policy);
    [propput] HRESULT MultipleInstances([in] TASK_INSTANCES_POLICY policy);
    [propget] HRESULT StopIfGoingOnBatteries([out, retval] VARIANT_BOOL *stop);
    [propput] HRESULT StopIfGoingOnBatteries([in] VARIANT_BOOL stop);
    [propget] HRESULT DisallowStartIfOnBatteries([out, retval] VARIANT_BOOL *disallow);
    [propput] HRESULT DisallowStartIfOnBatteries([in] VARIANT_BOOL disallow);
    [propget] HRESULT AllowHardTerminate([out, retval] VARIANT_BOOL *allow);
    [propput] HRESULT AllowHardTerminate([in] VARIANT_BOOL allow);
    [propget] HRESULT StartWhenAvailable([out, retval] VARIANT_BOOL *start);
    [propput] HRESULT StartWhenAvailable([in] VARIANT_BOOL start);
    [propget] HRESULT XmlText([out, retval] BSTR *xml);
    [propput] HRESULT XmlText([in] BSTR xml);
    [propget] HRESULT RunOnlyIfNetworkAvailable([out, retval] VARIANT_BOOL *run);
    [propput] HRESULT RunOnlyIfNetworkAvailable([in] VARIANT_BOOL run);
    [propget] HRESULT ExecutionTimeLimit([out, retval] BSTR *limit);
    [propput] HRESULT ExecutionTimeLimit([in] BSTR limit);
    [propget] HRESULT Enabled([out, retval] VARIANT_BOOL *enabled);
    [propput] HRESULT Enabled([in] VARIANT_BOOL enabled);
    [propget] HRESULT DeleteExpiredTaskAfter([out, retval] BSTR *delay);
    [propput] HRESULT DeleteExpiredTaskAfter([in] BSTR delay);
    [propget] HRESULT Priority([out, retval] INT *priority);
    [propput] HRESULT Priority([in] INT priority);
    [propget] HRESULT Compatibility([out, retval] TASK_COMPATIBILITY *level);
    [propput] HRESULT Compatibility([in] TASK_COMPATIBILITY level);
    [propget] HRESULT Hidden([out, retval] VARIANT_BOOL *hidden);
    [propput] HRESULT Hidden([in] VARIANT_BOOL hidden);
    [propget] HRESULT IdleSettings([out, retval] IIdleSettings **settings);
    [propput] HRESULT IdleSettings([in] IIdleSettings *settings);
    [propget] HRESULT RunOnlyIfIdle([out, retval] VARIANT_BOOL *run);
    [propput] HRESULT RunOnlyIfIdle([in] VARIANT_BOOL run);
    [propget] HRESULT WakeToRun([out, retval] VARIANT_BOOL *wake);
    [propput] HRESULT WakeToRun([in] VARIANT_BOOL wake);
    [propget] HRESULT NetworkSettings([out, retval] INetworkSettings **settings);
    [propput] HRESULT NetworkSettings([in] INetworkSettings *settings);
}

[
    object,
    oleautomation,
    uuid(84594461-0053-4342-a8fd-088fabf11f32)
]
interface IIdleSettings : IDispatch
{
    [propget] HRESULT IdleDuration([out, retval] BSTR *delay);
    [propput] HRESULT IdleDuration([in] BSTR delay);
    [propget] HRESULT WaitTimeout([out, retval] BSTR *timeout);
    [propput] HRESULT WaitTimeout([in] BSTR timeout);
    [propget] HRESULT StopOnIdleEnd([out, retval] VARIANT_BOOL *stop);
    [propput] HRESULT StopOnIdleEnd([in] VARIANT_BOOL stop);
    [propget] HRESULT RestartOnIdle([out, retval] VARIANT_BOOL *restart);
    [propput] HRESULT RestartOnIdle([in] VARIANT_BOOL restart);
}

344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
[
    object,
    oleautomation,
    uuid(653758fb-7b9a-4f1e-a471-beeb8e9b834e)
]
interface IRunningTask : IDispatch
{
    [propget] HRESULT Name([out, retval] BSTR *name);
    [propget] HRESULT InstanceGuid([out, retval] BSTR *guid);
    [propget] HRESULT Path([out, retval] BSTR *path);
    [propget] HRESULT State([out, retval] TASK_STATE *state);
    [propget] HRESULT CurrentAction([out, retval] BSTR *name);
    HRESULT Stop(void );
    HRESULT Refresh(void );
    [propget] HRESULT EnginePID([out, retval] DWORD *pid);
}

[
    object,
    oleautomation,
    uuid(6a67614b-6828-4fec-aa54-6d52e8f1f2db)
]
interface IRunningTaskCollection : IDispatch
{
    [propget] HRESULT Count([out, retval] LONG *count);
    [propget] HRESULT Item([in] VARIANT index, [out, retval] IRunningTask **task);
    [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
}
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409

[
    object,
    oleautomation,
    uuid(09941815-ea89-4b5b-89e0-2a773801fac3)
]
interface ITrigger : IDispatch
{
    [propget] HRESULT Type([out, retval] TASK_TRIGGER_TYPE2 *type);
    [propget] HRESULT Id([out, retval] BSTR *id);
    [propput] HRESULT Id([in] BSTR id);
    [propget] HRESULT Repetition([out, retval] IRepetitionPattern **repeat);
    [propput] HRESULT Repetition([in] IRepetitionPattern *repeat);
    [propget] HRESULT ExecutionTimeLimit([out, retval] BSTR *limit);
    [propput] HRESULT ExecutionTimeLimit([in] BSTR limit);
    [propget] HRESULT StartBoundary([out, retval] BSTR *start);
    [propput] HRESULT StartBoundary([in] BSTR start);
    [propget] HRESULT EndBoundary([out, retval] BSTR *end);
    [propput] HRESULT EndBoundary([in] BSTR end);
    [propget] HRESULT Enabled([out, retval] VARIANT_BOOL *enabled);
    [propput] HRESULT Enabled([in] VARIANT_BOOL enabled);
}

[
    object,
    oleautomation,
    uuid(85df5081-1b24-4f32-878a-d9d14df4cb77)
]
interface ITriggerCollection : IDispatch
{
    [propget] HRESULT Count([out, retval] LONG *count);
    [propget] HRESULT Item([in] LONG index, [out, retval] ITrigger **trigger);
    [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
    HRESULT Create([in] TASK_TRIGGER_TYPE2 type, [out, retval] ITrigger **trigger);
    HRESULT Remove([in] VARIANT index);
    HRESULT Clear();
}

410 411 412 413 414 415 416 417 418 419 420
[
    object,
    oleautomation,
    uuid(b45747e0-eba7-4276-9f29-85c5bb300006)
]
interface ITimeTrigger : ITrigger
{
    [propget] HRESULT RandomDelay([out, retval] BSTR *delay);
    [propput] HRESULT RandomDelay([in] BSTR delay);
}

421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466
[
    object,
    oleautomation,
    uuid(7fb9acf1-26be-400e-85b5-294b9c75dfd6)
]
interface IRepetitionPattern : IDispatch
{
    [propget] HRESULT Interval([out, retval] BSTR *interval);
    [propput] HRESULT Interval([in] BSTR interval);
    [propget] HRESULT Duration([out, retval] BSTR *duration);
    [propput] HRESULT Duration([in] BSTR duration);
    [propget] HRESULT StopAtDurationEnd([out, retval] VARIANT_BOOL *stop);
    [propput] HRESULT StopAtDurationEnd([in] VARIANT_BOOL sop);
}

[
    object,
    oleautomation,
    uuid(bae54997-48b1-4cbe-9965-d6be263ebea4)
]
interface IAction : IDispatch
{
    [propget] HRESULT Id([out, retval] BSTR *id);
    [propput] HRESULT Id([in] BSTR id);
    [propget] HRESULT Type([out, retval] TASK_ACTION_TYPE *type);
}

[
    object,
    oleautomation,
    uuid(02820e19-7b98-4ed2-b2e8-fdccceff619b)
]
interface IActionCollection : IDispatch
{
    [propget] HRESULT Count([out, retval] LONG *count);
    [propget] HRESULT Item([in] LONG index, [out, retval] IAction **action);
    [propget] HRESULT _NewEnum([out, retval] IUnknown **penum);
    [propget] HRESULT XmlText([out, retval] BSTR *xml);
    [propput] HRESULT XmlText([in] BSTR xml);
    HRESULT Create([in] TASK_ACTION_TYPE Type, [out, retval] IAction **action);
    HRESULT Remove([in] VARIANT index);
    HRESULT Clear();
    [propget] HRESULT Context([out, retval] BSTR *ctx);
    [propput] HRESULT Context([in] BSTR ctx);
}

467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
[
    object,
    oleautomation,
    uuid(4c3d624d-fd6b-49a3-b9b7-09cb3cd3f047)
]
interface IExecAction : IAction
{
    [propget] HRESULT Path([out, retval] BSTR *path);
    [propput] HRESULT Path([in] BSTR path);
    [propget] HRESULT Arguments([out, retval] BSTR *argument);
    [propput] HRESULT Arguments([in] BSTR argument);
    [propget] HRESULT WorkingDirectory([out, retval] BSTR *directory);
    [propput] HRESULT WorkingDirectory([in] BSTR directory);
}

482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
[
    object,
    oleautomation,
    uuid(9f7dea84-c30b-4245-80b6-00e9f646f1b4)
]
interface INetworkSettings : IDispatch
{
    [propget] HRESULT Name([out, retval] BSTR *name);
    [propput] HRESULT Name([in] BSTR name);
    [propget] HRESULT Id([out, retval] BSTR *id);
    [propput] HRESULT Id([in] BSTR id);
}

[
    object,
    oleautomation,
    uuid(d98d51e5-c9b4-496a-a9c1-18980261cf0f)
]
interface IPrincipal : IDispatch
{
    [propget] HRESULT Id([out, retval] BSTR *id);
    [propput] HRESULT Id([in] BSTR id);
    [propget] HRESULT DisplayName([out, retval] BSTR *name);
    [propput] HRESULT DisplayName([in] BSTR name);
    [propget] HRESULT UserId([out, retval] BSTR *user);
    [propput] HRESULT UserId([in] BSTR user);
    [propget] HRESULT LogonType([out, retval] TASK_LOGON_TYPE *logon);
    [propput] HRESULT LogonType([in] TASK_LOGON_TYPE logon);
    [propget] HRESULT GroupId([out, retval] BSTR *group);
    [propput] HRESULT GroupId([in] BSTR group);
512 513
    [propget] HRESULT RunLevel([out, retval] TASK_RUNLEVEL_TYPE *level);
    [propput] HRESULT RunLevel([in] TASK_RUNLEVEL_TYPE level);
514
}
515 516 517 518 519 520 521 522 523 524 525 526 527

[
    threading(both),
    progid("Schedule.Service.1"),
    vi_progid("Schedule.Service"),
    uuid(0f87369f-a4e5-4cfc-bd3e-73e6154572dd)
]
coclass TaskScheduler
{
    interface ITaskService;
}

} /* library TaskScheduler */