Commit graph

30 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 73a66663c8 Sync to trunk revision 63922.
svn path=/branches/condrv_restructure/; revision=63923
2014-08-23 15:51:37 +00:00
Hermès Bélusca-Maïto 21b5377d35 [KERNEL32]
OpenConsoleW was implemented :P

[CONSOLE.CPL][CONSRV]
Create all the fonts needed at console startup, and then just select what's needed when fonts attributes need to be changed at run-time.

[CONSOLE.CPL][CONSRV]
- HACKFIX: Temporary use FW_NORMAL instead of FW_DONTCARE as default font weight (in ReactOS, FW_DONTCARE makes fonts bold by default, instead of normal)
- Use bold fonts instead of the underlined ones for underlined fonts in the terminal.

Timo, FIX THE FONTS !!!!!!!!!! :P

CORE-8439 #comment Should be fixed in revision 63885.

svn path=/branches/condrv_restructure/; revision=63885
2014-08-14 20:10:00 +00:00
Hermès Bélusca-Maïto de799f57dc Sync to trunk revision 63875.
svn path=/branches/condrv_restructure/; revision=63876
2014-08-12 18:49:17 +00:00
Hermès Bélusca-Maïto e5b5525a8a Sync to trunk revision 63857.
svn path=/branches/condrv_restructure/; revision=63858
2014-08-10 21:33:21 +00:00
Hermès Bélusca-Maïto cc85bc57af [KERNEL32][CONSRV]: Implement a basic RegisterConsoleVDM (see revision 62371 for more details).
svn path=/branches/condrv_restructure/; revision=63849
2014-08-09 19:47:40 +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 277e3473c4 Sync with trunk r63831.
svn path=/branches/condrv_restructure/; revision=63832
2014-08-07 12:54:03 +00:00
Hermès Bélusca-Maïto 7a1f204af1 [KERNEL32][CONSRV]
- Fix FreeConsole API.
- Implement undocumented GetConsoleKeyboardLayoutNameA/W API (same usage as GetKeyboardLayoutName), needed for ConEmu.
  See some examples here: http://www.opensource.apple.com/source/vim/vim-44/src/os_win32.c , and there: 700bab23f2/lswitch.c

CORE-7931 #comment ConsolepFree fixed in revision 63820.

svn path=/branches/condrv_restructure/; revision=63820
2014-08-06 21:01:23 +00:00
Hermès Bélusca-Maïto 04934ee092 [KENREL32]: Silent few DPRINTs.
svn path=/branches/condrv_restructure/; revision=63818
2014-08-06 20:30:24 +00:00
Hermès Bélusca-Maïto 549abbaf91 [KERNEL32]: Remove some FASTCALL.
svn path=/branches/condrv_restructure/; revision=63807
2014-08-04 20:25:34 +00:00
Hermès Bélusca-Maïto e3a5ed0e2b [KERNEL32][CONSRV]
Fix few MSVC dword -> short warnings (basically). Thanks GCC for not having noticed them...

svn path=/branches/condrv_restructure/; revision=63804
2014-08-04 17:13:43 +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 43ee1612b1 [KERNEL32]
Hack buffer protection check for pInputControl and lpBuffer user buffers.

svn path=/branches/condrv_restructure/; revision=63795
2014-08-01 19:03:50 +00:00
Hermès Bélusca-Maïto bf136052c0 Sync with trunk r63793.
svn path=/branches/condrv_restructure/; revision=63794
2014-08-01 18:39:52 +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 d06d5833ea [KERNEL32]
- It is supposed that user buffers are valid, and if not, access to them is protected with SEH. This fixes almost all of the kernel32_winetest:console tests.
- Add parameter annotations.

svn path=/branches/condrv_restructure/; revision=63772
2014-07-29 15:59:17 +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 e9c7111b66 [KERNEL32][CONSRV]
- Make kernel32 / winsrv console CSR structures Win2k3-compliant for Read/WriteConsoleInput functions.
- Really fix some ASSERTS from r63108.

Part 6/X

CORE-7931

svn path=/branches/condrv_restructure/; revision=63754
2014-07-28 21:20:36 +00:00
Hermès Bélusca-Maïto dd733c2951 [KERNEL32]
- No need to use another NTSTATUS variable, since all of the information is already contained in ApiMessage.Status.
- Do not hardcode the type of the request variables in the sizeofs used in the CsrClientCallServer calls.

svn path=/branches/condrv_restructure/; revision=63753
2014-07-28 13:37:54 +00:00
Hermès Bélusca-Maïto b06a89c070 [KERNEL32][CONSRV]
Make kernel32 / winsrv console CSR structures Win2k3-compliant.

- Fix UNICODE and ANSI versions of the Alias and History APIs. Tested with unicode and ansi version of our doskey.exe
- Implement GetNumberOfConsoleMouseButtons.

Part 5/X

CORE-7931

svn path=/branches/condrv_restructure/; revision=63751
2014-07-28 13:20:54 +00:00
Hermès Bélusca-Maïto 9ed2e0b5bc Sync with trunk r63743.
svn path=/branches/condrv_restructure/; revision=63744
2014-07-27 20:52:13 +00:00
Hermès Bélusca-Maïto 8a3822c4ea Sync with trunk r63647.
svn path=/branches/condrv_restructure/; revision=63648
2014-06-27 18:05:20 +00:00
Hermès Bélusca-Maïto e4155c95c7 Sync with trunk r63383 .
svn path=/branches/condrv_restructure/; revision=63384
2014-05-20 17:04:19 +00:00
Hermès Bélusca-Maïto 07b314c140 Sync with trunk r63283
svn path=/branches/condrv_restructure/; revision=63285
2014-05-13 22:15:21 +00:00
Hermès Bélusca-Maïto d639063cc3 [KERNEL32]
No need to precalculate the string lengths before calling the helper functions. They can do it instead.

svn path=/branches/condrv_restructure/; revision=63198
2014-05-08 22:24:38 +00:00
Hermès Bélusca-Maïto c26bc793ac [KERNEL32][CONSRV]
Make kernel32 / winsrv console CSR structures Win2k3-compliant.
The aim is to be able to put our kernel32.dll or winsrv.dll on win2k3, and vice-versa.

- Fix almost all the alias APIs and the history APIs. Unicode versions is OK, ANSI ones need correct fixes in server-side (see CORE-7931 for more details).
- Half-plement SetConsoleCommandHistoryMode (client-side OK, server-side unimplemented).

Part 4/X

CORE-7931

svn path=/branches/condrv_restructure/; revision=63194
2014-05-08 18:08:07 +00:00
Hermès Bélusca-Maïto 7a0c3bde06 Sync with trunk r63192.
svn path=/branches/condrv_restructure/; revision=63193
2014-05-08 14:40:52 +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