Commit graph

2996 commits

Author SHA1 Message Date
Amine Khaldi 136add67b0 * Remove deprecated resource file loading and memory attributes (http://msdn.microsoft.com/en-us/library/aa380908.aspx).
CORE-7471 #resolve

svn path=/trunk/; revision=60650
2013-10-13 22:31:17 +00:00
Hermès Bélusca-Maïto eb9d268653 [CSRSRV]: In CsrCaptureArguments, be sure that the number of captured pointers is at most equal to MAXUSHORT (and not the total length of the captured buffer).
svn path=/trunk/; revision=60561
2013-10-06 14:20:18 +00:00
Hermès Bélusca-Maïto 46e2b227f2 [CSR]
During my investigations for making working Win2k3 csrsrv.dll (or other CSR servers) into ROS (to compare our behaviour with our own csrsrv.dll and Win2k3 one), I hit a problem: if I test a checked-build version of csrsrv (or other CSR servers), everything was fine when they were loaded, but if I use a release-build version (i.e. without any debug information), I systematically hit a memory access violation which was traced back to the moment when a CSR server's CsrInitialization entry point was called.
So I did the experiment, where I used our (debug-build) csrsrv with a free-build win2k3 CSR server dll (it was winsrv.dll, and I retested with basesrv.dll after). I hit the access violation. But if I took a debug-build version of winsrv.dll, everything was OK.
I then added in our csrsrv' server.c file the following line (around line 212 of the current file version):
DPRINT1("%s ; ServerDll->ValidTable = 0x%p ; ServerDll->NameTable = 0x%p ; ServerDll->SizeOfProcessData = %d ; ServerDll->ConnectCallback = 0x%p\n", DllString, ServerDll->ValidTable, ServerDll->NameTable, ServerDll->SizeOfProcessData, ServerDll->ConnectCallback);
and I saw that, when using a debug-build win2k3 CSR server, everything was fine (in particular the ServerDll->SizeOfProcessData member contained a reasonable value, e.g. a size of 88 bytes), whereas if I used a free-build version, I got an off-by-one problem, with the ServerDll->ValidTable pointer valid but the ServerDll->NameTable member being equal to 88 (i.e. invalid pointer) and the ServerDll->SizeOfProcessData member being equal to a very large value, which looked like a pointer value.
After more investigations, I saw that in debug-build CSR servers the list of API names were stored, whereas it was not the case in free-build versions. Therefore I concluded that the API names table was included *ONLY* in debug builds and not in release builds.

Hence, to be able to test in ROS either debug-builds or release-builds versions of Windows CSR servers in ROS (and vice-versa), I introduced a #define called CSR_DBG, which is defined only if the DBG macro is != 0, and which is not defined otherwise. When the CSR_DBG flag is defined, API names tables are added in CSR servers and otherwise, they are not.

Therefore, we are now able to test debug-build Windows CSR servers in ROS (the default possibility) or free-build versions of these CSR servers (but first, we have to build the other ones without the CSR_DBG flag, to avoid the off-by-one problem described above).

svn path=/trunk/; revision=60560
2013-10-06 13:33:17 +00:00
Hermès Bélusca-Maïto c67aad2c5d [CSRSRV]: Fix long-time SMSS port name typo (it is SbApiPort).
svn path=/trunk/; revision=60556
2013-10-06 00:30:29 +00:00
Hermès Bélusca-Maïto f308eed7ef [CSRSRV]: Less PPORT_MESSAGE casts.
svn path=/trunk/; revision=60555
2013-10-06 00:04:18 +00:00
Hermès Bélusca-Maïto f73271123c [CSRSRV]: Add the 0x prefix when we display some hex output.
svn path=/trunk/; revision=60554
2013-10-05 23:56:12 +00:00
Hermès Bélusca-Maïto 2739584249 [CSRSRV][CONSRV]
- Fix the second parameter WaitType (aka. NotifyAll) of CsrNotifyWait. Indeed, we used before the constants WaitAll == 0 / WaitAny == 1 (see the WAIT_TYPE enum); however, it appeared that Win2k3's CsrNotifyWait wanted a WaitType parameter == 1 when waiting for all the waits in a given wait-list. Therefore we would have to use WaitAll for waiting for any of the wait blocks, and WaitAny for waiting for all the wait blocks... looks illogical. Therefore I use instead a BOOLEAN variable (that I call NotifyAll) which is TRUE when I want to wait for all the wait blocks, and FALSE otherwise (as done e.g. for the WaitForMultipleObjects API).
- Fix its usage in CONSRV.

Magically fix key presses problems in console, when using Win2k3 csrsrv.dll ...

svn path=/trunk/; revision=60551
2013-10-05 22:17:34 +00:00
Hermès Bélusca-Maïto 03a6dfe408 Forgot this one.
svn path=/trunk/; revision=60542
2013-10-05 20:10:06 +00:00
Hermès Bélusca-Maïto e2de2a4610 [CSRSRV]
- Do not associate the newly created wait block to the waiting thread (in CsrInitializeWait) in case this one is going to terminate, but do it instead in CsrCreateWait, where the check actually takes place.
- Avoid PPORT_MESSAGE casts.
- Fix a list insertion problem in CsrMoveSatisfiedWait.
- Fix some descriptions / comments.

svn path=/trunk/; revision=60541
2013-10-05 20:06:47 +00:00
Hermès Bélusca-Maïto ae0bca8de5 [CSRSRV]
- Hardcoded_value--;
- Be sure SizeOfProcessData is initialized to zero before doing anything later on.

svn path=/trunk/; revision=60538
2013-10-05 17:29:27 +00:00
Hermès Bélusca-Maïto ea17b18f2b [CSRSRV]: Fix two DPRINTs.
svn path=/trunk/; revision=60537
2013-10-05 17:24:31 +00:00
Timo Kreuzer bec4ac17fc [TELNET] Don't compile it on MSVC
[CMAKE] Use the same MSVC build flags for x64 as for x86
[SMLIB] Fix MSVC warnings
[MODULES] Don't include optional modules on x64
[NTOSKRNL] Add some missing globals and definitions for x64
[CSRSRV] Fix an MSVC warning

svn path=/trunk/; revision=60325
2013-09-22 21:04:06 +00:00
Hermès Bélusca-Maïto 8ea614d505 [CSRSS]: Improve two dprints.
svn path=/trunk/; revision=60288
2013-09-21 18:38:30 +00:00
Hermès Bélusca-Maïto dd9e5ada7d [BASESRV]
Stubplement BaseSrvNlsLogon and BaseSrvNlsUpdateRegistryCache needed by Windows-2k3's WINSRV.DLL . Their return value types are unknown, but the number of parameters was obtained by reading http://wcwp.googlecode.com/svn/trunk/wcwp/bin/masm32/include/basesrv.inc .

svn path=/trunk/; revision=60287
2013-09-21 18:25:02 +00:00
Alex Ionescu b77b18fac3 [CSRSRV]: hbelusca: wait a sec ;-) Fix CsrCreateWait and CSR_WAIT_BLOCK to match Windows Server 2003 semantics, which don't have a "UserWaitList". Fix our winsrv not to call CsrCreateWait incorrectly (which corrupted the heap/stack when using windows's csrsrv.dll).
svn path=/trunk/; revision=60065
2013-09-12 21:05:58 +00:00
Alex Ionescu 45d60558d0 [NTOSKRNL]: Implement ThreadIsTermination info class in NtQueryInformationThread.
[CSRSRV]: CsrInsertThread should call this API to make sure the thread isn't dead already. Update the callers to handle this possible failure.
This behavior was obeserved in Windows' CSRSRV.DLL. It now works in ReactOS as well.

