Allows to log in to the local Parallels Service (the Parallels Service running on this host) using the current user credentials.
PRL_HANDLE PrlSrv_LoginLocal( PRL_HANDLE hServer, PRL_CONST_STR sPrevSessionUuid, PRL_UINT32 port, PRL_SECURITY_LEVEL security_level );
PrlApiDisp.h
0 - no flags. It's behaviour by default ( as PrlSrv_LoginLocal() )
A handle of type PHT_JOB containing the results of this asynchronous operation, including the return code and a handle of type PHT_LOGIN_RESPONSE, containing an additional Parallels Service information.
PRL_INVALID_HANDLE if there's not enough memory to instantiate the job object.
When performing a local login operation, no password/username is needed. The authentication and authorization will be performed using the current user account.
To get the return code from the PHT_JOB object, use the PrlJob_GetRetCode function. Possible values are:
PRL_ERR_INVALID_ARG - invalid handle was passed.
PRL_ERR_SUCCESS - function completed successfully.
To get the results from the PHT_JOB object:
The following example illustrates how to log in to locally running Parallels Service and to obtain a handle of type PHT_LOGIN_RESPONSE.
// Log in. hJob = PrlSrv_LoginLocal( hServer, NULL, 0, PSL_LOW_SECURITY ); PrlJob_Wait( hJob, 10000 ); // Get the results of the login operation. PrlJob_GetResult( hJob, &hJobResult ); PrlHandle_Free( hJob ); // Get the PHT_LOGIN_RESPONSE handle from the job result. PRL_HANDLE hHandle; PrlResult_GetParam( hJobResult, &hHandle );