GUI/TaskScheduler.cs
author moel.mich
Sat, 24 Apr 2010 20:09:18 +0000
changeset 91 c0937b698b81
child 94 b094329e882d
permissions -rw-r--r--
Fixed Issue 39.
moel@82
     1
/*
moel@82
     2
  
moel@82
     3
  Version: MPL 1.1/GPL 2.0/LGPL 2.1
moel@82
     4
moel@82
     5
  The contents of this file are subject to the Mozilla Public License Version
moel@82
     6
  1.1 (the "License"); you may not use this file except in compliance with
moel@82
     7
  the License. You may obtain a copy of the License at
moel@82
     8
 
moel@82
     9
  http://www.mozilla.org/MPL/
moel@82
    10
moel@82
    11
  Software distributed under the License is distributed on an "AS IS" basis,
moel@82
    12
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
moel@82
    13
  for the specific language governing rights and limitations under the License.
moel@82
    14
moel@82
    15
  The Original Code is the Open Hardware Monitor code.
moel@82
    16
moel@82
    17
  The Initial Developer of the Original Code is 
moel@82
    18
  Michael Möller <m.moeller@gmx.ch>.
moel@82
    19
  Portions created by the Initial Developer are Copyright (C) 2009-2010
moel@82
    20
  the Initial Developer. All Rights Reserved.
moel@82
    21
moel@82
    22
  Contributor(s):
moel@82
    23
moel@82
    24
  Alternatively, the contents of this file may be used under the terms of
moel@82
    25
  either the GNU General Public License Version 2 or later (the "GPL"), or
moel@82
    26
  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
moel@82
    27
  in which case the provisions of the GPL or the LGPL are applicable instead
moel@82
    28
  of those above. If you wish to allow use of your version of this file only
moel@82
    29
  under the terms of either the GPL or the LGPL, and not to allow others to
moel@82
    30
  use your version of this file under the terms of the MPL, indicate your
moel@82
    31
  decision by deleting the provisions above and replace them with the notice
moel@82
    32
  and other provisions required by the GPL or the LGPL. If you do not delete
moel@82
    33
  the provisions above, a recipient may use your version of this file under
moel@82
    34
  the terms of any one of the MPL, the GPL or the LGPL.
moel@82
    35
 
moel@82
    36
*/
moel@82
    37
moel@82
    38
using System;
moel@82
    39
using System.Collections;
moel@82
    40
using System.Reflection;
moel@82
    41
using System.Runtime.CompilerServices;
moel@82
    42
using System.Runtime.InteropServices;
moel@82
    43
moel@82
    44
