cURL / Mailing Lists / curl-library / Single Mail


Sample sepheader.c ?

From: Arthur Hung <>
Date: Fri, 12 May 2006 21:51:37 +0800

    My program is compiled at Visual Studio .Net 2003 on Windows XP. It runs
well in sample.c ( But it has
error when running sepheader.c (get HTTP with headers separate). It compiles
successfully. But when it runs, it meets error "Unhandled exception at
0x7c938fea in MyProgram.exe: 0xC0000005: Access violation writing location
0x00000010." I tried to debug. When it steps to:
  /* get it! */
then error message pops up. I choose break. The program stops and the cursor
stops at
        /* Try to get a big buffer */
--> if (stream->_base = _malloc_crt(_INTERNAL_BUFSIZ)) //cursor stops
at here
                /* Got a big buffer */
                stream->_flag |= _IOMYBUF;
                stream->_bufsiz = _INTERNAL_BUFSIZ;
I do not change anything in the sample code sepheader.c. But it runs error.
Does everyone know what may be wrong in my case? Thanks a lot.
Received on 2006-05-12