cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem using libcurl with Visual Studio

From: Giuliano Ippoliti <ippo80_at_yahoo.com>
Date: Tue, 21 Oct 2003 01:00:49 -0700 (PDT)

Thank you very much Daniel: the problem was exactly
that!
Now I have introduced:
size_t my_read_func(void *ptr, size_t size, size_t
nmemb, FILE *stream)
{
  return fread(ptr, size, nmemb, stream);
}
and:
curl_easy_setopt(curl, CURLOPT_READFUNCTION,
my_read_func);
and everything is fine.
Thank you again,
Giuliano

--- Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 20 Oct 2003, Giuliano Ippoliti wrote:
>
> > < 200 Representation type is binary IMAGE.
> > > STOR while.txt
> > < 150 Sending file to member TXT in file WHILE in
> > library VISITEUR.
> >
> > And now I obtain a "0xC0000005 Access violation"!
> Using the DOS prompt to
> > upload the file with the standard commands I have
> no problem, so I suppose
> > that the problem is in the code.
>
> I think you've provided READDATA to the library
> without a READFUNCTION. In
> Windows, you can't pass a struct/pointer from your
> application and have the
> library read from it.
>
> This is noted in the man page and if you don't do as
> documented, you get
> access violations.
>
> It might of course also be something entirelly
> different, you don't give us
> many details to allow us any further analysis.
>
> --
> Daniel Stenberg -- curl: been grokking URLs since
> 1998
>
>
>
-------------------------------------------------------
> This SF.net email is sponsored by OSDN developer
> relations
> Here's your chance to show off your extensive
> product knowledge
> We want to know what you know. Tell us and you have
> a chance to win $100
>
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
>

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
Received on 2003-10-21