Commit graph

55 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto e4d97e422f [KERNEL32]
Silent more debug prints and remove an unused DPRINT1 I've introduced in r57666.

svn path=/branches/ros-csrss/; revision=58104
2013-01-03 17:42:27 +00:00
Hermès Bélusca-Maïto e635242284 [KERNEL32/BASESRV]
Remove now unneeded bInheritHandles member / parameter.

svn path=/branches/ros-csrss/; revision=58097
2013-01-01 23:41:42 +00:00
Hermès Bélusca-Maïto d820098fa6 [KERNEL32/BASESRV/CONSRV]
- Fix console apps initialization.
- Introduce a helper function InitConsoleCtrlHandling for initializing console control handling.
- We now initialize the new created console when connecting the client (kernel32) to the server (consrv) by calling CsrClientConnectToServer with real parameters (not dummy ones).
- Add/activate some debug prints (will be removed when all things work).

Part 1/2

svn path=/branches/ros-csrss/; revision=58096
2013-01-01 23:36:19 +00:00
Hermès Bélusca-Maïto c0399e88a6 [KERNEL32/CONSRV]
- 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
2012-12-30 21:02:12 +00:00
Hermès Bélusca-Maïto d6769b4364 [KERNEL32-CONSRV]
* 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
2012-12-30 13:25:50 +00:00
Hermès Bélusca-Maïto dba80b614b Sync with trunk revision r58045 to bring the corrections on configure.cmd and on widl/wpp.
svn path=/branches/ros-csrss/; revision=58046
2012-12-29 20:57:10 +00:00
Hermès Bélusca-Maïto f44e914e80 Sync with trunk r58033.
svn path=/branches/ros-csrss/; revision=58034
2012-12-28 23:37:33 +00:00
Hermès Bélusca-Maïto 3d2c0a805b - Synchronize up to trunk's revision r57864.
- [CONSRV/WINSRV] Add langage definition support.

svn path=/branches/ros-csrss/; revision=57865
2012-12-10 23:01:20 +00:00
Hermès Bélusca-Maïto 0d59b8df65 [KERNEL32]
- 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
2012-12-08 00:39:24 +00:00
Hermès Bélusca-Maïto 5127a493a3 [NTDLL/CSRSRV]
Re-fix part of the capture-buffer offset setting, based on what I understood from all my previous investigations. It reverts a little part of r57673 but fixing some existing bugs there.

svn path=/branches/ros-csrss/; revision=57809
2012-12-06 22:24:27 +00:00
Hermès Bélusca-Maïto 190ce5ba55 [NTDLL]
Correct some comments.

svn path=/branches/ros-csrss/; revision=57808
2012-12-06 21:52:09 +00:00
Hermès Bélusca-Maïto 24087a3b01 Synchronize up to trunk's revision r57784.
svn path=/branches/ros-csrss/; revision=57785
2012-11-30 21:32:42 +00:00
Hermès Bélusca-Maïto 2d18c1a929 Synchronize up to trunk's revision r57756.
svn path=/branches/ros-csrss/; revision=57757
2012-11-24 13:02:15 +00:00
Hermès Bélusca-Maïto 60e03ccee8 [KERNEL32]
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
2012-11-23 19:37:20 +00:00
Hermès Bélusca-Maïto d7bac86452 [NTDLL]
When calling CsrClientConnectToServer with a valid connection info user buffer, after capturing the buffer and calling CsrClientCallServer, do not forget to copy back to the user buffer the updated connection info and to free the capture buffer !

svn path=/branches/ros-csrss/; revision=57743
2012-11-20 22:48:11 +00:00
Hermès Bélusca-Maïto 90229a39a0 [KERNEL32/CONSRV]
- 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
2012-11-19 23:26:36 +00:00
Hermès Bélusca-Maïto ef1e1fc82b [KERNEL32/CONSRV]
- 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
2012-11-19 21:48:22 +00:00
Hermès Bélusca-Maïto e71f1dd200 [KERNEL32/CONSRV]
- 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
2012-11-18 17:06:48 +00:00
Hermès Bélusca-Maïto 4b04f7d488 [KERNEL32]
Use new structures and api indices namings.

[CONSRV]
Use CsrValidateMessageBuffer instead of Win32CsrValidateBuffer.

svn path=/branches/ros-csrss/; revision=57729
2012-11-18 13:54:32 +00:00
Hermès Bélusca-Maïto de31fffea8 [KERNEL32/CONSRV]
- 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
2012-11-18 13:10:03 +00:00
Hermès Bélusca-Maïto 3a0d4c3269 [KERNEL32]
- Add some NULL checks.
- Use new structures and api indices namings.

svn path=/branches/ros-csrss/; revision=57726
2012-11-17 23:45:14 +00:00
Hermès Bélusca-Maïto 1568822b7c [KERNEL32]
- 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
2012-11-17 23:29:53 +00:00
Hermès Bélusca-Maïto 56190eec33 [KERNEL32]
- 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
2012-11-17 23:07:59 +00:00
Hermès Bélusca-Maïto dab294603f [KERNEL32/CONSRV]
- 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
2012-11-17 22:42:04 +00:00
Hermès Bélusca-Maïto 2006c3bf86 [KERNEL32/CONSRV]
- 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
2012-11-17 21:39:41 +00:00
Hermès Bélusca-Maïto 0bdd9a32b0 [KERNEL32/CONSRV]
Fix compilation.