namespace OpenHardwareMonitor.TaskScheduler {
moel@82
    45
moel@82
    46
  public enum TASK_ACTION_TYPE {
moel@82
    47
    TASK_ACTION_COM_HANDLER = 5,
moel@82
    48
    TASK_ACTION_EXEC = 0,
moel@82
    49
    TASK_ACTION_SEND_EMAIL = 6,
moel@82
    50
    TASK_ACTION_SHOW_MESSAGE = 7
moel@82
    51
  }
moel@82
    52
moel@82
    53
  public enum TASK_CREATION {
moel@82
    54
    TASK_CREATE = 2,
moel@82
    55
    TASK_CREATE_OR_UPDATE = 6,
moel@82
    56
    TASK_DISABLE = 8,
moel@82
    57
    TASK_DONT_ADD_PRINCIPAL_ACE = 0x10,
moel@82
    58
    TASK_IGNORE_REGISTRATION_TRIGGERS = 0x20,
moel@82
    59
    TASK_UPDATE = 4,
moel@82
    60
    TASK_VALIDATE_ONLY = 1
moel@82
    61
  }
moel@82
    62
moel@82
    63
  public enum TASK_ENUM_FLAGS {
moel@82
    64
    TASK_ENUM_HIDDEN = 1
moel@82
    65
  }
moel@82
    66
moel@82
    67
  public enum TASK_INSTANCES_POLICY {
moel@82
    68
    TASK_INSTANCES_PARALLEL,
moel@82
    69
    TASK_INSTANCES_QUEUE,
moel@82
    70
    TASK_INSTANCES_IGNORE_NEW,
moel@82
    71
    TASK_INSTANCES_STOP_EXISTING
moel@82
    72
  }
moel@82
    73
moel@82
    74
  public enum TASK_LOGON_TYPE {
moel@82
    75
    TASK_LOGON_NONE,
moel@82
    76
    TASK_LOGON_PASSWORD,
moel@82
    77
    TASK_LOGON_S4U,
moel@82
    78
    TASK_LOGON_INTERACTIVE_TOKEN,
moel@82
    79
    TASK_LOGON_GROUP,
moel@82
    80
    TASK_LOGON_SERVICE_ACCOUNT,
moel@82
    81
    TASK_LOGON_INTERACTIVE_TOKEN_OR_PASSWORD
moel@82
    82
  }
moel@82
    83
moel@82
    84
  public enum TASK_RUN_FLAGS {
moel@82
    85
    TASK_RUN_AS_SELF = 1,
moel@82
    86
    TASK_RUN_IGNORE_CONSTRAINTS = 2,
moel@82
    87
    TASK_RUN_NO_FLAGS = 0,
moel@82
    88
    TASK_RUN_USE_SESSION_ID = 4,
moel@82
    89
    TASK_RUN_USER_SID = 8
moel@82
    90
  }
moel@82
    91
moel@82
    92
  public enum TASK_RUNLEVEL {
moel@82
    93
    TASK_RUNLEVEL_LUA,
moel@82
    94
    TASK_RUNLEVEL_HIGHEST
moel@82
    95
  }
moel@82
    96
moel@82
    97
  public enum TASK_STATE {
moel@82
    98
    TASK_STATE_UNKNOWN,
moel@82
    99
    TASK_STATE_DISABLED,
moel@82
   100
    TASK_STATE_QUEUED,
moel@82
   101
    TASK_STATE_READY,
moel@82
   102
    TASK_STATE_RUNNING
moel@82
   103
  }
moel@82
   104
moel@82
   105
  public enum TASK_TRIGGER_TYPE2 {
moel@82
   106
    TASK_TRIGGER_BOOT = 8,
moel@82
   107
    TASK_TRIGGER_DAILY = 2,
moel@82
   108
    TASK_TRIGGER_EVENT = 0,
moel@82
   109
    TASK_TRIGGER_IDLE = 6,
moel@82
   110
    TASK_TRIGGER_LOGON = 9,
moel@82
   111
    TASK_TRIGGER_MONTHLY = 4,
moel@82
   112
    TASK_TRIGGER_MONTHLYDOW = 5,
moel@82
   113
    TASK_TRIGGER_REGISTRATION = 7,
moel@82
   114
    TASK_TRIGGER_SESSION_STATE_CHANGE = 11,
moel@82
   115
    TASK_TRIGGER_TIME = 1,
moel@82
   116
    TASK_TRIGGER_WEEKLY = 3
moel@82
   117
  }
moel@82
   118
moel@82
   119
  [ComImport, TypeLibType((short)0x10c0), Guid("BAE54997-48B1-4CBE-9965-D6BE263EBEA4")]
moel@82
   120
  public interface IAction {
moel@82
   121
    [DispId(1)]
moel@82
   122
    string Id { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] set; }
moel@82
   123
    [DispId(2)]
moel@82
   124
    TASK_ACTION_TYPE Type { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] get; }
moel@82
   125
  }
moel@82
   126
moel@82
   127
  [ComImport, TypeLibType((short)0x10c0), Guid("02820E19-7B98-4ED2-B2E8-FDCCCEFF619B")]
moel@82
   128
  public interface IActionCollection : IEnumerable {
moel@82
   129
    [DispId(1)]
moel@82
   130
    int Count { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; }
moel@82
   131
    [DispId(0)]
moel@82
   132
    IAction this[int index] { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }
moel@82
   133
    [DispId(2)]
moel@82
   134
    string XmlText { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] set; }
moel@82
   135
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   136
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)]
moel@82
   137
    IAction Create([In] TASK_ACTION_TYPE Type);
moel@82
   138
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)]
moel@82
   139
    void Remove([In, MarshalAs(UnmanagedType.Struct)] object index);
moel@82
   140
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)]
moel@82
   141
    void Clear();
moel@82
   142
    [DispId(6)]
moel@82
   143
    string Context { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] set; }
moel@82
   144
  }
moel@82
   145
moel@82
   146
  [ComImport, Guid("4C3D624D-FD6B-49A3-B9B7-09CB3CD3F047"), TypeLibType((short)0x10c0)]
moel@82
   147
  public interface IExecAction : IAction {
moel@82
   148
    [DispId(10)]
moel@82
   149
    string Path { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(10)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(10)] set; }
