curl-library
Re: ftpupload.c example
Date: Wed, 20 Feb 2008 05:23:58 +0100
Hi Regie,
> Hi Guenter, good day I finally compiled it with no error but the problem
> is that when I make it run it crashes again but I can see the log that I
> connected to my ftp server, and when I checked my uploaded file I can see
> it in my server but it is corrupted means 0byte. Please have time to look
> at the screen shot. here's the link
> ftp://123.45.67.89/public/rgie/ftpupload_screen.JPG
> again thanks a lot, you're my only hope
well, at first glance it worked for me since I used MingW32 and liked statically;
but when I tried with MSVC and linked against DLL I could reproduce the crash.
After that I've read the source - HINT! - and found this:
/* NOTE: if you want this example to work on Windows with libcurl as a
DLL, you MUST also provide a read callback with
CURLOPT_READFUNCTION. Failing to do so will give you a crash since a
DLL may not use the variable's memory when passed in to it from an app
like this. */
Such comments are probably good for something! So I'd suggest that you implement that;
for a sample how to do that look f.e. at httpput.c ...
And then please report back that it works, and provide a patch for ftpupload.c
which adds the callback!
Please take care that you also post to the list - I currently dont know why the heck
mailman doesnt convert my reply address....
Guenter.
Received on 2008-02-20