svn path=/branches/ros-csrss/; revision=57715
2012-11-15 23:13:23 +00:00
Hermès Bélusca-Maïto 903d3cfb1c [KERNEL32/CONSRV]
- 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
2012-11-15 23:06:49 +00:00
Hermès Bélusca-Maïto 0473031b87 [KERNEL32]
- 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
2012-11-15 22:34:44 +00:00
Hermès Bélusca-Maïto 1ccafa6cae [KERNEL32/CONSRV]
- 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
2012-11-15 21:02:01 +00:00
Hermès Bélusca-Maïto d6b0ad349a [KERNEL32]
- 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
2012-11-15 18:06:17 +00:00
Hermès Bélusca-Maïto c1f19d61c2 [KERNEL32]
Compile alias.c and history.c.

svn path=/branches/ros-csrss/; revision=57710
2012-11-15 17:13:53 +00:00
Hermès Bélusca-Maïto a0dd01612e [KERNEL32]
- 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
2012-11-15 17:09:51 +00:00
Hermès Bélusca-Maïto c13acb3749 Fix header (no code changes).
svn path=/branches/ros-csrss/; revision=57708
2012-11-15 16:53:30 +00:00
Hermès Bélusca-Maïto 2ae258d08d [KERNEL32]
- 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
2012-11-15 16:51:29 +00:00
Hermès Bélusca-Maïto 66b2c326a5 [KERNEL32]
Fix some comments formatting.

svn path=/branches/ros-csrss/; revision=57706
2012-11-15 16:29:21 +00:00
Hermès Bélusca-Maïto aa2347c408 [KERNEL32]
- 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
2012-11-15 16:24:43 +00:00
Hermès Bélusca-Maïto f77f05cd9d Synchronize up to trunk's revision r57689.
svn path=/branches/ros-csrss/; revision=57690
2012-11-07 23:07:18 +00:00
Hermès Bélusca-Maïto d736f0b914 [NTDLL]
- Add parameter annotations.
- Improve CSR buffer allocation with 4-byte align.
- Simplify the capture-buffer pointers settings.

[CSRSRV]
- Remove last console structure from csrsrv.h (in next commits it will be placed in a proper header).
- Enable global CSR debugging (for debugging purposes... ;-) ).
- api.c: Enable debugging.
- api.c/.h: Remove old code and deprecated unused definitions.
- Use the Win2k3-compliant version of CsrCreateThread (code from subsystems/csr/csrsrv) (TODO: correct its usage in basesrv:BaseSrvCreateThread).
- init.c: Implement a helper routine, CsrInitCsrRootProcess, in order to initialize the per-process server data (see CSR_PROCESS structure) in the Root CSR process. New process inherit it from this Root process.
- server.c - Add a DPRINT. Remove a hack. Correct a parameter passing.
- session.c - Remove a hack (it will go to the new process initialization in consrv)
- Disable the code of CsrConnectToUser while user32:ClientThreadSetup doesn't work.
- Correct the implementation of CsrValidateMessageBuffer.
- Basic implementation of CsrValidateMessageString using CsrValidateMessageBuffer.

TODO:
- Compare CsrpHandleConnectionRequest with the other one function in api.c.
- Compare CsrValidateMessageBuffer with Win32CsrValidateBuffer ?

svn path=/branches/ros-csrss/; revision=57673
2012-11-05 00:23:58 +00:00
Hermès Bélusca-Maïto a8f1d34118 [KERNEL32]
Use the new messaging structures...

svn path=/branches/ros-csrss/; revision=57668
2012-11-02 18:30:27 +00:00
Hermès Bélusca-Maïto 1f05ce5f28 [KERNEL32]
- 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
2012-11-02 18:28:42 +00:00
Hermès Bélusca-Maïto 1e4253f2c0 [KERNEL32]
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
2012-11-02 18:00:47 +00:00
Hermès Bélusca-Maïto bd4d83d88f [WIN32K]
- 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
2012-11-02 13:50:31 +00:00
Hermès Bélusca-Maïto eb1f9f74b7 Forgot two files.
svn path=/branches/ros-csrss/; revision=57654
2012-10-31 00:41:02 +00:00
Hermès Bélusca-Maïto 509461cd33 Synchronize with trunk's revision r57652.
svn path=/branches/ros-csrss/; revision=57653
2012-10-31 00:26:38 +00:00
Hermès Bélusca-Maïto e5f19654e3 [NTDLL/CSR/SM]
- Clean some headers.
- Code formatting.

svn path=/branches/ros-csrss/; revision=57643
2012-10-28 22:56:13 +00:00
Hermès Bélusca-Maïto 43c7fc0c8d Synchronize with trunk's revision r57629.
svn path=/branches/ros-csrss/; revision=57630
2012-10-28 10:05:08 +00:00
Hermès Bélusca-Maïto 3cb1779934 [WIN32SS/USER32]
- 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
2012-10-27 23:52:28 +00:00
Hermès Bélusca-Maïto 5a3ba45059 [NTDLL]
- Code formatting.
- Fix CSR message length computation.

[CSR]
- Remove unneeded comments.
- Correct arguments names.

svn path=/branches/ros-csrss/; revision=57625
2012-10-27 19:05:10 +00:00
Hermès Bélusca-Maïto b507bd0612 [CSR/BASESRV/CONSRV/WINSRV]
- Fix code headers. No code changes.
- Rename csrcl.h to csr.h for readability purposes.
- exitros.c --> shutdown.c

svn path=/branches/ros-csrss/; revision=57618
2012-10-25 20:40:41 +00:00
Hermès Bélusca-Maïto aab393ca70 Synchronize with trunk's revision r57599.
svn path=/branches/ros-csrss/; revision=57600
2012-10-23 19:54:03 +00:00