moel@82
   150
    [DispId(11)]
moel@82
   151
    string Arguments { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] set; }
moel@82
   152
    [DispId(12)]
moel@82
   153
    string WorkingDirectory { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] set; }
moel@82
   154
  }
moel@82
   155
moel@82
   156
  [ComImport, Guid("72DADE38-FAE4-4B3E-BAF4-5D009AF02B1C"), TypeLibType((short)0x10c0)]
moel@82
   157
  public interface ILogonTrigger : ITrigger {
moel@82
   158
    [DispId(20)]
moel@82
   159
    string Delay { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(20)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(20)] set; }
moel@82
   160
    [DispId(0x15)]
moel@82
   161
    string UserId { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x15)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x15)] set; }
moel@82
   162
  }
moel@82
   163
moel@82
   164
  [ComImport, Guid("D98D51E5-C9B4-496A-A9C1-18980261CF0F"), TypeLibType((short)0x10c0)]
moel@82
   165
  public interface IPrincipal {
moel@82
   166
    [DispId(1)]
moel@82
   167
    string Id { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] set; }
moel@82
   168
    [DispId(2)]
moel@82
   169
    string DisplayName { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] set; }
moel@82
   170
    [DispId(3)]
moel@82
   171
    string UserId { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] set; }
moel@82
   172
    [DispId(4)]
moel@82
   173
    TASK_LOGON_TYPE LogonType { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] set; }
moel@82
   174
    [DispId(5)]
moel@82
   175
    string GroupId { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] set; }
moel@82
   176
    [DispId(6)]
moel@82
   177
    TASK_RUNLEVEL RunLevel { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] set; }
moel@82
   178
  }
moel@82
   179
moel@82
   180
  [ComImport, DefaultMember("Path"), Guid("9C86F320-DEE3-4DD1-B972-A303F26B061E"), TypeLibType((short)0x10c0), ComConversionLoss]
moel@82
   181
  public interface IRegisteredTask {
moel@82
   182
    [DispId(1)]
moel@82
   183
    string Name { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; }
moel@82
   184
    [DispId(0)]
moel@82
   185
    string Path { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }
moel@82
   186
    [DispId(2)]
moel@82
   187
    TASK_STATE State { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] get; }
moel@82
   188
    [DispId(3)]
moel@82
   189
    bool Enabled { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] get; [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] set; }
moel@82
   190
    [DispId(8)]
moel@82
   191
    DateTime LastRunTime { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(8)] get; }
moel@82
   192
    [DispId(9)]
moel@82
   193
    int LastTaskResult { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(9)] get; }
moel@82
   194
    [DispId(11)]
moel@82
   195
    int NumberOfMissedRuns { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] get; }
moel@82
   196
    [DispId(12)]
moel@82
   197
    DateTime NextRunTime { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] get; }
moel@82
   198
    [DispId(13)]
moel@82
   199
    ITaskDefinition Definition { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(13)] get; }
moel@82
   200
    [DispId(14)]
moel@82
   201
    string Xml { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(14)] get; }
moel@82
   202
    [return: MarshalAs(UnmanagedType.BStr)]
moel@82
   203
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(15)]
moel@82
   204
    string GetSecurityDescriptor([In] int securityInformation);
moel@82
   205
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x10)]
moel@82
   206
    void SetSecurityDescriptor([In, MarshalAs(UnmanagedType.BStr)] string sddl, [In] int flags);
moel@82
   207
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x11)]
moel@82
   208
    void Stop([In] int flags);
moel@82
   209
  }
moel@82
   210
moel@82
   211
  [ComImport, TypeLibType((short)0x10c0), Guid("86627EB4-42A7-41E4-A4D9-AC33A72F2D52")]
moel@82
   212
  public interface IRegisteredTaskCollection : IEnumerable {
moel@82
   213
    [DispId(0x60020000)]
moel@82
   214
    int Count { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; }
moel@82
   215
    [DispId(0)]
moel@82
   216
    IRegisteredTask this[object index] { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }
moel@82
   217
  }
moel@82
   218
moel@82
   219
  [ComImport, Guid("416D8B73-CB41-4EA1-805C-9BE9A5AC4A74"), TypeLibType((short)0x10c0)]
moel@82
   220
  public interface IRegistrationInfo {
moel@82
   221
    [DispId(1)]
moel@82
   222
    string Description { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] set; }
