>The error occurs when it reached the lnStatus = Logger_FileUpload(@lcFileStruc, @lcData) part
>
Just out of curiousity, did you ever try appending a NULL character to the end of your data buffer? Maybe it expects a null terminator in the last position - I can't imagine why since you have to pass it a filelength, but it's worth a SWAG.
>John.
>
>>>How do I find out?
>>>
>>
>>I can't see anything; it looks like the code should be correct. It's actually blowing yp at the point that you are doing the DECLARE...DLL; the only thing I can suggest is to try using the FOXTOOLS RegFn() and CallFn() routines to see if they handle it any better, or write a wrapper in VB.