[KMTESTS]

- In fact... don't use WriteConsole at all, as it doesn't allow redirection to a file.

svn path=/branches/GSoC_2011/KMTestSuite/; revision=53176
This commit is contained in:
Thomas Faber 2011-08-11 08:59:34 +00:00
parent b65e65ac17
commit c0f4b0d56c

View file

@ -221,7 +221,8 @@ OutputResult(
DWORD BytesWritten;
DWORD LogBufferLength;
DWORD Offset = 0;
/* WriteConsole seems to handle at most ~32kB */
/* A console window can't handle a single
* huge block of data, so split it up */
const DWORD BlockSize = 8 * 1024;
KmtFinishTest(TestName);
@ -230,7 +231,7 @@ OutputResult(
for (Offset = 0; Offset < LogBufferLength; Offset += BlockSize)
{
DWORD Length = min(LogBufferLength - Offset, BlockSize);
if (!WriteConsoleA(GetStdHandle(STD_OUTPUT_HANDLE), ResultBuffer->LogBuffer + Offset, Length, &BytesWritten, NULL))
if (!WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), ResultBuffer->LogBuffer + Offset, Length, &BytesWritten, NULL))
error(Error);
}