Visual SourceSafe (VSS) Remote Access Tool Recommended by Microsoft

ISAWVSDK::ConnectToServer

Description

Connects to Dynamsoft SourceAnywhere for VSS remote server or cache server.

Syntax

Long ConnectToServer(
        String ServerIP,
        Long ServerPort,
        Boolean ConnectedToServer,
        Enum_EncryptType EncryptType,
        Boolean OnlyTrial,
        Long LeftTrialDays,
        Boolean* Canceled,
        String* ResultDescription,
        Enum_ProxyType ProxyType,
        String ProxyIP,
        Long ProxyPort,
        String UserName,
        String Password
);

Parameters

ServerIP
[in] Specifies the IP or name of Dynamsoft SourceAnywhere for VSS server or cache server.

ServerPort
[in] Specifies the port of Dynamsoft SourceAnywhere for VSS server or cache server.

ConnectedToServer
[out] Returns whether client is connected to server or cache sever.

EncryptType
[out] Returns the type of the encryption.

OnlyTrial
[out] Returns whether the software is a trial version.

LeftTrialDays
[out] Returns in how many days the trial version will expire.

Canceled
[out] If the method fails, returns whether the operation is canceled.

ResultDecription
[out] Returns the description of the result. If the operation succeeds, returns 'Completed'. If the operation fails, returns the error information.

ProxyType
[in] Specifies the type of the proxy server (if proxy is used).

ProxyIP
[in] Specifies the IP or name of proxy server (if proxy is used).

ProxyPort
[in] Specifies the port of proxy server (if proxy is used).

UserName
[in] Specifies the username if the proxy requires authentication (if proxy is used).

Password
[in] Specifies the password if the proxy requires authentication (if proxy is used).

Return Value

If the method succeeds, returns the value of ESAWV_SUCCESS. If the method fails, returns other error codes.

See Also

Sample

VB Sample:

Dim WithEvents SdkObject As SAWVSDKLib.SAWVSDK 

Set SdkObject = new SAWVSDKLib.SAWVSDK

Private Sub ConnectAndLogin_Click()

	Dim ResultValue As Long

	Dim EncryptType As Enum_EncryptType
	Dim OnlyTrial As Boolean
	Dim LeftTrialDays As Long
	Dim Canceled As Boolean
	Dim ResultDescription As String
	Dim ConnectedToServer As Boolean

	'Start to establish the connection to server
	ResultValue = SdkObject.ConnectToServer("127.0.0.1", 8877, ConnectedToServer, EncryptType, OnlyTrial, LeftTrialDays, Canceled, ResultDescription, Enum_NOPROXY, "", 0, "", "")
	If ResultValue = 0 Then
	    Dim MustChangePassword As Boolean
	    Dim ExpireDays As Long
	    Dim KeyInfoSet As New SAWVKeyInfoSet
	    KeyInfoSet.Add "c:\path\admin.sek" 'If data is transferred through Blowfish encryption, you should add the Blowfish key to be imported
    
	    ResultValue = SdkObject.Login("admin", "", "SAWVDatabaseName", KeyInfoSet, MustChangePassword, ExpireDays, Canceled, ResultDescription)

	    If ResultValue = 0 Then
        	MsgBox ("Logged on the server successfully.")
	    Else
        	MsgBox ("Failed to log on.")
	    End If

	Else
    		MsgBox ("Failed to connect to server.")
	End If

End Sub












SourceSafe (VSS) Remote/Web/Internet Access | Software Configuration Management | SCM Solution
Software Configuration Management Online | Source/Version Control Online | Version/Source Control Software
Copyright 2010 Dynamsoft Corporation. All Rights Reserved.