How to check in a file using SCM Anywhere Hosted SDK?

In this article, we take a VB project as example.

1. Install SCM Anywhere Hosted Client on your machine. SCM Anywhere Hosted Windows Client comes with the COM SDK .

2. Please add the following 2 dll files, "SCMSSDK.dll" and "SCMS.Core.dll", to the project. In Visual Studio, click menu Project | Add Reference | Browse, browse to the SCM Anywhere Standalone Client installation folder, highlight and select "SCMHSDK.dll" and "SCMS.Core.dll", and click OK.

3. You can use the ConnectToServer() function to connect to your SCM Anywhere Hosted account, 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 sdkObj As New SCMHSDK()
    Dim bobjTrial As New
    Dim iobjLeftTrialDays As New
    Dim iobjLeftPasswordDays As New
    Dim strobjError As New
    Dim ResultValue As Long

    Dim listItemOperateResults As New 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

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        'connect to server
        ResultValue = sdkObj.ConnectToServer(100000, False, "admin", "password", 0, "", 0, "", "", bobjTrial, iobjLeftTrialDays, iobjLeftPasswordDays, strobjError)
        If ResultValue <> 0 Then
            MsgBox("Successfully connected to server")
        End If

        'Check in files
        ResultValue = sdkObj.CheckInFiles("Default", listFilesFullNameToCheckIn, False, False, "", listIssueID, True, 2, listItemOperateResults, bConflictExists, strobjError)

        If ResultValue <> 0 Then
            MsgBox("Successfully check in")
        End If

    End Sub
End Class

Is this page helpful?

Leave a Reply

Your email address will not be published.