cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Saving html's to disk

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 17 Oct 2005 00:01:47 +0200 (CEST)

On Sun, 16 Oct 2005, Michael Swan wrote:

> I can't see where the error is below. It crashes when it tries to save the
> data to the file I gave it. Is this the right way to do it ?

You're using Windows and libcurl as a DLL, right?

> curl_easy_setopt(curl, CURLOPT_WRITEDATA,f);
> curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION , NULL);

If you are, then this is a lethal combo. You cannot pass a FILE * for the DLL
to use. You must either link statically or write a write funtion callback that
does the actual saving.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-10-17