svn path=/trunk/; revision=60059
2013-09-12 09:02:48 +00:00
Alex Ionescu 951ed16a33 [USER32]: Make ClientThreadSetup return TRUE, and document how initialization should work. Enable CsrConnectToUser in CSRSRV. Works-4-me(TM).
svn path=/trunk/; revision=60058
2013-09-12 08:41:25 +00:00
Hermès Bélusca-Maïto 179f3eb806 [BASESRV]
- Fix header formatting plus windows headers inclusion.
- RtlCreateUnicodeString returns booleans, not ntstatuses, so fix the code appropriately.

svn path=/trunk/; revision=60012
2013-09-10 20:45:53 +00:00
Alex Ionescu 144100a4e2 [CSRSRV]: Update CSR_SERVER_DLL definition to Server 2003 instead of XP. Get rid of the whole initialization event stuff. This should make Windows CSRSS+CSRSRV work with our BASESRV. Thanks to Hermes for discovering there was a structure issue.
svn path=/trunk/; revision=60001
2013-09-10 08:55:09 +00:00
Alex Ionescu 02cb040946 This commit, in my opinion, marks an important milestone in ReactOS development. One is now able to boot to desktop, launch applications, download through the application manager, play solitaire, minesweeper, launch Task Manager, etc... by using an unmodified Windows 2003 kernel32.dll binary (and, until our NPFS driver is fixed, the unmodified Windows 2003 NPFS driver). Additionally, one is able to achieve the same by booting with an unmodified Windows 2003 ntdll.dll, including a combination of both. The capability to mix-and-match components such as kernel32 and ntdll, at the heart of the system, will allow to better understand apitest failures (just as Wine has long had the capability to use Windows DLLs instead). With these two building blocks, additional Windows 2003 DLLs can be dropped in/tested, etc, and where failures are seen, a likely component can now be blamed. Furthermore, debugging with public symbols for these DLLs is now possible with WinDBG (in fact, this is how many bugs were fixed in this attempt). Many issues already exist when running with this combination FYI, for example, I was not able to launch any installers (tested Firefox and MIRC). This already demonstrates either missing functionality or ReactOS-specific functionality in components which depend on kernel32. I suspect the next step is infrastructure work to get special patchbot/builders to try and report back winetest results, and for additional DLLs to be "ported"/made to work. On a final note, this mixing and matching has benefits on both ends -- it's now likely that ReactOS' ntdll can run on Server 2003, at least far enough to get to Explorer or Task Manager. Running apitests on Server 2003 with and without reactos DLLs should also easily identify if certain DLLs are directly to blame for certain regressions/failures. </end excited rant>
[BASESRV]: Allocate the INI mappings from the right heap.

