Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert from VB
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00719715
Message ID:
00720425
Views:
10
How do I find out?

I think the DLL is written in Delphi.


Here is the code from excel
Public Type TagloggerFile
  filename(1 To 13) As Byte
  filelength As Long
End Type


Declare Function Logger_FileUpload Lib "Taglogger.dll" (ByRef filename As TagloggerFile, ByVal data As String) As Long



  Dim file As TagloggerFile
  Dim data As String * 50000
  Dim filename As String
  Dim k As Integer
  Dim filedata As String
  Dim status As Long
    
    
  'Name and contents of the file to be uploaded to the Taglogger
  filename = "dlltest.txt"
  filedata = "This is a test of the Logger_FileUpload function."
  
  
  '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 (Asc(Mid(filename, k, 1)))
    Else
      file.filename(k) = 0
    End If
  Next
  
  file.filelength = Len(filedata)
  
  data = filedata
  
  status = Logger_FileUpload(file, data)

* Here is the help document.


3.7 Logger_FileUpload
int Logger_FileUpload( TAGLOGGERFILE *Filename, char *Data )
Description:
This function loads a file to the tagLogger. If a file with this
name already exists on the tagLogger, it wil automatically be
overwritten. Files are transfered at a speed of approximately
2kB/s, so it can take some time before uploading is completed
if the file is quite large.
Inputs:
FileName FileName is a pointer to a structure of the type
TAGLOGGERFILE
typedef struct
{
char name[13];
unsigned long filelength;
} TAGLOGGERFILE;
The filename will be in the MSDOS format
(“filename.ext\0”).
Data Data is a pointer to a string containing the file
data.
Outputs:
NONE
Return value:
1 OK
-3 Error, No connection with tagLogger established
-4 Error, Time-out on tagLogger request
-5 Error, Transmission error.
-6 Error, Illegal filename
Note:
The filename-format is “<name>.<ext>” where <name> should
have between 1 and 8 characters, and <ext> between 1 and 3.
The only characters allowed are A..Z, a..z and 0..9. All
lowercase characters will be automatically converted to
uppercase.
John

>>They have an example of the dll features written in EXCEL using VB code, how come VFP has some much difficulty getting it to work.
>>
>
>Are you sure it's not a COM object?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform