Commit graph

52702 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 7846f054ff [KERNEL32]
Clean-up IntReadConsoleOutputCode a little bit.

[CONSRV]
Fix a buffer overflow in SrvReadConsoleOutputString, which was translated sometimes into heap corruption and assert, triggered when freeing a remote captured buffer in csrsrv, when executing kernel32_winetest console, just during a call to ReadConsoleOutputCharacterA.
Nevertheless I still keep the culprit code (commented-out now) because it might be useful in the future.

svn path=/branches/ros-csrss/; revision=58229
2013-01-26 19:07:59 +00:00
Hermès Bélusca-Maïto 6d28ec8640 [CONSRV]
Fix input/output (read/write) waiter threads notifications. Now console is usable.
Go and test it! :D

svn path=/branches/ros-csrss/; revision=58225
2013-01-26 16:12:05 +00:00
Hermès Bélusca-Maïto 50a9e6a485 [CONSRV]
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
2013-01-24 22:41:33 +00:00
Hermès Bélusca-Maïto fe7b0f74d3 [CONSRV]
- 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
2013-01-24 20:48:42 +00:00
Hermès Bélusca-Maïto 670f805765 Revert unwanted changes.
svn path=/branches/ros-csrss/; revision=58210
2013-01-23 23:21:39 +00:00
Hermès Bélusca-Maïto 85da7a06cd [CONSRV]
- 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
2013-01-22 23:28:51 +00:00
Hermès Bélusca-Maïto d064e48b32 Code formatting only.
svn path=/branches/ros-csrss/; revision=58199
2013-01-20 22:26:06 +00:00
Hermès Bélusca-Maïto 40ee602754 [CONSRV]
Add extra parentheses in macros arguments usage.

svn path=/branches/ros-csrss/; revision=58198
2013-01-20 22:15:21 +00:00
Hermès Bélusca-Maïto c01d4cbb85 [CONSRV]
- 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
2013-01-19 22:06:28 +00:00
Hermès Bélusca-Maïto f2e3e7ac9d [CONSRV]
- 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
2013-01-18 22:31:16 +00:00
Hermès Bélusca-Maïto 10422cd7e2 [BASESRV]
Remove an unneeded comment.

svn path=/branches/ros-csrss/; revision=58190
2013-01-18 22:28:14 +00:00
Hermès Bélusca-Maïto 44782833a8 [CONSRV]
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
2013-01-16 22:25:12 +00:00
Hermès Bélusca-Maïto 573e7edb6f [KERNEL32]
Fix support for CONIN$ and CONOUT$, and add support for CON special file
(now, writing to C:\CON or C:\somepath\CONIN$ or C:\anotherpath\CONOUT$ works).

svn path=/branches/ros-csrss/; revision=58182
2013-01-16 00:16:06 +00:00
Hermès Bélusca-Maïto 91e34202c7 [CONSRV]
Code reorganization only.

