Still at it building a home made solution, huh? <g>
printf() doesn't handle CHR(0)'s as it sees it as a string terminator. You can use File output functions to write to StdOut as well such as WriteFile() API calls to which you can pass output, or fWrite() (you have to get the handle to StdOut for that first).
You can write to StdOut from VFP using Windows API calls with CreateFile, WriteFile() and CloseHandle() ( I think ), but htis is a really bad idea as VFP is way too large to load up from scratch on every CGI hit.
+++ Rick ---
>I created a VFP 7 CGI application using vfpcgi which returs PDF files.
>
>I noticed that zero bytes (0x00) are not passed to web server.
>
>This is because mycgi.c shipped with vfp uses
>
>printf( "%s", buffer );
>
>to return data to web server . printf() stops writing if zero byte is
>reached.
>
>It is possible to fix this by changing mycgi.c file and re-creating an exe
>file.
>
>Unfortunately, I don't have Microsoft VC++ compiler required to
>create vfpcgi.exe
>
>Can anybody create a correct vfpcgi.exe file or is there correct
>vfpcgi module available somewhere ?
>
>Is it possible to read stdin and write to stdout from a VFP 7 application ?
>This will eliminate the need of using vfpcgi.