moel@82
   223
    [DispId(2)]
moel@82
   224
    string Author { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] set; }
moel@82
   225
    [DispId(4)]
moel@82
   226
    string Version { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] set; }
moel@82
   227
    [DispId(5)]
moel@82
   228
    string Date { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] set; }
moel@82
   229
    [DispId(6)]
moel@82
   230
    string Documentation { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] set; }
moel@82
   231
    [DispId(9)]
moel@82
   232
    string XmlText { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(9)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(9)] set; }
moel@82
   233
    [DispId(10)]
moel@82
   234
    string URI { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(10)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(10)] set; }
moel@82
   235
    [DispId(11)]
moel@82
   236
    object SecurityDescriptor { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] get; [param: In, MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] set; }
moel@82
   237
    [DispId(12)]
moel@82
   238
    string Source { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] set; }
moel@82
   239
  }
moel@82
   240
moel@82
   241
  [ComImport, TypeLibType((short)0x10c0), Guid("F5BC8FC5-536D-4F77-B852-FBC1356FDEB6")]
moel@82
   242
  public interface ITaskDefinition {
moel@82
   243
    [DispId(1)]
moel@82
   244
    IRegistrationInfo RegistrationInfo { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; [param: In, MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] set; }
moel@82
   245
    [DispId(2)]
moel@82
   246
    ITriggerCollection Triggers { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] get; [param: In, MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] set; }
moel@82
   247
    [DispId(7)]
moel@82
   248
    ITaskSettings Settings { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] get; [param: In, MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] set; }
moel@82
   249
    [DispId(11)]
moel@82
   250
    string Data { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] set; }
moel@82
   251
    [DispId(12)]
moel@82
   252
    IPrincipal Principal { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] get; [param: In, MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] set; }
moel@82
   253
    [DispId(13)]
moel@82
   254
    IActionCollection Actions { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(13)] get; [param: In, MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(13)] set; }
moel@82
   255
    [DispId(14)]
moel@82
   256
    string XmlText { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(14)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(14)] set; }
moel@82
   257
  }
moel@82
   258
moel@82
   259
  [ComImport, DefaultMember("Path"), Guid("8CFAC062-A080-4C15-9A88-AA7C2AF80DFC"), TypeLibType((short)0x10c0)]
moel@82
   260
  public interface ITaskFolder {
moel@82
   261
    [DispId(1)]
moel@82
   262
    string Name { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; }
moel@82
   263
    [DispId(0)]
moel@82
   264
    string Path { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }
moel@82
   265
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   266
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)]
moel@82
   267
    ITaskFolder GetFolder([MarshalAs(UnmanagedType.BStr)] string Path);
moel@82
   268
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   269
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)]
moel@82
   270
    ITaskFolderCollection GetFolders([In] int flags);
moel@82
   271
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   272
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)]
moel@82
   273
    ITaskFolder CreateFolder([In, MarshalAs(UnmanagedType.BStr)] string subFolderName, [In, Optional, MarshalAs(UnmanagedType.Struct)] object sddl);
moel@82
   274
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)]
moel@82
   275
    void DeleteFolder([MarshalAs(UnmanagedType.BStr)] string subFolderName, [In] int flags);
moel@82
   276
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   277
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)]
moel@82
   278
    IRegisteredTask GetTask([In, MarshalAs(UnmanagedType.BStr)] string Path);
moel@82
   279
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   280
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(8)]
moel@82
   281
    IRegisteredTaskCollection GetTasks([In] int flags);
moel@82
   282
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(9)]
moel@82
   283
    void DeleteTask([In, MarshalAs(UnmanagedType.BStr)] string Name, [In] int flags);
moel@82
   284
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   285
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(10)]
moel@82
   286
    IRegisteredTask RegisterTask([In, MarshalAs(UnmanagedType.BStr)] string Path, [In, MarshalAs(UnmanagedType.BStr)] string XmlText, [In] int flags, [In, MarshalAs(UnmanagedType.Struct)] object UserId, [In, MarshalAs(UnmanagedType.Struct)] object password, [In] TASK_LOGON_TYPE LogonType, [In, Optional, MarshalAs(UnmanagedType.Struct)] object sddl);
