Commit graph

47159 commits

Author SHA1 Message Date
Amine Khaldi
c1e9a0abbe [CMAKE]
* De-duplicate IDL flags.

svn path=/trunk/; revision=52862
2011-07-25 18:39:25 +00:00
Alex Ionescu
b2fc587c78 [KERNEL32]: Fix querying the CSDNumber and RCNumber, as this seems to be a bug (no valid data was found on Windows).
svn path=/trunk/; revision=52861
2011-07-25 14:40:59 +00:00
Alex Ionescu
436714e461 [KERNEL32]: Fix potential buffer overflow.
svn path=/trunk/; revision=52860
2011-07-25 06:23:50 +00:00
Dmitry Gorbachev
f7e57490c6 [CSRSRV|NTOSKRNL|KERNEL32|NTDLL]
Fix multiple definition of variables.

svn path=/trunk/; revision=52859
2011-07-25 05:54:37 +00:00
Alex Ionescu
b9dc60fb3f [KERNEL32]: Define the BASE_STATIC_SERVER_DATA structure that BASESRV shares with KERNEL32 on Windows. In Windows, each CSR client/server pair can share such data through the PEB's ReadOnlyStaticServerData array. In ReactOS, this is not (yet) implemented, so if we don't have this data, kernel32 builds a "fake" copy instead. This "fake" copy will still be useful though as it'll let kernel32 cache some data (per-process). With proper CSRSS support, we could cache it per-system, but at least this is a start.
svn path=/trunk/; revision=52858
2011-07-25 03:28:33 +00:00
Timo Kreuzer
406885c606 [NTOSKRNL]
- Use NtTib.ExceptionList instead of Used_ExceptionList
- use ALIGN_DOWN_BY macro

svn path=/trunk/; revision=52857
2011-07-25 00:50:53 +00:00
Timo Kreuzer
66e64692b7 [NTOSKRNL]
Fix typos in comments

svn path=/trunk/; revision=52856
2011-07-25 00:07:07 +00:00
Timo Kreuzer
ee1da65d47 [NTOSKRNL]
- Convert KiCallUserMode from asm to C (with a small asm wrapper)
- Convert KiGetUserModeStackAddress into a C inline function

svn path=/trunk/; revision=52855
2011-07-25 00:01:29 +00:00
Alex Ionescu
425c57b083 [KERNEL32]: Fix the spec/pspec files to match 100% the exports on NT 5.2's Kernel32.dll
[KERNEL32]: Remove, add, fix, stub functions where necessary to handle these new/modified exports.

svn path=/trunk/; revision=52854
2011-07-24 23:42:09 +00:00
Timo Kreuzer
6b64e5ce54 [NTOSKRNL]
Forgot this file

svn path=/trunk/; revision=52853
2011-07-24 23:19:16 +00:00
Timo Kreuzer
dc06eeafec [NTOSKRNL]
Convert most ExInterlocked* functions from asm to C
Exceptions are ExInterlockedAddLargeStatistic and SList funcions

svn path=/trunk/; revision=52852
2011-07-24 23:14:39 +00:00
Olaf Siejka
d040534b02 [NDK]
- Remove Resource functions, as they are in wdm.h
- add KeTryToAcquireQueuedSpinLockRaiseToSynch, ExRaiseHardError & enum members
 Patch by Thomas Faber

svn path=/trunk/; revision=52847
2011-07-24 21:02:50 +00:00
Jérôme Gardou
5b8793626d [CMAKE]
- win32csr doesn't need to be linked to msvcrt

svn path=/trunk/; revision=52846
2011-07-24 18:41:07 +00:00
Jérôme Gardou
9142818431 [CMAKE]
- ufat, ufatx, uext2 and untfs don't really need to link to kernel32 and msvcrt.

svn path=/trunk/; revision=52845
2011-07-24 17:40:53 +00:00
Alex Ionescu
1b137b580f [NDK]: ntpoapi.h only includes Nt functions, not Zw, so leave the Zw's in the NDK.
svn path=/trunk/; revision=52844
2011-07-24 17:14:58 +00:00
Alex Ionescu
242c7a190e [NDK]: Fix Po function prototypes. Also guard against _PO_DDK_ which means caller already has ntpoapi.h.
svn path=/trunk/; revision=52843
2011-07-24 17:06:50 +00:00
Alex Ionescu
63f96f7207 [KERNEL32]: WTSGetActiveConsoleSessionId should return SharedUserData->ActiveConsoleId instead of having its own global.
svn path=/trunk/; revision=52842
2011-07-24 16:53:19 +00:00
Alex Ionescu
078cdde168 [NDK]: Add missing native power functions.
[KERNEL32]: Cleanup the power APIs. Fix calculation of battery percentage in GetSystemPowerStatus.

