The SchRpcEnumTasks method MUST return the list of tasks in a specific folder.

MUST returns S_FALSE if there are more tasks to enumerate.

Note that if client requests items 1-10 and then 11-20, the second call can return duplicate entries if the task list has changed in between calls.

 HRESULT SchRpcEnumTasks(
   [in, string] const wchar_t* path,
   [in] DWORD flags,
   [in, out] DWORD* startIndex,
   [in] DWORD cRequested,
   [out] DWORD* pcNames,
   [out, string, size_is(, *pcNames)] 
     TASK_NAMES* pNames
 );

path: MUST contain the full path associated with a folder as specified in section 2.3.11.

flags: The flags parameter MUST contain individual bit flags that MUST have one or more of the following values:


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

H

Value

Description

H

TASK_ENUM_HIDDEN

If set to 1, the server MUST include hidden tasks in the enumeration, otherwise the server MUST exclude hidden tasks from the enumeration.

startIndex: MUST contain the index at which to start enumeration. If the server returns S_FALSE, the server MUST update startIndex to contain the index at which the enumeration MUST resume.

cRequested: MUST contain the number of entries requested. The server MUST NOT return more than cRequested entries.

pcNames: The server MUST set pcNames to equal the number of enumerated tasks returned in the pNames parameter.

pNames: Buffer that MUST contain returned task names.

Return Values: For more information on return codes, see section 2.3.14, or Win32 Error Codes in [MS-ERREF] section 2.1.

Upon receipt of the SchRpcEnumTasks call, the server MUST: