Commit graph

10 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto afd30b0e36 [CONSRV]: Continuing 2/X
svn path=/branches/condrv_restructure/; revision=63867
2014-08-11 20:39:06 +00:00
Hermès Bélusca-Maïto 636d4cf0ce [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
2014-08-08 17:06:28 +00:00
Hermès Bélusca-Maïto 9fd5cfb5f8 [KERNEL32]
Add a bunch of missing _SEH_YIELD in 'return' clues in _SEH_TRY clauses.

[KERNEL32][CONSRV]
Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleOutput functions.
The last missing ones are Alloc/Attach/FreeConsole APIs!!

Part 9/10

CORE-7931

svn path=/branches/condrv_restructure/; revision=63803
2014-08-04 16:25:12 +00:00
Hermès Bélusca-Maïto 22c9e139a1 [KERNEL32][CONSRV]
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsole functions.
  An attentive code reader will see that there are structure members in CONSOLE_WRITECONSOLE that are
  indeed unused by kernel32 that can be used in ReactOS for undocumented extensions of WriteConsole...
  (for instance, adding a parameter for ANSI codes support, who knows!... :P)
- Fix a bit the support for the CONSOLE_READCONSOLE_CONTROL parameter in ReadConsole (for unicode only).
- Use the actual exe name for command history management, given via a hackish way by ReadConsole:
  the exe name is passed via the 80-byte-length limited static buffer, and is of course retrieved before
  actually using the static buffer (if needed).

[CONSRV]
- Fix writing input events in the console, but first preprocessing them for pausing commands (we treat them separately and remove them),
  then, in case we write many single events, we merge them in case they are mouse moves or repeated key down presses. This helps in not
  overflowing too quickly the input buffer, and that fixes all the remaining kernel32:console winetests!! (see CORE-8256)
- Use the actual exe name for command history management, given via a hackish way by ReadConsole (blame MS!)

Part 8/X

CORE-7931
CORE-8256 #resolve #comment Fixed in the condrv_restructure branch in revision .

svn path=/branches/condrv_restructure/; revision=63793
2014-08-01 18:08:29 +00:00
Hermès Bélusca-Maïto 2ae25e18a8 [CONSRV]
Fix returned number of read/write codes.

svn path=/branches/condrv_restructure/; revision=63770
2014-07-29 15:54:03 +00:00
Hermès Bélusca-Maïto 4a285f0633 [CONSRV]
Add the optional "number of things read/written" parameters back.

svn path=/branches/condrv_restructure/; revision=63769
2014-07-29 14:00:46 +00:00
Hermès Bélusca-Maïto 5ce6a6c12b Simplify code.
svn path=/branches/condrv_restructure/; revision=63768
2014-07-29 13:49:03 +00:00
Hermès Bélusca-Maïto 2d9a888371 [KERNEL32][CONSRV]
- Use a CODE_ELEMENT structure in order to simplify the code.
- Do not do an on-place ansi to unicode conversion.

svn path=/branches/condrv_restructure/; revision=63766
2014-07-29 13:18:59 +00:00
Hermès Bélusca-Maïto 19e30db97b [KERNEL32][CONSRV]
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleCharacter/Attribute and FillConsoleOutputCharacter/Attribute functions.
  The underlying CONSOLE_READOUTPUTCODE and CONSOLE_WRITEOUTPUTCODE structures are the same.
  It should be noticed, as for the Read/WriteConsoleInput functions of r63754 and the other Read/WriteConsole*** functions, that for performance purposes Windows uses a local buffer for "small" sizes;
  we should do the same too because both the client and the server use the number of elements to actually read/write in order to determine which buffer one should use (local or some shared buffer).
- Some memcpy --> RtlCopyMemory.

Part 7/X

CORE-7931

svn path=/branches/condrv_restructure/; revision=63755
2014-07-29 00:00:21 +00:00
Hermès Bélusca-Maïto b819608ed8 Create a branch for console restructuration work.
svn path=/branches/condrv_restructure/; revision=63104
2014-05-02 14:13:40 +00:00
Renamed from reactos/win32ss/user/winsrv/consrv/conoutput.c (Browse further)