svn path=/trunk/; revision=59985
2013-09-04 07:28:15 +00:00
Alex Ionescu 4edf5167a4 [BASESRV]: Add INIFILE_MAPPING structures, and set a valid IniFileMapping pointer in the shared static data. Windows' kernel32 needs this whenever an INI API is called, which is why UserInit was crashing on load (our pointer was set to NULL). Now userinit.exe loads/works, and explorer.exe is the one that fails to initialize. But one can CTRL-ALT-DEL and launch Task Manager (works!), Calc (but not Notepad).
svn path=/trunk/; revision=59984
2013-09-04 07:07:08 +00:00
Hermès Bélusca-Maïto e28e6935a6 [CMAKE]: Fix a comment typo only.
[NTDLL-KERNEL32-BASESRV-WINSRV]: Specify by hand (hackz for MSVC builds) that the dll will be a "Console DLL" (ie. not a native one nor a Gui DLL).
[BASESRV]: Explicitely set the DLL entry point to DllMain (unusued).
[WINSRV]: Explicitely set the DLL entry point to DllMain (unusued) AND REMOVE usage of msvcrt (that might pose problems when testing with Windows msvcrt etc...) and use libcntpr instead.

Thanks to Amine for having helped me in solving a problem with delayed imports.

svn path=/trunk/; revision=59933
2013-09-01 00:11:56 +00:00
Alex Ionescu 0a79700b0d [CONSRV]: One last fix to CONSRV_API_CONNECTINFO. We now have compatibility with Windows and kernel32 is much much happier.
[CONSRV]: Implement Case11 of BaseSrvNlsCreateSection, but we seem to be getting bogus locale IDs.

svn path=/trunk/; revision=59916
2013-08-31 08:30:00 +00:00
Alex Ionescu 7fc15017b3 [BASESRV]: Fix critical bug in BaseSrvNlsGetUserInfo.
svn path=/trunk/; revision=59895
2013-08-30 06:53:07 +00:00
Hermès Bélusca-Maïto 7286005d2c [BASESRV]
Fix the "fix" of r59887, i.e. add a stub for the unknown api.

