ITaskFolder::GetTasks method

Gets all the tasks in the folder.

Syntax


HRESULT GetTasks(
  [in]   LONG flags,
  [out]  IRegisteredTaskCollection ppTasks
);

Parameters

flags [in]

Specifies whether to retrieve hidden tasks. Pass in TASK_ENUM_HIDDEN to retrieve all tasks in the folder including hidden tasks, and pass in 0 to retrieve all the tasks in the folder excluding the hidden tasks.

ppTasks [out]

An IRegisteredTaskCollection collection of all the tasks in the folder.

Pass in a reference to a NULL IRegisteredTaskCollection interface pointer. Referencing a non-NULL pointer can cause a memory leak because the pointer will be overwritten.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

Task Scheduler
ITaskFolder

 

 

Community Additions

ADD
Show:
© 2014 Microsoft