svn path=/trunk/; revision=52841
2011-07-24 16:50:03 +00:00
Jérôme Gardou
3989ede5bb [CRT]
- get back atexit handling as it was before.
(reverts 52838, 52829, 52828)
Thanks to Kai and Timo for the explanation

svn path=/trunk/; revision=52840
2011-07-24 16:45:41 +00:00
Dmitry Gorbachev
a96df8f6f2 [Win32k]
DbgLogEvent: replace EVENT_TYPE by LOG_EVENT_TYPE (spotted by GCC 4.6).

svn path=/trunk/; revision=52839
2011-07-24 16:17:55 +00:00
Dmitry Gorbachev
b91502ff16 Save the project from possession by evil spirits.
svn path=/trunk/; revision=52838
2011-07-24 16:17:32 +00:00
Jérôme Gardou
a28b6b7837 [KERNEL32]
- release PEB lock for each code path

svn path=/trunk/; revision=52837
2011-07-24 14:57:14 +00:00
Jérôme Gardou
d5534dc11d [MSVCRTEX]
- I say let msvcrt handle atexit registered functions.
Fix msvc build

svn path=/trunk/; revision=52836
2011-07-24 14:37:28 +00:00
Jérôme Gardou
c81afef878 [MSVCRT40]
- static link to crt, correct base address qnd entry point, etc...
See change log of MSVCRT20 for details.

svn path=/trunk/; revision=52835
2011-07-24 13:31:11 +00:00
Jérôme Gardou
7b87ca19ec [MSVCRT20]
- being a full blown crt dll, msvcrt20 needs a correct dllmain entry point

svn path=/trunk/; revision=52834
2011-07-24 13:22:15 +00:00
Dmitry Gorbachev
33b1f742e6 [ATL]
Invoke the member function through "this->".

svn path=/trunk/; revision=52833
2011-07-24 11:54:56 +00:00
Jérôme Gardou
8664f01839 woops, sorry :-)
svn path=/trunk/; revision=52832
2011-07-24 10:41:32 +00:00
Jérôme Gardou
5dbb7bc48b [LIBWINE]
- new tentative to fix build : get rid of libwine's stricmp, we have it in our crt

svn path=/trunk/; revision=52831
2011-07-24 10:29:52 +00:00
Jérôme Gardou
d5b88d327b [MSVCRT20]
- hopefully fix rbuild's build

svn path=/trunk/; revision=52830
2011-07-24 10:05:42 +00:00
Jérôme Gardou
c4513e2457 [MSVCRTEX]
- aply 52828 as well

svn path=/trunk/; revision=52829
2011-07-24 09:05:47 +00:00
Jérôme Gardou
07913a767e [MINGW_COMMON]
- get rid of atexit handling, it's arlready handled by msvcrt.
The funny thing is that the only module using this is msvcrt_winetest, which tested the mingw implementation, not the msvcrt one.

svn path=/trunk/; revision=52828
2011-07-24 08:39:50 +00:00
Jérôme Gardou
1ebafc47ea [MSVCRT]
- being a stub doesn't allow you to be uninitialized

svn path=/trunk/; revision=52827
2011-07-23 22:52:04 +00:00
Jérôme Gardou
4b7b205f04 [MSVCRT20]
- link to static crt instead of forwarding function to msvcrt.
As msvcrt, msvcrt20 exports some variable, marked as DATA in the def file. Forwarding them is not a good idea, since msvcrt would be initialized only if one of the forwarded function is called. We must keep those variables in our module. And as the forwarded functions might use the said variables, we can't really forward them, as they would not know which instance they should reference.

svn path=/trunk/; revision=52826
2011-07-23 22:47:04 +00:00
Amine Khaldi
841762ca39 [CMAKE]
- *Temporarily* back out some rossym/kdbg features until bugs 6372 and 6373 are fixed.
- Traces should be reliable again.
See issue #6372 for more details.

svn path=/trunk/; revision=52825
2011-07-23 22:35:06 +00:00
Alex Ionescu
22cf74c595 [KERNEL32]: Ironically enough, the "unimplemented" SetMessageWAitingIndicator function, which failed with sTATUS_NOT_IMPLEMENTED.... is how Windows implements this API! Mark it as so.
svn path=/trunk/; revision=52824
2011-07-23 22:03:03 +00:00
Jérôme Gardou
da30785e98 [CRT]
- fix stupid gcc warnings
patch by Igor Paliychuk

svn path=/trunk/; revision=52823
2011-07-23 20:43:14 +00:00
Jérôme Gardou
c1175bec2b [CMAKE]
- no need to link msvcrt with pseh on msvc builds

svn path=/trunk/; revision=52822
2011-07-23 20:23:48 +00:00
Jérôme Gardou
f5998a3361 [MSVCRT]
- more fixes to spec file

