[Guid("a6b952f0-a4b1-11d0-997d-00aa006887ec"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IScheduledWorkItem
{
int CreateTrigger( out ushort iTrigger,
[MarshalAs(UnmanagedType.IUnknown)] out object trigger);
int DeleteTrigger( ushort iTrigger);
int GetTriggerCount( out ushort iTriggerCount);
int GetTrigger( ushort iTrigger,
[MarshalAs(UnmanagedType.IUnknown)] out object trigger);
int GetTriggerString( ushort iTrigger,
[MarshalAs(UnmanagedType.LPWStr)] out string trigger);
int GetRunTimes( ref SYSTEMTIME pstBegin,
ref SYSTEMTIME pstEnd,
out ushort count,
out SYSTEMTIME rgstTaskTimes);
int GetNextRunTime( ref SYSTEMTIME pstNextRun);
int SetIdleWait( ushort wIdleMinutes,
ushort wDeadlineMinutes);
int GetIdleWait( out ushort wIdleMinutes,
out ushort wDeadlineMinutes);
int Run();
int Terminate( );
int EditWorkItem( IntPtr hParent,
uint dwReserved);
int GetMostRecentRunTime( out SYSTEMTIME pstLastRun);
int GetStatus( out uint hrStatus); //uses SCHED_S_TASK_XXX values
int GetExitCode( out uint dwExitCode);
int SetComment( [MarshalAs(UnmanagedType.LPWStr)] string Comment);
int GetComment( [MarshalAs(UnmanagedType.LPWStr)] out string Comment);
int SetCreator( [MarshalAs(UnmanagedType.LPWStr)] string Creator);
int GetCreator( [MarshalAs(UnmanagedType.LPWStr)] out string Creator);
int SetWorkItemData( ushort cbData, Byte[] rgbData);
int GetWorkItemData( out ushort cbData,out Byte[] rgbData);
int SetErrorRetryCount( ushort wRetryCount);
int GetErrorRetryCount( out ushort wRetryCount);
int SetErrorRetryInterval( ushort wRetryInterval);
int GetErrorRetryInterval( out ushort wRetryInterval);
int SetFlags( uint dwFlags); // uses TASK_FLAGS
int GetFlags(out uint dwFlags); // uses TASK_FLAGS
int SetAccountInformation( [MarshalAs(UnmanagedType.LPWStr)] string AccountName,
[MarshalAs(UnmanagedType.LPWStr)] string PassUInt16);
int GetAccountInformation( [MarshalAs(UnmanagedType.LPWStr)] out string AccountName);
};
[Flags]
public enum TASK_FLAGS
{
TASK_FLAG_INTERACTIVE = 0x1,
TASK_FLAG_DELETE_WHEN_DONE = 0x2,
TASK_FLAG_DISABLED = 0x4,
TASK_FLAG_START_ONLY_IF_IDLE = 0x10,
TASK_FLAG_KILL_ON_IDLE_END = 0x20,
TASK_FLAG_DONT_START_IF_ON_BATTERIES = 0x40,
TASK_FLAG_KILL_IF_GOING_ON_BATTERIES = 0x80,
TASK_FLAG_RUN_ONLY_IF_DOCKED = 0x100,
TASK_FLAG_HIDDEN = 0x200,
TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET = 0x400,
TASK_FLAG_RESTART_ON_IDLE_RESUME = 0x800,
TASK_FLAG_SYSTEM_REQUIRED = 0x1000,
TASK_FLAG_RUN_ONLY_IF_LOGGED_ON = 0x2000,
}
<ComImport> _
<Guid("TODO")> _
'TODO: Insert <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ if this doesn't derive from IDispatch
Interface IScheduledWorkItem
TODO
End Interface
None.
None.