22.214.171.124.5.6 Retrieve a Task's Information
To retrieve a task's information, the client MUST first know the path of the task. The path of the task is determined when the client creates the task or queries the server (section 126.96.36.199.6).
The client MUST then invoke the SchRpcGetTaskInfo with the following parameters:
The path of the existing task in the path parameter.
SCH_FLAG_STATE in the flags parameter to retrieve the state (or 0 if the state is not required).
The location of a BOOL to receive the task's enabled state in the pEnabled parameter.
The location of a DWORD to receive the task state (or 0) in the pState parameter.