Commit graph

6 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto dd5a9c5231 [CONSRV]
- Fix console apps initialization.
- Add some debug output (NOTE TO MYSELF: remove them when all things work).
- Rewrite ConsoleNewProcess.
- Reorganize SrvAllocConsole and create ConsoleConnect based on SrvAllocConsole.
- Create ConsoleDisconnect which undoes what ConsoleConnect and ConsoleNewProcess did.
- Rework a little bit CsrInitConsole.

Now the console app. initialization algorithm is the following:

1- A process is created, its type (GUI or CUI) is determined (kernel32 and basesrv).
2- ConsoleNewProcess is called (consrv) and makes this new process inherit the console handles table from its parent
   (NOTE: this is done for all CUI processes, because at this point, we still don't know whether we must inherit
   the handles from the parent or not).
3- (back in kernel32) In BasepInitConsole, we determine whether or not we must create a new console window or use
   the parent's one or not using one at all. We (as a client) connect to the console server (consrv) (via CsrClientConnectToServer)
   which in turn (via CSRSS mechanism) calls ConsoleConnect. For GUI processes we do nothing. For CUI processes, we initialize
   a new console based on properties set in BasepInitConsole.
4- When a process dies, ConsoleDisconnect is called and whether it is a GUI or CUI process, we revert the actions done previously.

Part 2/2

TODO: - Debug the CSR waits.
      - Work on the console properties property-sheet.
      - See what can be done on http://jira.reactos.org/browse/CORE-122

svn path=/branches/ros-csrss/; revision=58098
2013-01-02 00:32:20 +00:00
Hermès Bélusca-Maïto e03c8d5702 [CONSRV]
- Initialize the per-process structure size : fixes console initialization.

svn path=/branches/ros-csrss/; revision=57702
2012-11-13 21:11:30 +00:00
Hermès Bélusca-Maïto 34086f2971 [CONSRV]
- Use the new PCONSOLE_PROCESS_DATA type instead of PCSR_PROCESS, for accessing console-specific fields inside a console structure (the code modifications inside these functions will follow in the next commits).
- Remove unneeded included header files in consrv.h.
- Use a DLL instance in order to facilitate the access to win32 resources.
- Activate the declaration of server apis (or rename existing ones to the Windows scheme from the http://j00ru.vexillium.org/csrss_list/api_list.html#Windows_2k3 list).
- Comment the Win32CsrValidateBuffer helper (because it should be replaced by the usage of CsrValidateMessageBuffer).
- Add the list of the old APIs (just for me, to remember at the end to check that I didn't forget ome of them during the process of moving / renaming).

svn path=/branches/ros-csrss/; revision=57686
2012-11-07 21:10:48 +00:00
Hermès Bélusca-Maïto 574d00dc19 [CSRSRV/BASESRV/CONSRV/WIN32CSR/WINSRV]
- Fix resource files strings, headers, delete unuseful files... Nothing interesting.
- Add winsrv to build.

svn path=/branches/ros-csrss/; revision=57605
2012-10-24 21:37:22 +00:00
Hermès Bélusca-Maïto 1827b99497 [CONSRV]
- 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
2012-10-23 22:31:36 +00:00
Hermès Bélusca-Maïto 608c1e0428 [CONSRV/WIN32CSR]
- 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