Collapse All
Parallels C API Reference Guide
PrlSrv_ProxyLogin Function
PrlApi.h PHT_SERVER See Also

Performs a remote proxy login operation using the specified parameters.

Syntax
PRL_HANDLE PrlSrv_ProxyLogin(
    PRL_HANDLE hServer, 
    PRL_CONST_STR user, 
    PRL_CONST_STR passwd, 
    PRL_CONST_STR sPrevSessionUuid, 
    PRL_UINT32 timeout, 
    PRL_SECURITY_LEVEL security_level, 
    const PRL_PROXY_HOST_INFO_PTR hostInfo
);
File
Parameters

hServer
A handle of type PHT_SERVER identifying the Parallels Service.
user
User name (a UTF-8 encoded, null-terminated string).
passwd
Password (a UTF-8 encoded, null-terminated string).
sPrevSessionUuid
Previous session ID. This is an optional parameter that can be used in recovering from a lost Parallels Service connection. The ID will be used to restore references to the tasks that were initiated in the previous session and are still running inside the Parallels Service. You can pass a null or an empty string value if you are not restoring any references. See PrlSrv_AttachToLostTask for more information.
timeout
Timeout value in milliseconds. The operation will be automatically interrupted if a connection is not established within this timeframe. Specify 0 (zero) for infinite timeout.
security_level
Communication security level to use for this connection. The security level set here will be used for all communications with the Parallels Service for the duration of this session. The minimum allowable security level can be determined using the PrlDispCfg_GetMinSecurityLevel function.
hostInfo
Proxy host information to which we want to connect.
flags
A bitset of flags. Allowed next values:

0 - no flags. It's behaviour by default ( as PrlSrv_ProxyLogin() )

PACF_NON_INTERACTIVE_MODE
to use non-interactive mode. In interactive mode, a client may receive questions from the Parallels Service, which it is expected to answer in order for the operation to continue. In non-interactive mode, the Parallels Service will make decisions on its own.
Returns

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.

Remarks

A remote proxy login operation logs the user to a Parallels Service running on a remote host through proxy server. You can also use this function to log to a local host or you can use the PrlSrv_LoginLocal function, which is a simplified version created specifically to perform local host logins.

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:

  1. Use the PrlJob_GetResult function to obtain a handle to the PHT_RESULT object.
  2. Use the PrlResult_GetParam function to obtain a handle of type PHT_LOGIN_RESPONSE .
See Also
Links
Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved.
What do you think about this topic? Send feedback!