Visual SourceSafe (VSS) Remote Access Tool Recommended by Microsoft

ISAWVSDK::Login

Description

Logs in the VSS database.

Syntax

Long Login(
        String UserName,
        String Password,
        String DatabaseName,
        ISAWVKeyInfoSet KeyInfoSet,
        Boolean* MustChangePassword,
        Long* ExpireDays,
        Boolean* Canceled,
        String* ResultDescription
);

Parameters

UserName
[in] Specifies the login username.

Password
[in] Specifies the login password.

DatabaseName
[in] Specifies the alias of the VSS database you want to log in.

KeyInfoSet
[in] Specifies the name information set of user keys to be imported, if you access to the Blowfish secure port of the server.

MustChangePassword
[out] Returns whether the password must be changed at each login.

ExpireDays
[out] Returns in how many days the password expires.

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

ResultDecription
[out] Returns the description of the return value. If the method succeeds, returns 'Completed'. If the method fails, returns the description of the error.

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

	'If client needs to connect to server through SSL port, you should specify the path of the Root Certificate
	Dim CAInfo As New SAWVCAInfo
	CAInfo.CAFileName = "c:\path\ca.crt"
	Dim CAInfoSet As New SAWVCAInfoSet
	CAInfoSet.Add CAInfo'Add the root certificate to the manage set object

	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, CAInfoSet, 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 user keys 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.