> >DECLARE INTEGER Logger_FileUpload IN c:\windows\system\taglogger.dll STRING @ Tagloggerfile, STRING @DataBlock > >cUploadFileName = "TEST.TXT" >cDataBlock = "This is a test text for the dll file" > >SET LIBRARY TO "d:\vfp projects2\vfp base\clsheap.prg" ADDITIVE > >cTaggerLogFileStruc = PADR(ALLTRIM(cUploadFileName),13,chr(0)) + NumToLong(LEN(cDataBlock)) >nResult = Logger_FileUpload(@cTaggerLogFileStruc,@cDataBlock) >MESSAGEBOX(nResult) > >>
>>> >>>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 >>>>>
DECLARE INTEGER Logger_FileUpload IN TagLogger.DLL STRING @ Tagloggerfile, STRING @ DataBlock>>
cTaggerLogFileStruc = PADR(ALLTRIM(cUploadFileName),13,chr(0)) + NumToLong(LEN(cDataBlock)) >>nResult = Logger_FileUpload(@cTaggerLogFileStruc,cDataBlock)>>
>>>
>>>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)EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater
NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC
The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys