ReactOS  0.4.14-dev-376-gaedba84
mstask_private.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mstask.h"
Include dependency graph for mstask_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define COBJMACROS
 

Typedefs

typedef struct ClassFactoryImpl ClassFactoryImpl
 

Functions

HRESULT TaskTriggerConstructor (LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT TaskSchedulerConstructor (LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT TaskConstructor (LPCWSTR pwszTaskName, LPVOID *ppObj) DECLSPEC_HIDDEN
 

Variables

LONG dll_ref DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file mstask_private.h.

Typedef Documentation

◆ ClassFactoryImpl

Definition at line 34 of file mstask_private.h.

Function Documentation

◆ TaskConstructor()

HRESULT TaskConstructor ( LPCWSTR  pwszTaskName,
LPVOID ppObj 
)

Definition at line 756 of file task.c.

757 {
758  TaskImpl *This;
759  int n;
760 
761  TRACE("(%s, %p)\n", debugstr_w(pwszTaskName), ppObj);
762 
763  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
764  if (!This)
765  return E_OUTOFMEMORY;
766 
767  This->ITask_iface.lpVtbl = &MSTASK_ITaskVtbl;
768  This->IPersistFile_iface.lpVtbl = &MSTASK_IPersistFileVtbl;
769  This->ref = 1;
770  n = (lstrlenW(pwszTaskName) + 1) * sizeof(WCHAR);
771  This->taskName = HeapAlloc(GetProcessHeap(), 0, n);
772  if (!This->taskName)
773  {
775  return E_OUTOFMEMORY;
776  }
777  lstrcpyW(This->taskName, pwszTaskName);
778  This->applicationName = NULL;
779  This->parameters = NULL;
780  This->comment = NULL;
781  This->accountName = NULL;
782 
783  /* Default time is 3 days = 259200000 ms */
784  This->maxRunTime = 259200000;
785 
786  *ppObj = &This->ITask_iface;
788  return S_OK;
789 }
GLdouble n
Definition: glext.h:7729
#define lstrlenW
Definition: compat.h:415
static const ITaskVtbl MSTASK_ITaskVtbl
Definition: task.c:695
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG dll_ref
Definition: mstask_main.c:31
#define S_OK
Definition: intsafe.h:59
#define InterlockedIncrement
Definition: armddk.h:53
#define lstrcpyW
Definition: compat.h:414
Definition: task.c:24
static const IPersistFileVtbl MSTASK_IPersistFileVtbl
Definition: task.c:743
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by MSTASK_ITaskScheduler_NewWorkItem().

◆ TaskSchedulerConstructor()

HRESULT TaskSchedulerConstructor ( LPVOID ppObj)

Definition at line 338 of file task_scheduler.c.

339 {
341  TRACE("(%p)\n", ppObj);
342 
343  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
344  if (!This)
345  return E_OUTOFMEMORY;
346 
347  This->ITaskScheduler_iface.lpVtbl = &MSTASK_ITaskSchedulerVtbl;
348  This->ref = 1;
349 
350  *ppObj = &This->ITaskScheduler_iface;
352  return S_OK;
353 }
static const ITaskSchedulerVtbl MSTASK_ITaskSchedulerVtbl
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG dll_ref
Definition: mstask_main.c:31
#define S_OK
Definition: intsafe.h:59
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by MSTASK_IClassFactory_CreateInstance().

◆ TaskTriggerConstructor()

HRESULT TaskTriggerConstructor ( LPVOID ppObj)

Definition at line 277 of file task_trigger.c.

278 {
281  TRACE("(%p)\n", ppObj);
282 
283  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
284  if (!This)
285  return E_OUTOFMEMORY;
286 
287  This->ITaskTrigger_iface.lpVtbl = &MSTASK_ITaskTriggerVtbl;
288  This->ref = 1;
289 
290  /* Most fields of triggerCond default to zero. Initialize other
291  * fields to default values. */
292  memset(&This->triggerCond, 0, sizeof(TASK_TRIGGER));
293  GetLocalTime(&time);
294  This->triggerCond.cbTriggerSize = sizeof(This->triggerCond);
295  This->triggerCond.wBeginYear = time.wYear;
296  This->triggerCond.wBeginMonth = time.wMonth;
297  This->triggerCond.wBeginDay = time.wDay;
298  This->triggerCond.wStartHour = time.wHour;
299  This->triggerCond.wStartMinute = time.wMinute;
300  This->triggerCond.rgFlags = TASK_TRIGGER_FLAG_DISABLED;
301  This->triggerCond.TriggerType = TASK_TIME_TRIGGER_DAILY,
302  This->triggerCond.Type.Daily.DaysInterval = 1;
303 
304  *ppObj = &This->ITaskTrigger_iface;
306  return S_OK;
307 }
__u16 time
Definition: mkdosfs.c:366
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const ITaskTriggerVtbl MSTASK_ITaskTriggerVtbl
Definition: task_trigger.c:267
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:276
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG dll_ref
Definition: mstask_main.c:31
#define S_OK
Definition: intsafe.h:59
#define InterlockedIncrement
Definition: armddk.h:53
#define memset(x, y, z)
Definition: compat.h:39

Referenced by MSTASK_ITask_CreateTrigger().

Variable Documentation

◆ DECLSPEC_HIDDEN

Definition at line 35 of file mstask_private.h.