Sub SMBInit(cred As SMBCred)
smbClient.Initialize("SMBClient",cred.Domain,cred.Username,cred.Password,cred.Share)
smbClient.GetResourcefromUrl("smb://192.168.192.168/GeoTIFs/")
wait for SMBClient_Resource(success As Boolean, smbobjres As Object,smbobj As Object, info As String)
Log($"writetest-SMBClient_Resource(${success},${info},${smbobjres},${smbobj})"$)
If smbobjres <> Null And smbobj <> Null And info = "OK" Then
Dim smbResource As SMBResource = smbobjres
Dim sfile As SMBFile = smbobj
File.WriteString(File.DirInternal, "1.txt", "Some text")
smbClient.Copy2(File.DirInternal,"1.txt",sfile,"textfile2.txt")
wait for SMBClient_CopyResult(success As Boolean, path As String, filename As String)
Log($"SMBClient_CopyResult(${success}, textfile2.txt written to ${sfile.UncPath})"$)
End If
End Sub
Sub SMBClient_ResourceAvailable(smbResource As Object)
Log($"SMBClient_ResourceAvailable(${smbResource})"$)
End Sub
Sub SMBClient_CopyProgress(totalBytes As Long, path As String, filename As String)
Log($"SMBClient_CopyProgress(${totalBytes} : ${path}:${filename})"$)
End Sub