cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_WRITEFUNCTION

From: Cris D Putnam <cdputnam_at_us.ibm.com>
Date: Wed, 4 May 2005 12:59:56 -0400

I am trying to put the HTML code into memory in a C++ class. I am copying
the general idea of getinmemory.c . But my program crashes with this
error:

Run-Time Check Failure #0 - The value of ESP was not properly saved across
a function call. This is usually a result of calling a function declared
with one calling convention with a function pointer declared with a
different calling convention.

On these line of code:
/ send all data to this function
    curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION,
WriteMemoryCallback);
 
 
When called alone this->WriteMemoryCallback does not crash the program...
   So I have narrowed it down to CURLOPT_WRITEFUNCTION
This line is just fine in a main mehod, but when I put it within a
function of a .cpp class I guess the calling convention is different? How
can I fix this?

Thank You

Cris D. Putnam
Received on 2005-05-04