svn path=/trunk/; revision=59888
2013-08-29 21:37:22 +00:00
Hermès Bélusca-Maïto def8f5f442 Here too ;)
svn path=/trunk/; revision=59887
2013-08-29 21:29:33 +00:00
Alex Ionescu 59e1a8cedf [BASESRV]: forgot to update the name table.
svn path=/trunk/; revision=59886
2013-08-29 21:27:18 +00:00
Hermès Bélusca-Maïto bd732acefd [BASESRV]
- Fix nls.c header information.
- Rename BasepUnknown to BasepDebugProcess according to j00ru's http://j00ru.vexillium.org/csrss_list/api_list.html#Windows_2k3 and what Alex_Ionescu committed in r59879 (deprecated api).

svn path=/trunk/; revision=59884
2013-08-29 21:14:49 +00:00
Alex Ionescu 103ab26886 [BASESRV]: Fix definition of NLS_USER_INFO so that it matches exactly that of Server 2003 (this now makes BASE_SERVER_STATIC_DATA correct too).
[BASESRV]: Implement BaseSrvNlsGetUserInfo.

svn path=/trunk/; revision=59882
2013-08-29 21:00:54 +00:00
Alex Ionescu ca5079dbc5 [BASESRV]: The last few APIs were off-by-one due to an unimplmented (in Windows) or deprecated api.c
[BASESRV]: Implement BaseSrvNlsCreateSection, which is needed by Windows kernel32.dll. Also implement the delay-loading functionality it needs.

svn path=/trunk/; revision=59879
2013-08-29 20:13:31 +00:00
Hermès Bélusca-Maïto 89a6f0d487 Formatting fix only.
svn path=/trunk/; revision=59877
2013-08-29 18:13:24 +00:00
Alex Ionescu 93bba5bf09 [BASESRV]: Stubplement all the APIs so that our IDs match with Windows. Windows kernel32 now dies when calling NLSCreateSection.
svn path=/trunk/; revision=59872
2013-08-29 17:00:10 +00:00
Alex Ionescu 3be526a895 [NTDLL]: Fix CsrpConnectToServer to use the correct CSR_API_CONNECTINFO structure.
[CSRSRV]: Fix definition of CSR_API_CONNECTINFO structure. It is now compatible with Server 2003. Also, set the DebugFlag.

svn path=/trunk/; revision=59864
2013-08-29 00:02:15 +00:00
Hermès Bélusca-Maïto 7e36ed9fa8 Rename CSR_CONNECTION_INFO and CONSOLE_CONNECTION_INFO to the same way as BASESRV_API_CONNECTINFO
svn path=/trunk/; revision=59781
2013-08-19 18:14:43 +00:00
Hermès Bélusca-Maïto 4203172aa0 [KERNEL32]
Use some existing #define'd constants.

[CSRSRV-BASESRV]
- Add CSR version define (based from BASESRV version define).
- Add missing BASESRV structures, taken from https://code.google.com/p/ontl/source/browse/branches/devel/ntl/nt/csr.hxx (OpenNT Native Template Library).

svn path=/trunk/; revision=59779
2013-08-19 17:50:27 +00:00
Hermès Bélusca-Maïto d1f2547346 [BASESRV]
Add vdm.c for Virtual DOS Machines management.

svn path=/trunk/; revision=59774
2013-08-18 19:46:22 +00:00
Timo Kreuzer 6320fe5192 [CSRSRV]
Use symbolic constant for number of hash buckets and use it where appropriate (fixing one missing location).

svn path=/trunk/; revision=59592
2013-07-28 13:54:42 +00:00
Timo Kreuzer 1a7d645928 [CSRSRV]
- Reduce number of hash collisions during bootup from 10 to 0, by choosing 257 (prime number = good) instead of 256 (power of 2 = bad)
- Use ULONG for CsrpStaticThreadCount and CsrpDynamicThreadTotal to fix an MSVC warning.

svn path=/trunk/; revision=59591
2013-07-28 10:41:27 +00:00
Alex Ionescu ff619fd63b [NTOSKRNL/BASESRV]: Tiny formatting clean-ups made while debugging.
svn path=/trunk/; revision=59587
2013-07-25 23:56:17 +00:00
Hermès Bélusca-Maïto be14e6b7ce Code formatting only
svn path=/trunk/; revision=58923
2013-05-04 14:29:51 +00:00
Hermès Bélusca-Maïto 2e660923f1 [CSRSRV]
- Code simplification.
- Remove unneeded casts.
- Fix comments.

