Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

ITaskScheduler (Interfaces)
 
.
Summary
Part of the Task Scheduler 1.0 Interfaces, which consists of IEnumWorkItems, ITask, ITaskScheduler, ITaskTrigger and IScheduledWorkItem. There is some helper code below. Not all methods have been tested, so be careful!

C# Definition:

    [Guid("148BD527-A2AB-11CE-B11F-00AA00530503"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface ITaskScheduler
    {
    int SetTargetComputer(  [MarshalAs(UnmanagedType.LPWStr)]   string      computer);
    int GetTargetComputer(  [MarshalAs(UnmanagedType.LPWStr)]   out string  computer);
    int Enum(           [MarshalAs(UnmanagedType.IUnknown)] out object  enumworkitems);
    int Activate(       [MarshalAs(UnmanagedType.LPWStr)]   string      name,
                                    ref Guid    riid,
                [MarshalAs(UnmanagedType.IUnknown)] out object  obj);
    int Delete(         [MarshalAs(UnmanagedType.LPWStr)]   string      name);
    int NewWorkItem(    [MarshalAs(UnmanagedType.LPWStr)]   string      name,
                                    ref Guid    rclsid,
                                    ref Guid    riid,
                [MarshalAs(UnmanagedType.IUnknown)] out object  obj);
    int AddWorkItem(    [MarshalAs(UnmanagedType.LPWStr)]   string      name,
                [MarshalAs(UnmanagedType.IUnknown)] object      obj);
    int IsOfType(       [MarshalAs(UnmanagedType.LPWStr)]   string      name,
                                    ref Guid    riid);
    };

C# Helper Code

    using System;
    using System.Runtime.InteropServices;

    static public Guid CLSID_TaskScheduler = new Guid("148BD52A-A2AB-11CE-B11F-00AA00530503");
    static public Guid CLSID_ITaskScheduler = new Guid("148BD52A-A2AB-11CE-B11F-00AA00530503");

    static public ITaskScheduler CreateTaskScheduler()
    {
    Type obj = Type.GetTypeFromCLSID(CLSID_TaskScheduler, true);
    Type obj = Type.GetTypeFromCLSID(CLSID_ITaskScheduler, true);
    return Activator.CreateInstance(obj) as ITaskScheduler;
    }

VB Definition:

<ComImport> _
<Guid("TODO")> _
'TODO: Insert <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ if this doesn't derive from IDispatch
Interface ITaskScheduler
   TODO
End Interface

User-Defined Types:

None.

Notes:

None.

Alternative managed API:

http://www.codeproject.com/KB/cs/tsnewlib.aspx

Managed wrapper library for all Task Scheduler 1.0 and 2.0 interfaces:

http://taskscheduler.codeplex.com

Documentation

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions