This sounds just like the Unix email truncation bug that was fixed
not
long ago. I wonder if the same logic error was made in the
Windows-specific code. Here is the way I produced the error:
Thanks for the input.
I played with that and couldn't find a way to fix the problem.
Strangely, I could fix the problem on this specific case by changing
something very nt specific: the last argument of CreatePipe() is the
size of the buffer used for the pipe. If it is left to 0, then the
system allocates what it wants. I changed that for 8192 and the problem
vanished. I tried it again with various sizes of data.
I know that it doesn't mean at all it is a fix. But it shows how this
problem is sensitive to the data and the platform involved.
Fabrice