svn path=/trunk/; revision=58922
2013-05-04 14:27:09 +00:00
Hermès Bélusca-Maïto 599a7affa3 [REACTOS]
Merge of the ros-csrss branch created with a three-fold purpose:

- Use the new Windows-compatible Client-Server Runtime Subsystem (csrss + csrsrv)
written by Alex Ionescu to replace the old hacked one. Also the CSR client part,
residing in ntdll, is updated. Some work also done on the dlls side, which
communicate with CSR, namely kernel32.

- Replace our very old win32csr.dll CSR server by the collection basesrv.dll /
winsrv.dll as it is done under Windows.

- Since the console subsystem is (for historical purposes on Windows) the
only subsystem which exploits all the possibilities of the CSR, I decided to
put it in a new CSR dll called 'consrv.dll', even if on Windows it is included
together with other APIs inside the winsrv dll (since Windows NT 3.1 release)
(I took the name 'consrv' from the dll where it was included in Windows NT 3.1
beta from October 1991). Some work was also done on its internal architecture
(the external interface is of course unchanged for compatibility reasons) and a
two-layer approach was developed, using the existing idea of console functions +
GUI or TUI we already had in win32csr:
	* the "console server" which dialogs with the console applications,
and which maintains a list of all the created consoles.
	* different "front-ends" corresponding to where you want to output
the information (~= console hardware) (Work-In-Progress).
Another idea would be to make those front-ends dynamically-loadable (instead
of being compiled inside consrv).
- I also fixed some parts of the console properties dialog box.

More information can be found in http://www.reactos.org/archives/public/ros-dev/2013-April/016121.html

CORE-122 CORE-2510 CORE-7002 #resolve #comment Committed in revision r58xxx.

svn path=/trunk/; revision=58770
2013-04-15 19:32:00 +00:00
Hermès Bélusca-Maïto d0fa874320 Remove the unneeded $Id$ blabla from the source code. (Part 2/N)
svn path=/trunk/; revision=58500
2013-03-14 21:04:13 +00:00
Hermès Bélusca-Maïto 0823512b4a - Remove ALL the unneeded "author date id revision" svn properties.
- Remove the erroneous svn:eol-syle or svn:eol-stlye properties (and replace them by svn:eol-style)

svn path=/trunk/; revision=58489
2013-03-13 23:50:08 +00:00
Amine Khaldi 2bd930547c * Slap *some* sense into our header inclusions.
* This significantly shrinks the dependency tracking data and the compiled objects size, which speeds up the whole build process (especially the incremental builds) accelerating the daily development as a result.
* No intended code changes, ~27% smaller build. Enjoy ;)

svn path=/trunk/; revision=58214
2013-01-24 23:00:42 +00:00
Amine Khaldi 9c783fd0df [CMAKE]
* Remove unneeded set_rc_compiler.

svn path=/trunk/; revision=57966
2012-12-22 10:47:06 +00:00
Hermès Bélusca-Maïto 65ce146169 Create a branch for working on csrss and co.
svn path=/branches/ros-csrss/; revision=57561
2012-10-14 13:04:31 +00:00
Hermès Bélusca-Maïto 679f8cec0e [CSRSS]
Code formatting only.

svn path=/trunk/; revision=57558
2012-10-14 11:46:22 +00:00
Hermès Bélusca-Maïto 2a51f3967e [CSRSRV]
- Remove $Id$ property.
- Correct misspellings : "othwerwise" --> "otherwise" and "(de)refence" --> "(de)reference".
- Add missing functions' documentation (from the old CSRSRV).
- Add some useful comments.

svn path=/trunk/; revision=57556
2012-10-13 20:32:44 +00:00
Hermès Bélusca-Maïto 779ce9effe [CSRSS/CSRSRV]
- Do not compile anymore the old CSRSS.
- Update some headers and resource files.
- Add header guards in srv.h

svn path=/trunk/; revision=57402
2012-09-27 18:44:50 +00:00