moel@82
   287
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   288
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)]
moel@82
   289
    IRegisteredTask RegisterTaskDefinition([In, MarshalAs(UnmanagedType.BStr)] string Path, [In, MarshalAs(UnmanagedType.Interface)] ITaskDefinition pDefinition, [In] int flags, [In, MarshalAs(UnmanagedType.Struct)] object UserId, [In, MarshalAs(UnmanagedType.Struct)] object password, [In] TASK_LOGON_TYPE LogonType, [In, Optional, MarshalAs(UnmanagedType.Struct)] object sddl);
moel@82
   290
    [return: MarshalAs(UnmanagedType.BStr)]
moel@82
   291
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)]
moel@82
   292
    string GetSecurityDescriptor(int securityInformation);
moel@82
   293
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(13)]
moel@82
   294
    void SetSecurityDescriptor([In, MarshalAs(UnmanagedType.BStr)] string sddl, [In] int flags);
moel@82
   295
  }
moel@82
   296
moel@82
   297
  [ComImport, TypeLibType((short)0x10c0), Guid("79184A66-8664-423F-97F1-637356A5D812")]
moel@82
   298
  public interface ITaskFolderCollection : IEnumerable {
moel@82
   299
    [DispId(0x60020000)]
moel@82
   300
    int Count { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; }
moel@82
   301
    [DispId(0)]
moel@82
   302
    ITaskFolder this[object index] { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }
moel@82
   303
  }
moel@82
   304
moel@82
   305
  [ComImport, TypeLibType((short)0x10c0), DefaultMember("TargetServer"), Guid("2FABA4C7-4DA9-4013-9697-20CC3FD40F85")]
moel@82
   306
  public interface ITaskService {
moel@82
   307
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   308
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)]
moel@82
   309
    ITaskFolder GetFolder([In, MarshalAs(UnmanagedType.BStr)] string Path);
moel@82
   310
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   311
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)]
moel@82
   312
    ITaskDefinition NewTask([In] uint flags);
moel@82
   313
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)]
moel@82
   314
    void Connect([In, Optional, MarshalAs(UnmanagedType.Struct)] object serverName, [In, Optional, MarshalAs(UnmanagedType.Struct)] object user, [In, Optional, MarshalAs(UnmanagedType.Struct)] object domain, [In, Optional, MarshalAs(UnmanagedType.Struct)] object password);
moel@82
   315
    [DispId(5)]
moel@82
   316
    bool Connected { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] get; }
moel@82
   317
    [DispId(0)]
moel@82
   318
    string TargetServer { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }
moel@82
   319
    [DispId(6)]
moel@82
   320
    string ConnectedUser { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] get; }
moel@82
   321
    [DispId(7)]
moel@82
   322
    string ConnectedDomain { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] get; }
moel@82
   323
    [DispId(8)]
moel@82
   324
    uint HighestVersion { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(8)] get; }
moel@82
   325
  }
moel@82
   326
moel@82
   327
  [ComImport, TypeLibType((short)0x10c0), Guid("8FD4711D-2D02-4C8C-87E3-EFF699DE127E")]
moel@82
   328
  public interface ITaskSettings {
moel@82
   329
    [DispId(3)]
moel@82
   330
    bool AllowDemandStart { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] set; }
moel@82
   331
    [DispId(4)]
moel@82
   332
    string RestartInterval { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] set; }
moel@82
   333
    [DispId(5)]
moel@82
   334
    int RestartCount { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] set; }
moel@82
   335
    [DispId(6)]
moel@82
   336
    TASK_INSTANCES_POLICY MultipleInstances { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] set; }
moel@82
   337
    [DispId(7)]
moel@82
   338
    bool StopIfGoingOnBatteries { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] set; }
moel@82
   339
    [DispId(8)]
moel@82
   340
    bool DisallowStartIfOnBatteries { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(8)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(8)] set; }
moel@82
   341
    [DispId(9)]
moel@82
   342
    bool AllowHardTerminate { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(9)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(9)] set; }
moel@82
   343
    [DispId(10)]
moel@82
   344
    bool StartWhenAvailable { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(10)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(10)] set; }
moel@82
   345
    [DispId(11)]
moel@82
   346
    string XmlText { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(11)] set; }
moel@82
   347
    [DispId(12)]
moel@82
   348
    bool RunOnlyIfNetworkAvailable { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(12)] set; }
moel@82
   349
    [DispId(13)]
moel@82
   350
    string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(13)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(13)] set; }
moel@82
   351
    [DispId(14)]
moel@82
   352
    bool Enabled { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(14)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(14)] set; }
