- Reintegrate the text-only frontend, deactivated in revision r58447.
- Use a (temporary) helper ConioIsBufferResizeSupported to know whether or not the frontend supports screenbuffer resizing. In a near future, all the frontends will support that so this function will be removed.
- Promote ConioResizeBuffer to be a function of the console server (not only reserved for the GUI frontend).
[WIN32K]
- Remove the support of registrating TUI notification window class (feature such as knowing at which console app the notification window belongs to is unneeded when using the TUI).
- Start to introduce ConsoleAcquireDisplayOwnership, a win32k console control to let win32k release the display so that we can own it (it is step 0.0.1 on a scale of 0.0.0 to 1.0.0).
Note that, as in trunk, getting a text-only interface when booting with the /CONSOLE switch still doesn't work (clash between text-mode and video-mode enabled by win32k).
svn path=/branches/ros-csrss/; revision=58732
Try to do some archaeology of names: attempt to attribute some files to programmers who spent lot of time on them, based on SVN history (I might have forget some other ones).
svn path=/branches/ros-csrss/; revision=58730
Code reorganization. Common functions declarations, shared between the console server and the frontends, are put inside a include/ subdirectory. Functions needed only for the console server are in the usual root directory. Functions used only for the frontends are in their corresponding directories in under frontends/.
svn path=/branches/ros-csrss/; revision=58717
Introduce GET_KEYSTATE_WPARAM, GET_NCHITTEST_WPARAM, GET_XBUTTON_WPARAM macros.
[CONSRV]
Fix double-click, mouse scrolling and add support for control keys.
svn path=/branches/ros-csrss/; revision=58623
- Fix passing and retrieving gui terminal front-end information.
- Fix default (global) console parameters saving.
[CONSRV]
- PSEH2-protect calls to CreateRemoteThread when 1. calling console app. control handlers and 2. retrieving console settings from console.dll.
- Introduce a new way of locking consoles when being used, and store them in a list.
svn path=/branches/ros-csrss/; revision=58615
Use a new helper function ConSrvConsoleProcessCtrlEvent to send control events to processes belonging to a given console.
svn path=/branches/ros-csrss/; revision=58556
Fix the initialization of screen buffers (concerning the cursor size).
[KERNEL32]
Fix almost all of the console winetests. Only 26 tests remain to be fixed, concerning principally WriteConsoleInputA/W and GetNumberOfConsoleInputEvents.
svn path=/branches/ros-csrss/; revision=58448
Fix the console properties dialog, when launching and transmitting console properties. Before, the properties dialog was directly launched by the console server (consrv), running with CSRSS (System) privileges, what constituted a security hole. Now, I create a remote thread in the running process owning the console for launching the properties dialog (thus it has only user privileges, and not System ones anymore). For that purpose, I basically took the technique described in the following paper (Cesar Cerrudo, "Story of a dumb patch", http://www.argeniss.com/research/MSBugPaper.pdf or http://www.scn.rain.com/~neighorn/PDF/MSBugPaper.pdf), where basically the console server shares the console properties via a shared memory section with the console properties dialog dll. The address of the thread which launches the dialog in the context of the console app is given to the console server the same way as we do for the control handler (called e.g. when you press Ctrl-C, etc...)
Of course this is quite hackish, because you have the GUI interface split between the console server and the console properties dialog dll. Something far more elegant would be to put all the GUI thingie into a dedicated dll or exe, running with the same privileges as the console program itself (a kind of console -- or terminal -- emulator).
[CONSOLE.DLL]
Fix retriving / setting colors.c and other things.
[CONSRV.DLL]
- Fix retrieving / setting console properties from the registry (via the HKCU\Console\* keys), via the shell shortcuts (not totally done at the moment, because somebody has to implement properly that thing : http://msdn.microsoft.com/en-us/library/windows/desktop/bb773359(v=vs.85).aspx (NT_CONSOLE_PROPS structure stored as a shortcut data block) (at application launching time), and via the console properties dialog.
- Few DPRINTs removed.
svn path=/branches/ros-csrss/; revision=58415
Rename functions to their new scheme: ConSrv* instead of Win32Csr* or Conio* (with some exceptions for the latter case).
No code changes.
svn path=/branches/ros-csrss/; revision=58213
- Start to implement waiting threads notifications. They can be notified by:
* the required action (screen displaying lock/unlock, presence of new characters in the input buffer),
* the fact that the application terminates,
* we close a (input) handle.
TODO: When we notify them by calling CsrNotifyWait, they are not dereferenced automatically, but they can be
by calling a dedicated CSR function. We need to know where it is the best to dereference them.
- Correct a bug introduced in revision r58191, which broke console input mode changes (in SrvSetConsoleMode and SrvGetConsoleMode).
svn path=/branches/ros-csrss/; revision=58211
- Start to uniformize some helpers' names :
ConioLockConsole --> ConioGetConsole and ConioUnlockConsole --> ConioReleaseConsole
ConioLockInputBuffer --> ConioGetInputBuffer and ConioUnlockInputBuffer --> ConioReleaseInputBuffer
ConioLockScreenBuffer --> ConioGetScreenBuffer and ConioUnlockScreenBuffer --> ConioReleaseScreenBuffer
but the overall naming must be revamped.
- Add them a boolean parameter to determine whether or not we should lock the console. It is useful to not lock an already locked console when input / output waiting threads are called,
because these are called from functions which lock the console.
- In the GUI console window message loop, after retrieving a pointer to the corresponding console, lock it before calling funtions in the message dispatcher (and unlock the console at the end).
- Use PostMessage instead of SendMessage for "sending" GUI messages to console windows, to avoid possible deadlocks (because of console locking).
- Add temporary /// LOCK /// comments to easily localize where I deactivated extra console (un)locking code (this remains to be analyzed further).
svn path=/branches/ros-csrss/; revision=58205
- Get in a simpler way the console owned by a console window: replace GuiConsoleGetDataPointers by GuiGetWindowConsole.
- Only in functions which need it, we get the GUI data held by the console.
svn path=/branches/ros-csrss/; revision=58194
- Isolate the members of the CONSOLE structure which are used as input buffer data, in a new structure called ... CONSOLE_INPUT_BUFFER !
- Rename some helper functions to better match what they are doing.
svn path=/branches/ros-csrss/; revision=58191
Introduce new helper functions Win32CsrInitHandlesTable and Win32CsrAllocateConsole and use them in many places (in ConsoleConnect, SrvAllocConsole and SrvAttachConsole).
svn path=/branches/ros-csrss/; revision=58184
Rename some structures (CSRSS_... ---> CONSOLE_...) and clarify what the ConsoleHandle members are for (--> OutputHandle or InputHandle).
No code changes otherwise.
svn path=/branches/ros-csrss/; revision=58119
- Simplify IntGetConsoleInput and IntReadConsole.
[CONSRV]
- Implement event waiting for reading console input buffer with CSR wait blocks. This replaces the event-based waiting which, after being moved from client-side (kernel32) to server-side (see r57721), made all consoles hang when one of them was waiting for new input.
TODO: Dereference all the waits in Console->ReadWaitQueue.
svn path=/branches/ros-csrss/; revision=57817
Use new structures and api indices namings.
[CONSRV]
Use CsrValidateMessageBuffer instead of Win32CsrValidateBuffer.
svn path=/branches/ros-csrss/; revision=57729
- Move the waiting loop of IntReadConsole into SrvReadConsole instead.
- Merge IntPeekConsoleInput and IntReadConsoleInput helpers into a single IntGetConsoleInput helper function
and make PeekConsoleInputW/A and ReadConsoleInputW/A use it.
Indeed, the "only" difference between these two functions, is that the first one keeps the data read inside
the console input buffer, but on the contrary the second removes the data and does not return until at least
one input record has been read.
In server-side, CsrReadInputEvent and CsrPeekConsoleInput are merged into SrvGetConsoleInput. Merge the corresponding
structures.
- Use shorter variable names in IntReadConsoleOutput and use CONSOLE_PROCESS_DATA structure in SrvReadConsoleOutput.
- Merge IntReadConsoleOutputCharacter and ReadConsoleOutputAttribute functions into a single IntReadConsoleOutputCode
helper function, and make ReadConsoleOutputAttribute and ReadConsoleOutputCharacterW/A use it.
In server-side, CsrReadConsoleOutputChar and CsrReadConsoleOutputAttrib are merged into SrvReadConsoleOutputString.
(Remark: the SrvReadConsoleOutputString name comes from http://j00ru.vexillium.org/csrss_list/api_list.html and I
checked that it was indeed the server function that was called by both ReadConsoleOutputAttribute and ReadConsoleOutputCharacter).
The idea behind merging these two functions is, that an attribute or a character are instances of the same entity, namely
a "code" (what would be called an (ANSI) escape sequence). Therefore I encode them inside the same CSRSS_READ_CONSOLE_OUTPUT_CODE
structure and I use it with the previous functions.
[CONSRV]
- Make use of the CONSOLE_PROCESS_DATA structure (introduced in r57685).
- Use CsrValidateMessageBuffer instead of Win32CsrValidateBuffer.
- Reorganize conmsg.h a little bit.
svn path=/branches/ros-csrss/; revision=57721
- Add consrv to compilation. It compiles now \o/
- Convert the used console-csrss structures to the new ones.
[CSR]
- Continue to move some structures, and temporary activate a symbol.
[WIN32CSR]
- Clean a header.
svn path=/branches/ros-csrss/; revision=57602
- Move all the console subsystem from win32csr to a new server dll called consrv.dll (instead of putting it directly to winsrv.dll). It's because I want to rework on this later on.
Many things must be done in order to achieve the moving (renaming functions, etc...). Tables & symbol names come from http://j00ru.vexillium.org/csrss_list/api_list.html as usual,
but here I took the Win 2k3 ones and I added few Win 7 functions which already existed in our codebase. The other table names are guessed based on what originally existed in csrsrv
and so on. Many stubs are also missing.
Cultural remark: consrv.dll originally existed in Beta releases of Windows NT 3.1 (e.g. the October 1991 one), but was soon merged with winsrv.dll and thus, in subsequent versions of
Windows, the console subsystem is also found in winsrv.dll. See http://www.logotypes.se/NT310CSRSS.txt and http://j00ru.vexillium.org/?p=349#comment-1883. One has to wait until
Windows 7 to see it moving again to conhost.exe.
[CSRSRV]
- Add an explanation comment on what the ValidTable member in the CSR_SERVER_DLL structure is for.
svn path=/branches/ros-csrss/; revision=57597
2012-10-22 23:55:51 +00:00
Renamed from win32ss/user/win32csr/coninput.c (Browse further)