cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: help on the sample???

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 2 Feb 2001 08:15:35 +0100 (MET)

On Thu, 1 Feb 2001 pit_at_paradise.net.nz wrote:

> Modified for Windows from the sample code.
>
> I used copy of win32_init() and win32_cleanup to load/free winsock.dll.
> Also copied 'write_data()' from the second example.

This is C++ code, right?

Won't you need a 'extern "C" { }' around the write_data() function? Otherwise
will your compile make that function a C++ function that will expect to get a
'this' pointer somewhere that libcurl certainly won't pass on to you.

> After the execution "dumpit.out" contains correct headerfile but i keep
> getting '23' for returned value of 'res'.

To get some more info what's going on, you can pass an error buffer to the
library and then you could get a human readable error string. You can also
set the CURLOPT_VERBOSE option to TRUE and get some extra output that might
give you some hints about what's going on.

If nothing else works, single-step in through the library with a debugger and
see where it returns the error code and then find out why.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-02-02