ion(a)svn.reactos.com wrote:
- Final ROSRTL removal patch. The next patch will
remove the actual library and code.
- Changes:
- CreateProcess
* Cleanup creation of the initial thread using new utility functions and remove
rosrtl
* Almost entirely rewrote the function to support features such as:
- SxS (locally only, patch will follow),
- SFP (SAFER) (locally only, patch will follow),
- DllPaths (locally only, patch will follow),
- Proper process environment/paramter block creation
- Proper console handle management (needs more work in kernel32/csr),
- Tokens/CreateProcessAsUser (locally only, patch will follow),
- Simpler code for path lookup, and more robust.
- Support for "auto-correction" (see Raymond Chen's blog)
- 16-bit/NE detection
- A variety of creation flags are now properly supported
- Added support for an undocumented-yet-known (see comment) shell flag
- Alert for flags we don't support yet
- Catch invalid flag combinations and other caller errors
- Improve and correct path searcing to use documented behaviours
- Created a multitude of helper functions to make the code easier to read
and allow them to be used for other apis as time goes on.
- BaseProcessStartup
* Call NtSetThreadInformation to let the Kernel know of the Thread's Start
Address.
* Correct prototype of Thread Startup function for this case.
This fixes MANY things, some of which may not be evident, and possibly creates regressions
which I have not yet seen but will try to correct. Some of these may be caused by the fact
that I've seen code send CreateProcessW incorrect flags. Some things of note: DO NOT
send partial names as "lpApplicationName". It's not supposed to work unless
you're in the same current directory. Also, do NOT send CREATE_UNICODE_ENVIRONMENT if
you don't have a unicode environement, and vice-versa. I've seen lots of code
doing mistakes related to this. I hope you appreciate this patch and won't all jump on
me for possbile regressions :(.
Modified: trunk/reactos/lib/kernel32/process/create.c
Modified: trunk/reactos/lib/kernel32/thread/i386/thread.S
Modified: trunk/reactos/lib/kernel32/thread/thread.c
Modified: trunk/reactos/ntoskrnl/mm/process.c
------------------------------------------------------------------------
Hi,
your rewrite of CreateProcess is broken. Before you can inform csrss
about the process creation, you have to gather all informations about
handles and creation options. After your commit, each console
application creates its own console window and the redirection of
standard handles is broken. It seems also that the inheritance of msvcrt
file id's is broken. This stops compiling ros on ros.
- Hartmut