[KERNEL32][CONSRV]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 8 Aug 2014 17:06:28 +0000 (17:06 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 8 Aug 2014 17:06:28 +0000 (17:06 +0000)
commit636d4cf0ce318eccc10befbb244877455e96a73c
tree8a432a36ff3c4031a6af93f90b72ad9e49047931
parent277e3473c4be350dbf19571dcd2eecf3e0cfc34e
[KERNEL32][CONSRV]
For WriteConsoleOutput API only!! Diagnosed with ApiMonitor from Rohitab.

If one tries to write a too large buffer (>= 80*198 CHAR_INFO cells), the CsrAllocateCaptureBuffer API helper fails, because it uses the non-growable CSR port heap of fixed size 64kB.
Since many applications use the API with large buffers (for example, Far Manager <= 1.70, the Windows XTree app http://textmode.netne.net/Extreme.html , ...) and maybe NTVDM,
Windows (and hence ReactOS for compatibility reasons) allocates a buffer in the process' heap (and not in the CSR port heap via the CSR capture API), so that the big buffer allocation
should work. Then, to be able to access it, CSR needs to call NtReadVirtualMemory for capturing the buffer.

CORE-5006 CORE-6397 CORE-8424 #resolve

svn path=/branches/condrv_restructure/; revision=63841
dll/win32/kernel32/client/console/readwrite.c
include/reactos/subsys/win/conmsg.h
win32ss/user/winsrv/consrv/conoutput.c