Declare Function Logger_FileDownload Lib "Taglogger.dll" (ByRef filename As TagloggerFile, ByVal data As String) As LongHere is the VB code.
Private Sub cmdFileDownload_Click() Dim status As Long Dim filename As String Dim file As TagloggerFile Dim data As String * 50000 Dim k As Integer filename = InputBox("Which file do you want to download ?", "", "DLLTEST.TXT") If filename = "" Then Exit Sub If Len(filename) > 12 Then MsgBox "Filename too long!", vbCritical Else ' Convert string to array of bytes padded with nullbytes For k = 1 To 13 If k <= Len(filename) Then file.filename(k) = Asc(Mid(filename, k, 1)) MsgBox (VarType(file.filename(k))) Else file.filename(k) = 0 End If Next status = Logger_FileDownload(file, data) If status = 1 Then txtOut = "Contents of " & filename & " (" & Str(file.filelength) & " bytes ):" & _ vbCrLf & vbCrLf & Left(data, file.filelength) Else MsgBox "Logger_Reset returned error-code " & Str(status), vbExclamation End If End If End SubCan anyone give me some ideas of how to convert this.