In this article, we take a VB project as example.
1. Install SCM Anywhere Standalone Client on your machine. The COM SDK comes with SCM Anywhere Standalone Windows Client.
2. Please add 2 dll files, "SCMSSDK.dll" and "SCMS.Core.dll", to the project. In Visual Studio | Project | Add Reference | Browse tab, browse to the SCM Anywhere Standalone Client installation folder, highlight and select "SCMSSDK.dll" and "SCMS.Core.dll", and click OK.
3. You can use the ConnectToServer() function to connect to your SCM Anywhere Standalone Server, and then use the CheckInFiles() function to check in the files.
Here is a sample in VB:
-----------------------------
Imports com.dynamsoft.scm.SCMSDK
Public Class Form1
Dim sdkObject As New SCMSSDK()
Dim bobjTrial As New com.dynamsoft.scm.client.pub.common.basedataobjects.BoolObject
Dim iobjLeftTrialDays As New com.dynamsoft.scm.client.pub.common.basedataobjects.IntObject
Dim iobjLeftPasswordDays As New com.dynamsoft.scm.client.pub.common.basedataobjects.IntObject
Dim strobjError As New com.dynamsoft.scm.client.pub.common.basedataobjects.StringObject
Dim ResultValue As Long
Dim listItemOperateResults As New System.Collections.Generic.List(Of com.dynamsoft.scm.SCMSDK.Framework.SDKItemOperatorResult)
Dim listFilesFullNameToCheckIn As New List(Of String)
Dim listIssueID As New List(Of Long)
Dim bConflictExists As New com.dynamsoft.scm.client.pub.common.basedataobjects.BoolObject()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'connect to server
ResultValue = sdkObject.ConnectToServer("127.0.0.1", 7771, False, "admin", "", 0, "", 0, "", "", bobjTrial, iobjLeftTrialDays, iobjLeftPasswordDays, strobjError)
If ResultValue <> 0 Then
MsgBox("Failed to connect to server. " + strobjError.GetValue())
Else
MsgBox("Succeed in connecting to server.")
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'check in
listFilesFullNameToCheckIn.Add("$/branch/1.txt")
ResultValue = sdkObject.CheckInFiles("Default", listFilesFullNameToCheckIn, False, False, "check in a file", listIssueID, True, 2, listItemOperateResults, bConflictExists, strobjError)
If ResultValue <> 0 Then
MsgBox("Failed to check in. " + strobjError.GetValue())
Else
MsgBox("Succeed in checking in.")
End If
End Sub
End Class