svn path=/branches/ros-csrss/; revision=58178
2013-01-15 00:10:01 +00:00
Hermès Bélusca-Maïto d3af9fbaf2 [CONSRV]
- Temporary make the property dialog working again (but it's not the ultimate solution).
- in conio.h : members reorganization only.

svn path=/branches/ros-csrss/; revision=58177
2013-01-15 00:02:07 +00:00
Hermès Bélusca-Maïto 9967600abf [CONSRV]
- Finish to do the replacements HeapAlloc --> RtlAllocateHeap and Co.
- Finish to UNICODify consrv (it happens that it has been almost done already).
- Modify the way we start BlueScreen driver (in TUI mode): instead of using the SCM which, at that moment, is starting (and is not ready to answer to start/stop services requests), use the NT apis to start the driver (in the same way the SCM performs driver starting).
- Add a note on HAVE_WMEMSET.

svn path=/branches/ros-csrss/; revision=58169
2013-01-13 19:50:52 +00:00
Hermès Bélusca-Maïto bc73176945 [CONSRV]
HeapAlloc --> RtlAllocateHeap
HeapFree --> RtlFreeHeap
GetProcessHeap --> RtlGetProcessHeap

svn path=/branches/ros-csrss/; revision=58168
2013-01-13 19:18:54 +00:00
Hermès Bélusca-Maïto 975ef54c09 [WINSRV]
Compile Winsrv as a win32dll UNICODE

svn path=/branches/ros-csrss/; revision=58167
2013-01-13 19:17:29 +00:00
Hermès Bélusca-Maïto df7477717c [KERNEL32]
- Correct a error return code (in AllocConsole).
- Implement AttachConsole (inspired by AllocConsole).

[CONSRV]
- Correct a error return code (in AllocConsole).
- Introduce helper functions to simplify console-initialization code.
- Implement server-side of AttachConsole (I used pieces of code from ConsoleNewProcess, ConsoleConnect and SrvAllocConsole).

Some debug prints were introduced (for debug-purposes :P), will be removed when all things work.

TODO: have a look on the handles code.

svn path=/branches/ros-csrss/; revision=58166
2013-01-13 17:07:25 +00:00
Hermès Bélusca-Maïto 074466b15e [CSRSRV]
Initialize an uninitialized variable.

svn path=/branches/ros-csrss/; revision=58158
2013-01-12 00:33:55 +00:00
Hermès Bélusca-Maïto 122303c4ea Sync with trunk r58151 to bring the latest changes from Amine and Timo.
svn path=/branches/ros-csrss/; revision=58152
2013-01-09 20:12:23 +00:00
Amine Khaldi 296c68fb57 [UNIATA]
* Sync to 0.44c3.
CORE-6649 #resolve #comment Committed in r58151. Thanks Alter ;)
CORE-6563

svn path=/trunk/; revision=58151
2013-01-09 17:19:26 +00:00
Timo Kreuzer 4fffa4fbc6 [BOOTVID]
Rename a global variable to silence a VS analyze warning.

svn path=/trunk/; revision=58150
2013-01-09 13:22:14 +00:00
Timo Kreuzer 61204b265b [BOOTVID]
Fix support for CHAR_GEN_UPSIDE_DOWN

svn path=/trunk/; revision=58149
2013-01-09 12:53:59 +00:00
Timo Kreuzer a54575d01e [BOOTVID]
Rewrite DisplayCharacter. The new algorithm is much faster. It uses the VGA mask register to draws up to 8 pixels at once, completely getting rid of the inner loop. Pixel position / mask calculations and the check for opaque vs transparent background are moved out of the loops. The result is a single loop for the y coordinate containing an inlined __outbyte and memory write. A second loop in case of unaligned character writes.

svn path=/trunk/; revision=58148
2013-01-09 12:40:42 +00:00
Timo Kreuzer 3d3bd58419 [BOOTVID]
Apply the following optimizations:
- include ioaccess.h to inline port access, instead of going through hal.
- Make __outpb and __outpw macros rather than stdcall function
- Make SetPixel FORCEINLINE
- Do not switch mode for every pixel we write, instead do it once before doing larger blt operations
- use __movsb instead of manual loop plus READ/WRITE_REGISTER_UCHAR
This noticeably improves performance.

svn path=/trunk/; revision=58147
2013-01-09 09:48:02 +00:00
Hermès Bélusca-Maïto 44d9d33649 [BOOTLOGO]
Softens the edges of the '3' digit

svn path=/trunk/; revision=58146
2013-01-09 00:48:33 +00:00
Hermès Bélusca-Maïto 20e769deb6 [MSGINA]
Add the source login logo .svg file. To make the bitmap, export the .svg file in png, then save the png in Bitmap 24bits.

svn path=/trunk/; revision=58145
2013-01-09 00:30:38 +00:00
Hermès Bélusca-Maïto 1bf25af910 --_'_-- \o/ Graphical Happy New Year 2013 (+ 9d) \o/ --_'_--
Note to people:
~=~=~=~=~=~=~=~
- The msgina (login) logo is made from a .svg file. The copyright line text has font Lucida Sans Unicode (this font allows you to have the right length to the year-dash-separator). DejaVu Sans may also work. I would prefer to use the other logo used as the header for the ReactOS Welcome program (welcome.exe from the CD), but also it is given as a .bmp and I would like to have a .svg or some equivalent format to use it (with little modifications though) as a new login logo (in particular, rescaling it).
- Adjust the boot-logo year, also with the Lucida Sans Unicode font. This was done with Paint from Win2k3 (WARNING!! Not with Windows 7 Paint !!) because it keeps the palette of the opened bitmap, contrary to Windows7 one.
- If somebody has the original boot-logo file (a .svg, ..., something else?), then signal it to me !

svn path=/trunk/; revision=58144
2013-01-09 00:03:50 +00:00
Timo Kreuzer 92546d0ab1 [CRT]
- Use __debugbreak in _assert when user presses ignore in the message box
- Implement __crt_MessageBoxA and use it from _assert and abort
- Rewrite abort and _set_abort_behavior
- Add function headers and set BSD license for my code
- CORE-6594 #resolve

svn path=/trunk/; revision=58143
2013-01-08 22:14:10 +00:00
Amine Khaldi 482bde30b5 * Addendum to r58141.
svn path=/trunk/; revision=58142
2013-01-08 20:34:19 +00:00
Amine Khaldi 8ca80bb2cb * Visual Studio IDE support bringup. We can now even compile bootcd/livecd...etc straight from the IDE.
* For anyone who wants to work only on a certain module (or a set of modules), you can add "project(module)" to the related CMake file. This will generate a solution that contains all the required dependencies needed to compile only that module, without having to open a huge solution with 900+ projects.
* We'll create a wiki page to explain how to use this in detail.
* Dedicated to all VS users. Have fun ;)

svn path=/trunk/; revision=58141
2013-01-08 20:33:08 +00:00
Hermès Bélusca-Maïto 65de4100f6 Precision: r58138 was part 2a/3 of my changes.
[KERNEL32-RAMDISK]
Continue to use the new debugging macros introduced in r58132.

Part 2b/3

svn path=/trunk/; revision=58140
2013-01-08 00:35:26 +00:00
Timo Kreuzer 15eb0fd332 [SAL]
Try to fix MSVC analyze

