cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Fwd: Often error 23

From: Marco A. Cruz Quevedo <macruzq_at_gmail.com>
Date: Wed, 18 Dec 2013 13:17:36 -0600

Thank you very much for your suggestion. The fact is that, in order to
use CURLOPT_WRITEFUNCTION, I cannot find a way to pass a pointer to a
function ( as documentation indicates) from visual FoxPro, so I have to
use the internal default function. And here is the first problem:
documentation indicates to set the option to NULL: is it chr(0) or "" (null
string)?
Then, to use CURLOPT_WRITEDATA I have to pass a FILE * to filename (or file
object? or what?) I think this solves the problem: first, using the default
function and next, providing a file for output. But, how can this be set?
So, I tried:

--
    err_buff = "error"+" buffer"
    curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION,"")
    curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, err_buff)
--
Finally this works: the file is transmitted, but nevertheless I get an
error indicating that an exception occurred.
I only want to set this options to get rid of error 23.
I appreciate your help.
Best regards,
Marco
---
On Wed, Dec 18, 2013 at 12:55 PM, Dan Fandrich <dan_at_coneharvesters.com>wrote:
> On Wed, Dec 18, 2013 at 10:55:43AM -0600, Marco A. Cruz Quevedo wrote:
> > How do I set a file to receive any output as result of
> curl_easy_perform()
> > function?
>
> Did you try my suggestion in my reply? Did it work?
>
> >>> Dan
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
-- 
Freedom is not a permission for chaos

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-18