moel@82
   353
    [DispId(15)]
moel@82
   354
    string DeleteExpiredTaskAfter { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(15)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(15)] set; }
moel@82
   355
    [DispId(0x10)]
moel@82
   356
    int Priority { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x10)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x10)] set; }
moel@82
   357
    [DispId(0x12)]
moel@82
   358
    bool Hidden { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x12)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x12)] set; }
moel@82
   359
    [DispId(20)]
moel@82
   360
    bool RunOnlyIfIdle { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(20)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(20)] set; }
moel@82
   361
    [DispId(0x15)]
moel@82
   362
    bool WakeToRun { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x15)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x15)] set; }
moel@82
   363
  }
moel@82
   364
moel@82
   365
  [ComImport, TypeLibType((short)0x10c0), Guid("09941815-EA89-4B5B-89E0-2A773801FAC3")]
moel@82
   366
  public interface ITrigger {
moel@82
   367
    [DispId(1)]
moel@82
   368
    TASK_TRIGGER_TYPE2 Type { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; }
moel@82
   369
    [DispId(2)]
moel@82
   370
    string Id { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] set; }
moel@82
   371
    [DispId(4)]
moel@82
   372
    string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] set; }
moel@82
   373
    [DispId(5)]
moel@82
   374
    string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] set; }
moel@82
   375
    [DispId(6)]
moel@82
   376
    string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] set; }
moel@82
   377
    [DispId(7)]
moel@82
   378
    bool Enabled { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] set; }
moel@82
   379
  }
moel@82
   380
moel@82
   381
  [ComImport, TypeLibType((short)0x10c0), Guid("85DF5081-1B24-4F32-878A-D9D14DF4CB77")]
moel@82
   382
  public interface ITriggerCollection : IEnumerable {
moel@82
   383
    [DispId(1)]
moel@82
   384
    int Count { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] get; }
moel@82
   385
    [DispId(0)]
moel@82
   386
    ITrigger this[int index] { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }
moel@82
   387
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   388
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)]
moel@82
   389
    ITrigger Create([In] TASK_TRIGGER_TYPE2 Type);
moel@82
   390
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)]
moel@82
   391
    void Remove([In, MarshalAs(UnmanagedType.Struct)] object index);
moel@82
   392
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)]
moel@82
   393
    void Clear();
moel@82
   394
  }
moel@82
   395
moel@82
   396
  [ComImport, CoClass(typeof(TaskSchedulerClass)), Guid("2FABA4C7-4DA9-4013-9697-20CC3FD40F85")]
moel@82
   397
  public interface TaskScheduler : ITaskService {
moel@82
   398
  }
moel@82
   399
moel@82
   400
  [ComImport, ClassInterface((short)0), DefaultMember("TargetServer"), Guid("0F87369F-A4E5-4CFC-BD3E-73E6154572DD"), TypeLibType((short)2)]
moel@82
   401
  public class TaskSchedulerClass : ITaskService, TaskScheduler {
moel@82
   402
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)]
moel@82
   403
    public virtual extern void Connect([In, Optional, MarshalAs(UnmanagedType.Struct)] object serverName, [In, Optional, MarshalAs(UnmanagedType.Struct)] object user, [In, Optional, MarshalAs(UnmanagedType.Struct)] object domain, [In, Optional, MarshalAs(UnmanagedType.Struct)] object password);
moel@82
   404
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   405
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)]
moel@82
   406
    public virtual extern ITaskFolder GetFolder([In, MarshalAs(UnmanagedType.BStr)] string Path);
moel@82
   407
    [return: MarshalAs(UnmanagedType.Interface)]
moel@82
   408
    [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)]
moel@82
   409
    public virtual extern ITaskDefinition NewTask([In] uint flags);
moel@82
   410
    [DispId(5)]
moel@82
   411
    public virtual extern bool Connected { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] get; }
moel@82
   412
    [DispId(7)]
moel@82
   413
    public virtual extern string ConnectedDomain { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] get; }
moel@82
   414
    [DispId(6)]
moel@82
   415
    public virtual extern string ConnectedUser { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] get; }
moel@82
   416
    [DispId(8)]
moel@82
   417
    public virtual extern uint HighestVersion { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(8)] get; }
moel@82
   418
    [DispId(0)]
moel@82
   419
    public virtual extern string TargetServer { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }
moel@82
   420
  }
moel@82
   421
}
moel@82
   422
moel@82
   423