This API not woked on windows, because in this source code:
ft->fp =
00857 #ifdef HAVE_FMEMOPEN
00858 buffer? fmemopen(buffer, buffer_size, "w+b") :
00859 buffer_ptr? open_memstream(buffer_ptr, buffer_size_ptr) :
00860 #endif
00861 fopen(path, "w+b");
00862 if (ft->fp == NULL) {
00863 lsx_fail("can't open output file `%s': %s", path, strerror(errno));
00864 goto error;
00865 }
functions fmemopen() and open_memstream() exists only for linux.
I copypaste example5_8c and its no working
Windows doesn't have the necessary functions to allow this. There is no easy solution.