| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curlpp mailing list Archives
[cURLpp] Problems downloading binary files to memory
From: Nazario Cipriani <NazarioCipriani_at_web.de>
Date: Thu, 21 Apr 2005 14:42:00 +0200
Hi ALL!
I've got a real problem but can't figure out what the problem is.
Basically I want to download a binary file from a remote site.
This is my class to "store" the result of the action and my callback function:
class WriterMemoryClass
// Cast the void* data pointer to WriterMemoryClass...
// (Re)Allocate memory for the buffer
// Test if Buffer is initialized correctly & copy memory
// return the real size of the buffer...
// Public member vars
Now the following situation.
// Set the writer callback to enable cURL to write result in a memory area
// The class (WriterMemoryClass) passed to out callback function which holds our data received from the server
All ok so far...
When I step in the callback function ("WriteMemoryCallback") the following situation is given:
"size" is 1.
But "ptr" has only a length of 5 (!!!) which is not right since the "nmemb" gives me the real count (??).
Now my question is, what am I doing wrong? Perhaps I've forgotten to set an option?
Hoping to hear from you soon :-)
Thank you in advance!
Kind regards,
-- Die DUMMHEIT drängt sich vor, um gesehen zu werden; die Klugheit steht zurück, um zu sehen. 'Carmen Sylva' ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 _______________________________________________ cURLpp mailing list cURLpp_at_rrette.com http://www.rrette.com/mailman/listinfo/curlppReceived on 2005-04-21 These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info