Give Us a Call: +1-877-99-BOPUP

IServerClientVB::OpenSession method

Establishes connection and initializes a new session with the IM server. All subsequent calls of other methods of the IServerClientVB interface must be made after successful call of this function.

Public Sub OpenSession(     ByRef Authentication As Byte,     ByRef AccountName As String,     ByRef Password As String,     ByRef Domain As String,     ByRef BrandingImageFileName As String,     ByRef BrandingImageURL As String,     ByRef BrandingName As String,     ByRef ConfigurationFileName As String,     ByRef ResultCode As UInteger )

Parameters

Authentication
[in] Specifies the authentication mode used to establish connection with the IM server. This parameter can be one of the following values:
VBAuthenticationMode.Simple
Indicates a Simple authentication mode which only matches Windows user's login with the account name on the IM server. No any other authentication is performed.
VBAuthenticationMode.Windows
Uses Windows Authentication that is based on built-in functionality in Windows.
VBAuthenticationMode.Password
Indicates authentication using private login and password.
AccountName
[in] String variable that contains user's account name. This parameter cannot be empty string.
Password
[in] String variable that contains user's password. This parameter must be used if the Authentication variable is set to VBAuthenticationMode.Password value, can be also used if Authentication is set to VBAuthenticationMode.Windows (see Remarks) and must be empty string in all other cases.
Domain
[in] String variable that contains name of Windows domain. This parameter must be empty string except some cases if the IM client does not use a transparent authorization via Windows Authentication when Authentication is set to VBAuthenticationMode.Windows and Password is also used (see Remarks).
BrandingImageFileName
[in] String variable that contains a full path to the logo image file that will be created and filled by the logo uploaded on the IM server. This parameter can be empty string.
BrandingImageURL
[out] String variable that receives an URL associated with the logo image file on the IM server. This parameter can be empty string.
BrandingName
[out] String variable that receives a brand name from the IM server. This parameter can be empty string.
ConfigurationFileName
[in] String variable that contains a full path to existing configuration ini file that should be matched and downloaded from IM server if required. This parameter is not used in this version of SDK and must be empty string.
ResultCode
[out] Variable of UInteger type that gets an extended code if error result is returned. For available codes see Available Extended Codes topic.

Return Value

S_OK
The function was successful.
E_INVALIDARG
One or more arguments are incorrect.
E_FAIL
Some error occurred in the function. Check ResultCode variable to get extended information on the error.

Remarks

The IM client uses transparent authentication via Windows Authentication if Authentication variable is set to VBAuthenticationMode.Windows. This means that both Password and Domain parameters must be empty strings in order to use credentials of current user logged into Windows domain network. But the client can perform Windows Authentication using different credentials, for example if the user wants to authorize with the IM server outside the Windows domain network, from home PC, etc. In those cases both Password and Domain parameters must be used.