ReactOS 0.4.15-dev-7918-g2a2556c
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}
#define InterlockedIncrement
Definition: armddk.h:53
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
static const IPersistFileVtbl MSTASK_IPersistFileVtbl
Definition: task.c:743
static const ITaskVtbl MSTASK_ITaskVtbl
Definition: task.c:695
GLdouble n
Definition: glext.h:7729
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
LONG dll_ref
Definition: mstask_main.c:31
#define TRACE(s)
Definition: solgame.cpp:4
Definition: task.c:25
__wchar_t WCHAR
Definition: xmlstorage.h:180

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

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));
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}
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:286
static const ITaskTriggerVtbl MSTASK_ITaskTriggerVtbl
Definition: task_trigger.c:267
__u16 time
Definition: mkdosfs.c:8
#define memset(x, y, z)
Definition: compat.h:39

Referenced by MSTASK_ITask_CreateTrigger().

Variable Documentation

◆ DECLSPEC_HIDDEN

ClassFactoryImpl MSTASK_ClassFactory DECLSPEC_HIDDEN
extern

Definition at line 35 of file mstask_private.h.