How to check out 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, "SCMHSDK.dll" and "SCMH.Core.dll", to the project. In Visual Studio, click menu Project | Add Reference | Browse, browse to the SCM Anywhere Hosted Client installation folder, highlight and select "SCMHSDK.dll" and "SCMH.Core.dll", and click OK.

3. You can use the ConnectToServer() function to connect to your SCM Anywhere Hosted account, and then use the CheckoutFiles() function to check out 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 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 listCheckoutServerFileFullName As New List(Of String)
    Dim listCheckoutLocalFileFullName As New List(Of String)
    Dim stDiffMergeParameter As New com.dynamsoft.scm.SCMSDK.Framework.SDKDiffMergeParameter
    Dim listItemOperateResults As New List(Of com.dynamsoft.scm.SCMSDK.Framework.SDKItemOperatorResult)

    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(strobjError.GetValue())
        Else
            MsgBox("Successful")
        End If

        'check out files
        listCheckoutServerFileFullName.Add("$/1.txt")
        listCheckoutServerFileFullName.Add("$/test1/web.config")
        listCheckoutLocalFileFullName.Add("c:\anttest\1.txt")
        listCheckoutLocalFileFullName.Add("c:\anttest\web.config")

        ResultValue = sdkObj.CheckoutFiles("Default", listCheckoutServerFileFullName, listCheckoutLocalFileFullName, "", False, 3, 0, 1, 3, stDiffMergeParameter, listItemOperateResults, strobjError)
        If ResultValue <> 0 Then
            MsgBox(strobjError.GetValue())
        Else
            MsgBox("Successful")
        End If

    End Sub
End Class