Virtuozzo Virtualization SDK C API Reference
The PrlSrv_AttachToLostTask function allows to obtain a handle to a running task after the connection to the Virtuozzo Service was lost.
If you've started a long asynchronous operation and then lost a connection with the Virtuozzo Service, you may use this function to get a handle to the task after reconnecting to the Virtuozzo Service. In order to do that, log in to the Virtuozzo Service using the PrlSrv_Login or the PrlSrv_LoginLocal function passing the UUID of the session that you've lost. The returned PHT_LOGIN_RESPONSE object will contain the list of the tasks that belong to the lost session and are still running. Select a task that you want to get a handle to and pass its ID to the PrlSrv_AttachToLostTask function. The function will return a handle of type PHT_JOB which you may use to continue controlling and monitoring the task as usual.
PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed.
PRL_ERR_SUCCESS - function completed successfully.