cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FTP Upload problem : crash

From: Wei Weng <wweng_at_kencast.com>
Date: Mon, 22 Nov 2004 11:34:50 -0500

Daniel Stenberg wrote:
> On Sat, 20 Nov 2004 joseph.tilley_at_atxinc.com wrote:
>
>> Any advice at all as to what I may be doing wrone here would be
>> GREATLY appreciated!
>
>
> You must provide a CURLOPT_READFUNCTION that reads a chunk from the file
> and returns it to libcurl.
>
> libcurl cannot use the FILE * you pass to it since in Windows, a DLL
> cannot use that pointer passed on to it from an app. It will cause an
> exception.
>
> I believe this is stated several places in the docs.
>
Are you saying that the only way (if you want to do it through a file stream
) is to wrap the FILE* inside some other structure then pass the pointer to
that structure along to the libcurl DLL?

Thanks

Wei
Received on 2004-11-22