cURL / Mailing Lists / curl-library / Single Mail

curl-library

getinmemory.c sample crashes with TCHAR

From: Itamar Syn-Hershko <itamar_at_divrei-tora.com>
Date: Sun, 12 Nov 2006 18:40:43 +0200

Hi,
 
I have been trying to download a file to a memory buffer, based on the
sample code provided in the libcurl package - getinmemory.c. It all works
fine for binaries and non-Unicode strings, but once I make the memory chunk
to be of type TCHAR (wchar_t in my application, which is unicode enabled),
it just crashes with AV under WriteMemoryCallback.
 
Without changing it to be TCHAR, I see no way of downloading Unicode text
files and reading/parsing them on the fly. Please let me know if there is a
way, or how to fix that AV described above.
 
Thanks in advance,
 
Itamar.
Received on 2006-11-12