The whole stderr handling is a fix from pierre who found out that output stalls on windows as soon as the error pipe reaches 10MB (and possibly less than that in terminal service connections). So he added code to drain stderr too, but it drains now to a local variable.
Anyway, the idea is to make the core loop of intruncommand a method of TProcess so you can easier make variants without changing tprocess.