- Code reorganization.
- In particular, move IsConsoleHandle macro to a place which it can be used by both kernel32 and consrv.
svn path=/branches/ros-csrss/; revision=58063
* HANDLE_TYPE --> CONSOLE_HANDLE_TYPE because it hits "previous" definition of this enumeration (a totally different one from win32ss/include/ntuser.h)
* Temporarily add a dummy member to the CONSOLE_CONNECTION_INFO structure, to make MSVC happy.
svn path=/branches/ros-csrss/; revision=58055
- 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
Deactivate the code of GetConsoleInputWaitHandle, because it calls a function that doesn't seem to appear in the console server apis listed in http://j00ru.vexillium.org/csrss_list/api_list.html (and that I haven't included in the console server apis list), until I find a better solution. It fixes compilation.
[CONSRV]
- Code reorganization
- Introduce the CONSOLE_CONNECTION_INFO structure needed for initializing consoles when launching a program (see http://svn.reactos.org/svn/reactos/trunk/reactos/lib/kernel32/misc/dllmain.c?r1=16826&r2=16825&pathrev=16826), instead of calling AllocConsole. Not used at this time.
Now the branch compiles.
svn path=/branches/ros-csrss/; revision=57749
- Merge IntWriteConsoleOutputCharacter and WriteConsoleOutputAttribute functions into IntWriteConsoleOutputCode helper functions, which is used inside WriteConsoleOutputAttribute and WriteConsoleOutputCharacterW/A.
- In server-side, merge CsrWriteConsoleOutputChar and CsrWriteConsoleOutputAttrib into the server API SrvWriteConsoleOutputString.
- The structures CSRSS_WRITE_CONSOLE_OUTPUT_CHAR and CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB are merged into CSRSS_WRITE_CONSOLE_OUTPUT_CODE.
[CONSRV]
- Add a CsrValidateMessageBuffer usage.
svn path=/branches/ros-csrss/; revision=57740
- Modify the helper function IntWriteConsole to make it use of capture buffers for passing things to write.
- Now, the loop disappears.
- I moved the pause-event wait (introduced in revision r47359) inside consrv, and (concerning the server-api-part SrvWriteConsole), especially in the ConioWriteConsole function, to be sure that all functions calling ConioWriteConsole become sensible to pause event. This REALLY NEEDS testing (and of course the code needs cleaning of the introduced comments, when I'm sure it works).
svn path=/branches/ros-csrss/; revision=57738
- Merge IntFillConsoleOutputCharacter and FillConsoleOutputAttribute functions into IntFillConsoleOutputCode helper and make it used by FillConsoleOutputAttribute/CharacterW/A.
- In server-side, CsrFillOutputChar and CsrFillOutputAttrib are merged into SrvFillConsoleOutput.
- Merge CSRSS_FILL_OUTPUT and CSRSS_FILL_OUTPUT_ATTRIB structures into CSRSS_FILL_OUTPUT.
svn path=/branches/ros-csrss/; revision=57734
Use new structures and api indices namings.
[CONSRV]
Use CsrValidateMessageBuffer instead of Win32CsrValidateBuffer.
svn path=/branches/ros-csrss/; revision=57729
- Use new structures and api indices namings (as usual).
[CONSRV]
- Merge CSRSS_SET_TITLE and CSRSS_GET_TITLE into CSRSS_CONSOLE_TITLE.
- Merge CSRSS_GET_CONSOLE_(OUTPUT_)CP and CSRSS_SET_CONSOLE_(OUTPUT_)CP into CSRSS_CONSOLE_CP.
- NtDuplicateObject(GetCurrentProcess(), ... ---> NtDuplicateObject(NtCurrentProcess(), ...
- Use CsrValidateMessageBuffer instead of Win32CsrValidateBuffer.
- Use CONSOLE_PROCESS_DATA structure.
TODO: Remove a DPRINT1 checkpoint in SrvAllocConsole after future tests are OK.
svn path=/branches/ros-csrss/; revision=57727
- Use new structures and api indices namings.
[CONSRV]
- CSRSS_SET_CURSOR ==> CSRSS_SET_CURSOR_POSITION for SrvSetConsoleCursorPosition.
- Merge CSRSS_GET_CURSOR_INFO and CSRSS_SET_CURSOR_INFO into CSRSS_CURSOR_INFO.
svn path=/branches/ros-csrss/; revision=57725
- Make some functions compliant with the new structures and server apis indices names.
[KERNEL32/CONSRV]
- Merge CSRSS_SET_CONSOLE_MODE and CSRSS_GET_CONSOLE_MODE into CSRSS_CONSOLE_MODE.
- Rename CSRSS_SETGET_CONSOLE_HW_STATE into CSRSS_CONSOLE_HW_STATE.
svn path=/branches/ros-csrss/; revision=57724
- Make OpenConsole call only one server api, namely SrvOpenConsole, which was known before under the name CsrGetHandle (this latter function was removed in r57689 by error).
- Merge CSRSS_GET_INPUT_HANDLE and CSRSS_GET_OUTPUT_HANDLE structures into CSRSS_OPEN_CONSOLE (used by the functions named above).
[CONSRV]
- Add SrvOpenConsole (copied from CsrGetHandle), and add DPRINT1s to it.
- Load the localized string "Command Prompt" using the Server DLL's instance handle instead of calling GetModuleHandleW.
- Make use of CONSOLE_PROCESS_DATA structures.
svn path=/branches/ros-csrss/; revision=57723
- 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
- Use a standard win32 thread function for the ConsoleControlDispatcher thread, instead of a custom PCONTROLDISPATCHER one.
- Deactivate debug outputs in console.c, which were activated by error in r57706.
svn path=/branches/ros-csrss/; revision=57714
- Move console-related Vista+ functions from client/vista.c to a dedicated client/console/vista.c file, and add it to compilation.
- Move some helper functions from console.c to history.c.
- Use the new api index names in history.c.
[CONSRV]
- Merge CSRSS_GET_HISTORY_INFO and PCSRSS_SET_HISTORY_INFO structures declarations into CSRSS_HISTORY_INFO, and therefore use only one member of it inside CONSOLE_API_MESSAGE structure.
- WORD --> UINT for few structure members related to history information.
svn path=/branches/ros-csrss/; revision=57713
- Use capture buffers to pass (variable-length) strings to the console server.
- Merge the CSRSS_ADD_CONSOLE_ALIAS and CSRSS_GET_CONSOLE_ALIAS structures into a unique structure CSRSS_CONSOLE_ALIAS.
TODO: Check what happens to the "/ sizeof(WCHAR);" in GetConsoleAliasesW.
svn path=/branches/ros-csrss/; revision=57712
- Move all the read/write related functions to an appropriate source file and add it to compilation.
- Fix credits for alias.c
svn path=/branches/ros-csrss/; revision=57711
- Move history-functions to a dedicated source file. The functions were created in r47580 and therefore update the description header of the file.
svn path=/branches/ros-csrss/; revision=57709
- Move alias-functions to a dedicated file. The names of the programmers were retrieved via svn information (see r32093 and r32118).
svn path=/branches/ros-csrss/; revision=57707
- Place console.c file in a dedicated directory because I will after split it into logical units (eg. a file for Alias-functions, a file for Read-write functions, etc...) to facilitate maintenance.
svn path=/branches/ros-csrss/; revision=57705
- Use new messaging structures, defined-names instead of hardcoded values.
- Enable temporary debugging tracing and add some DPRINTs.
- Delete an unused variable.
svn path=/branches/ros-csrss/; revision=57667
This is the first of a series of commits aiming at making kernel32 using the new CSR messaging structures for communicating with Server Dlls.
svn path=/branches/ros-csrss/; revision=57666
- Remove the now unneeded CSR messaging support.
- CsrInit() goes away also and the usage of the CsrProcess is replaced by that of gpepCSRSS.
[WINSRV]
- Use a DLL instance for loading resources, instead of calling GetModuleHandle.
[KERNEL32/NTDLL]
- Remove unneeded variables.
svn path=/branches/ros-csrss/; revision=57665
- Use the new subsystems header winmsg.h
- Use the new USER_API_MESSAGE structure, and adapt co_CsrNotify in consequence.
- Code formatting.
[KERNEL32]
- Use the new subsystems headers basemsg.h, conmsg.h, winmsg.h, etc...
[NTDLL]
- Code formatting only.
svn path=/branches/ros-csrss/; revision=57628
- Use new naming scheme.
[CSRSRV]
- Continuing headers reorganization.
- Activate new code.
[CSRSRV/WIN32CSR]
- Move some code into basesrv.
[BASESRV]
- Add basesrv.dll
The names of the APIs tables come from http://j00ru.vexillium.org/csrss_list/api_list.html as usual,
however I used the NT 4 ones for testing purposes only. After that I will update them to 2k3 version
and add function stubs. Also some variable names are deduced from the subsystems/win32/csrss/csrsrv/server.c ones.
svn path=/branches/ros-csrss/; revision=57587
- Use the new messaging structures and the new macros, plus the new CSR_API function's signature (--> and rename some variables).
- Code cleaning & formatting.
[CSRSS/NDK]
- Reorganize all the header files in logical units (server.h for server-side of CSR, client.h for client-side, and msg.h for messaging), removing duplicated definitions.
- Code cleaning & formatting.
The next step would be to activate the code of server-dll loading inside csrsrv, then moving all the console-related APIs from win32csr to winsrv, the latter built with the same structure as csrsrv's.
svn path=/branches/ros-csrss/; revision=57570