The SchRpcGetTaskInfo method MUST return information about a specified task.

 HRESULT SchRpcGetTaskInfo(
   [in, string] const wchar_t* path,
   [in] DWORD flags,
   [out] DWORD* pEnabled,
   [out] DWORD* pState
 );

path: MUST contain the full path to a task using the format specified in section 2.3.11.

flags: The flags field 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

F S

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

Value

Description

FS

SCH_FLAG_STATE

If set to 1, the server MUST retrieve the TASK_STATE.

Undefined bits. MUST be set to zero when sent and MUST be ignored on receipt.

pEnabled: MUST be a pointer to a Boolean that indicates whether the task is currently enabled.

pState: If non-NULL and the SCH_FLAG_STATE bit in the flags parameter is set, the server MUST return the current state of the task in the format specified in section 2.3.13. Otherwise, the server MUST ignore this parameter.

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

Upon receipt of the SchRpcGetTaskInfo call, the server MUST:

If the pEnabled parameter is non-NULL, the server MUST set the corresponding memory location to the value of the enabled/disabled flag in the task store.