svn path=/trunk/; revision=58139
2013-01-07 22:40:52 +00:00
Hermès Bélusca-Maïto 126cb7dacd [NTOSKRNL-CMLIB]
Continue to use the new debugging macros introduced in r58132.

svn path=/trunk/; revision=58138
2013-01-07 22:11:06 +00:00
Hermès Bélusca-Maïto 861e9a0a55 [REACTOS]
I hope this solution will work *sigh*

svn path=/trunk/; revision=58137
2013-01-06 23:50:52 +00:00
Hermès Bélusca-Maïto 2ee69a3c10 [REACTOS]
Attempt to fix compilation by lying at NDK.

svn path=/trunk/; revision=58136
2013-01-06 23:42:25 +00:00
Hermès Bélusca-Maïto 959e4790c6 [REACTOS]
- Fix the debugging macros I've introduced in r58132; in particular do not use while(true); for forbidding the user to continue execution, but instead raise an exception with EXCEPTION_NONCONTINUABLE flag (included when called RtlRaiseStatus).
- Adjust the definition of RtlRaiseStatus (in kernel-mode it is ExRaiseStatus which is used).

svn path=/trunk/; revision=58135
2013-01-06 23:29:05 +00:00
Olaf Siejka 6d9be19636 [TRANSLATION]
- romanian translation update by Stefan Fulea; CORE-6718
- fix for japaneese cmd translation by Tomoya Kitagawa; CORE-6820
- polish translation update of desk and input;

svn path=/trunk/; revision=58134
2013-01-06 22:38:20 +00:00
Thomas Faber 235fde5f97 [RTL]
- Use correct registry value names for time zone information

svn path=/trunk/; revision=58133
2013-01-06 20:52:02 +00:00
Hermès Bélusca-Maïto 34daa9e99c [REACTOS]
Introduce four new debugging macros, ERROR_DBGBREAK, ERROR_FATAL, UNIMPLEMENTED_DBGBREAK, UNIMPLEMENTED_FATAL (and two helpers, __NOTICE and __ERROR_DBGBREAK).
They are designed to display on the debug-log a printf-like user-defined message and to break into the debugger.
- The *_DBGBREAK macros break only into the debugger and allow to continue (they don't hang).
- The *_FATAL macros break into the debugger and then halt the execution.

(Based on an idea of Aleksey Bragin, see the ros-dev mailing list about the while(true) --> assert(false); changes).

[NTOSKRNL]
Use these macros instead of ASSERT(FALSE); introduced in revisions r58110, r58111 and r58112 to replace while(TRUE); halts.

Part 1/3

svn path=/trunk/; revision=58132
2013-01-06 18:47:39 +00:00
Thomas Faber 04c2d31986 [RPCRT4][SHDOCVW]
- Add missing __WINESRC__ definitions. Fixes some warnings.
CORE-6784 #resolve

svn path=/trunk/; revision=58131
2013-01-06 14:32:46 +00:00
Eric Kohl 0adc421511 [NETAPI32]
- NetUserGetInfo: Add Support for info level 23.
- Convert UserAccountControl flags to user info flags and convert last logon, last logoff and account expires time.

svn path=/trunk/; revision=58130
2013-01-06 14:24:40 +00:00
Eric Kohl 79d2fc2c7a [PSDK]
Add missing types USER_INFO_4 and USER_INFO_23.

svn path=/trunk/; revision=58129
2013-01-06 13:22:47 +00:00
Eric Kohl e31ab5ce32 [SAMSRV]
SAM Setup: Set the UserAccountControl flags when user accounts are created.

svn path=/trunk/; revision=58128
2013-01-06 13:03:01 +00:00
Thomas Faber 40d30b8b21 [EXPLORER_NEW]
- Open run dialog when Win+R was pressed. Patch by Edijs Kolesnikovičs.
CORE-6863 #resolve

svn path=/trunk/; revision=58127
2013-01-06 12:04:48 +00:00
Thomas Faber d655fccbd2 [TIMEDATE]
- Correctly show current time zone name even if no daylight saving settings are set. Patch by Lee Schroeder.
CORE-6803 #resolve #comment Fixed, thanks. Sorry for the long wait.

svn path=/trunk/; revision=58126
2013-01-06 11:37:11 +00:00
Eric Kohl dc303b40f8 [NETAPI32]
Fix indentation. No code changes!

svn path=/trunk/; revision=58125
2013-01-06 10:45:46 +00:00
Thomas Faber 81f292a1fe [EXPLORER_NEW]
- Move "Show window previews (thumbnails)" option to advanced tab, as it doesn't exist in Windows. Patch by Edijs Kolesnikovičs.
CORE-6840 #resolve

svn path=/trunk/; revision=58124
2013-01-06 10:36:49 +00:00
Thomas Faber 6effe35b24 [EXPLORER_NEW]
- Plug a memory leak in IDropTargetImpl
- Do not allocate 64x the required space in TaskSwitchWnd_AllocTaskItem
- Properly free and unregister the tray window
- Fix a few more style issues

svn path=/trunk/; revision=58123
2013-01-06 10:12:39 +00:00