Re: [xml] xmlOutputBufferCreateFile VS2015 I/O error : Bad file descriptor


xmlOutputBufferPtr output = xmlOutputBufferCreateFilename("C:\\myfolder\testdata.xml", 0, 0);

what can be wrong with xmlOutputBufferCreateFile?

Best regards,

On Sat, Apr 16, 2016 at 10:23 AM, Sylvain Pointeau <sylvain pointeau gmail com> wrote:

porting my program on windows, I noticed that xmlOutputBufferCreateFile raised a message  I/O error : Bad file descriptor. Below is the sample program that crashes for me:

FILE *f = fopen("C:\\myfolder\testdata.xml", "w");

xmlOutputBufferPtr output = xmlOutputBufferCreateFile(f, NULL);

xmlOutputBufferWriteString(output, "WHY DO YOU CRASH?");

xmlOutputBufferClose(output); <- at this moment it displays I/O error : Bad file descriptor


I linked on libs pre-compiled for win32,
I also tried with the lib I compiled myself, it even crashes in this case (it does not display IO error)

Please note that the parsing (SAX) runs well.

Do you have any idea? is it a bug or something I am not doing well?

Best regards,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]