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
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
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
- 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
- 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
- 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
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
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
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
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
- 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
* 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
- 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
- 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
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
- 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
- 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
- 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
- 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