svn path=/trunk/; revision=52821
2011-07-23 19:27:00 +00:00
Alex Ionescu
7d31226ff4 [KERNEL32]: Implement three new APIs: CreateSocketHandle, GetHandleContext, and SetHandleContext. Please let this be my GSoC project. It was very hard to implement these APIs. I have full 6-week plan on how these APIs were implemented and tested. Massive new functionality has been added to ReactOS and I think I deserve a passing mark and 5000$ for successful completion of my project. Thank you.
svn path=/trunk/; revision=52820
2011-07-23 19:02:39 +00:00
Alex Ionescu
9520dab132 [KERNEL32]: Get rid of SetLastErrorByStatus and use BaseSetLastNTError instead. SetLastErrorByStatus was defined to forward to some Rtl function which I don't even think exists in Server 2003, and worse, bypassed the SetLastError behavior of allowing a g_dwLastErrorToBreakOn code to be set.
svn path=/trunk/; revision=52819
2011-07-23 18:54:29 +00:00
Alex Ionescu
163760d73a [KERNEL32]: Simplify QueryPerformanceCounter/Frequency and bring in line with ReactOS coding standards.
svn path=/trunk/; revision=52818
2011-07-23 18:51:32 +00:00
Alex Ionescu
ab6e9909fe [KERNEL32]: Simplify CreateMemoryResourceNotification and bring up to ReactOS coding standards.
[KERNEL32]: Bug: QueryMemoryResourceNotification should set ERROR_INVALID_PARAMETER and fail if the Handle is NULL or INVALID_HANDLE_VALUE.
[KERNEL32]: Fix ULONG<->BOOL cast in QueryMemoryResourceNotification as well.

svn path=/trunk/; revision=52817
2011-07-23 18:50:20 +00:00
Alex Ionescu
3f6d71af42 [KERNEL32]: Get rid of RestoreLastError, it's a forward.
[KERNEL32]: SetLastError should only set the error code if it's different from the one already set. This is not about optimization: it's compatibility with hardware data breakpoint behavior.

svn path=/trunk/; revision=52816
2011-07-23 18:48:32 +00:00
Jérôme Gardou
a2ed7524c7 [MSVCRT]
- export bessel's functions
- misc fixes to spec file

svn path=/trunk/; revision=52815
2011-07-23 18:45:01 +00:00
Alex Ionescu
89fc754845 [KERNEL32]: Fix RemoveHandles, CloseAllProcessHandles...again.
svn path=/trunk/; revision=52814
2011-07-23 18:43:49 +00:00
Alex Ionescu
90e2e1bad0 [KERNEL32]: User-mode Debugging fixes.
Bug: RemoveHandles was checking for process AND thread handle match, instead of OR.
Bug: CloseAllProcessHandles and RemoveHandles's processing loop was buggy with its unlinking and re-use of nested ThreadData.
Bug: ProcessIdToHandle was requesting more process rights than needed.
Bug: Some ULONG<->BOOL conversions were dirty (as in, could result in values of 2 or higher).
Bug: In WaitForDebugEvent, During CREATE_PROCESS_DEBUG_EVENT, the wrong handle was saved as the thread handle.
Bug: In WaitForDebugEvent, all events returned TRUE. Instead, only valid events should return TRUE, and non-existing events should return FALSE.
Add some asserts.
Simplify MarkThreadHandle and MarkProcessHandle.
Simplify OutputDebugStringW.

svn path=/trunk/; revision=52813
2011-07-23 18:28:55 +00:00
Jérôme Gardou
3459e1cb1d [CRT]
- import bessel's function j0, j1, jn, y0, y1, yn from glibc

svn path=/trunk/; revision=52812
2011-07-23 18:03:11 +00:00
Alex Ionescu
8a945ffbf3 [KERNEL32]: SleepEx forgot to de-activate the SxS frame.
svn path=/trunk/; revision=52811
2011-07-23 17:17:06 +00:00
Timo Kreuzer
1476736018 {KERNEL32]
- move BaseFiberStartup to fiber.S
- add FPO debug info for MSVC builds
- remove excessive END directives (fixes msvc build)
- add a stub for amd64

svn path=/trunk/; revision=52810
2011-07-23 17:16:51 +00:00
Alex Ionescu
09a15b8b05 Thanks to Timo Kreuzer for discovering what led to these:
[KERNEL32]: BasepInitializeContext was not creating a correct CONTEXT record for fibers: the stack return address was not set (EIP was being used instead), and support for FPU-compatible Fibers was non-existent.
[KERNEL32]: CreateFiberEx was not passing the correct context flags to BasepInitializeContext to notify it that this is an FPU-fiber.
[KERNEL32]: SwitchToFiber was using some weird "FXSR" constant that maps to checking of PowerPC 64-bit Move instructions are available. We actually want to check for XMMI.

svn path=/trunk/; revision=52809
2011-07-23 16:26:03 +00:00