Obtains a handle of type PHT_RESULT containing the result returned by the job.
PRL_RESULT PrlJob_GetResult( PRL_HANDLE hJob, PRL_HANDLE_PTR handle );
PrlApiCore.h
PRL_RESULT. Possible values:
PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed.
PRL_ERR_OPERATION_PENDING - the asynchronous operation that this job refers to is still in progress.
PRL_ERR_SUCCESS - function completed successfully.
Depending on the job, the PHT_RESULT object may contain a handle, a list of handles, a string, or a list of strings. The description of each asynchronous function in this documentation contains information whether the function returns a PHT_RESULT object or not, and provides instructions on how to obtain it.
The following code illustrates how to obtain a result from the job object using the login operation as an example.
// Log in to a Virtuozzo Service. hJob = PrlSrv_LoginLocal( hServer, NULL, 0, PSL_LOW_SECURITY ); // Wait for the job to complete. PrlJob_Wait( hJob, 10000 ); // Get a handle of type PHT_RESULT containing the results // of the operation. PrlJob_GetResult( hJob, &hJobResult ); PrlHandle_Free( hJob ); // Get the PHT_LOGIN_RESPONSE handle from the job result object. PRL_HANDLE hHandle; PrlResult_GetParam( hJobResult, &hHandle );