The following code illustrates how to obtain a result from the job object using the login operation as an example.
// Log in to a Parallels 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 );