3.1.4.3.5.3 Retrieve a Running Task's Instance Information

To retrieve a running task's Instance Information the client MUST know the identifier of the particular running instance. The identifier of the particular running instance is obtained when running the task explicitly (section 3.1.4.2.8.1) and when enumerating running instances (section 3.1.4.3.6.3).

Next, the client MUST invoke the SchRpcGetInstanceInfo method with the following parameters:

  • The identifier of the running instance in the guid parameter.

  • The location of a buffer to receive the path (or NULL) in the pPath parameter.

  • The location of a buffer to receive the TASK_STATE (or NULL) in the pState parameter.

  • The location of a buffer to receive the name of the current action (or NULL) in the pCurrentAction parameter.

  • Zero in the pInfo parameter.

  • Zero in the pcGroupInstances parameter.

  • Zero in the pGroupInstances parameter.

  • The location of a buffer to receive the Process ID of the process executing the task (or NULL) in the pEnginePid parameter.

The client MUST deallocate the pPath and pCurrentAction after successful execution of the method, as specified in section 5.1.1.1 of [C706].