Commit graph

43393 commits

Author SHA1 Message Date
Michael Martin 87e8d75f00 [ntoskrnl/ps]
- When deleting a Process remove the Process from the MmProcessList. Fixes random NonPaged Pool corruptions.  Thanks aicom for assistance.

svn path=/trunk/; revision=48632
2010-08-28 00:26:02 +00:00
Michael Martin a9e0dc23a4 [ntoskrnl/ps]
- Acquire and Release RundownProtection on the Parent Pocess not the newly created Pcess when setting the SectionObject.

svn path=/trunk/; revision=48631
2010-08-27 22:18:10 +00:00
Timo Kreuzer 3a325683bc [WIN32K]
- Rework EngSetPointerShape, to first allocate the neccessary surfaces, before deleting the old ones. Also check in IntShowMousePointer if a saving surface is present. This way a failure to allocate a surface will not result in a crash, but keep the old mouse pointer.

See issue #5402 for more details.

svn path=/trunk/; revision=48630
2010-08-27 10:57:54 +00:00
Timo Kreuzer cb6ae2faab [USER32]
- Revert r47238 as requested by Giannis: "this commit breaks any program that wants to subclass mdi client windows"

svn path=/trunk/; revision=48629
2010-08-27 10:20:25 +00:00
Cameron Gutman b0a5ac396e [OSKITTCP]
- Only tell the caller how much we sent/received if it completed successfully
- Set SO_DONTROUTE on accepted sockets too
- Disable the core routing code
- Make our MSS calculation much better by sharing the existing code

svn path=/trunk/; revision=48628
2010-08-27 04:46:04 +00:00
Colin Finck 9f187ad465 Fix building on newer Linux systems (particularly Fedora 13)
Thanks to James, Sylvain and ErVito for testing!

See http://reactos.org/pipermail/ros-dev/2010-August/013338.html for more details

svn path=/trunk/; revision=48627
2010-08-26 18:33:46 +00:00
Timo Kreuzer e04ebf1980 [NTOSKRNL]
- Fix to PpSetCustomTargetEvent(), not to make caller wait forever in case it provided an event it waits for
- Patch by Pierre Schweitzer

svn path=/trunk/; revision=48626
2010-08-26 15:25:33 +00:00
Timo Kreuzer 6ddec3f063 Fix build
svn path=/trunk/; revision=48625
2010-08-26 02:48:03 +00:00
Cameron Gutman 0553d5160c [OSKITTCP]
- Prevent multiple wakeups for the same event which caused nasty problems for the SEL_FIN event because we dereferenced our connection context 3 times which not only caused the connection endpoint to be freed while holding its spin lock but made the reference count negative
[TCPIP]
- Disassociate the address file from the connection endpoint before dereferencing/closing it to avoid a double dereference of the address file (not as harmful in this case as in the connection endpoint case)
[IP]
- Dereference the connection endpoint again if it was associated with an address file as the connection endpoint to fix a reference leak

svn path=/trunk/; revision=48624
2010-08-26 02:29:38 +00:00
Timo Kreuzer 1b2ab4ce31 [NTDLL_APITEST]
- Add a test for RtlInitializeBitMap.

svn path=/trunk/; revision=48623
2010-08-26 02:29:19 +00:00
Timo Kreuzer da3e12b450 delete old Zwcontinue test
svn path=/trunk/; revision=48622
2010-08-25 10:15:34 +00:00
Timo Kreuzer 14d5a266b3 [ROSTESTS]
- Add wine style ntdll_apitest and move test for ZwContinue there

svn path=/trunk/; revision=48621
2010-08-25 10:15:01 +00:00
Timo Kreuzer 57434c8ebf Add missing files
svn path=/trunk/; revision=48620
2010-08-25 08:50:10 +00:00
Timo Kreuzer ecc6804976 [APITESTS]
Convert dciman32api, user32api and wa2_32 into wine style tests

svn path=/trunk/; revision=48619
2010-08-25 08:48:55 +00:00
Timo Kreuzer 967f731f6a [FASTFAT]
- "Fix for a stupid mistake"
- patch by Pierre Schweitzer

svn path=/trunk/; revision=48618
2010-08-25 08:29:52 +00:00
Timo Kreuzer e3a2103631 Convert gdi32api into wine style test
svn path=/trunk/; revision=48617
2010-08-24 13:54:10 +00:00
Timo Kreuzer bc064d7ed4 Fix copy paste error in file header
svn path=/trunk/; revision=48616
2010-08-24 05:27:39 +00:00
Timo Kreuzer fdd4f2b50b [REGTESTS]
Add bugs_regtest. This can be used to create testcases / regression tests for already fixed bugs. I added a first test for bug 3481

svn path=/trunk/; revision=48615
2010-08-24 05:20:16 +00:00
Timo Kreuzer 337a1faad6 [WINGDI.H]
Add missing GetCharWidthI, GetTextExtentExPointI, GetTextExtentPointI

svn path=/trunk/; revision=48614
2010-08-24 05:19:31 +00:00
Cameron Gutman 0ea1a11d0d - Revert the change from REG_SZ to REG_MULTI_SZ because it turns out that Windows does it this same way (research fail?)
svn path=/trunk/; revision=48611
2010-08-23 21:11:01 +00:00
Timo Kreuzer 2ddee30677 [NTOSKRNL]
- Rewrite MiFindEmptyAddressRangeDownTree. The old implementation's "most awesome loop" duplicated both the initialization and the interation steps. It was also overcomplicated. The new implementation additionally returns the parent for the following table insertion, so this doesnt need to be done in an extra search. The return value is changed from NTSTATUS to TABLE_SEARCH_RESULT
- Modify MiInsertNode to accept a parent and TABLE_SEARCH_RESULT instead of searching for a free location.
- Modify MiCreatePebOrTeb to make use of the new features
- Handle failed allocation of the PEB/TEB
- Fixes a failed assertion that Olaf got
- I tested this code quite some time and no problems were found

svn path=/trunk/; revision=48606
2010-08-23 03:00:03 +00:00
Timo Kreuzer b8e0dc9948 [WIN32K]
Seperate DC_vSetLayout from NtGdiSetLayout and save the old value before setting the new one.

svn path=/trunk/; revision=48605
2010-08-23 01:41:56 +00:00
Timo Kreuzer 7aa6c115ea [WIN32K]
Move the allocation of the vis region of the DC to a later position, so that all mandatory fields are initialized before we try to delete the DC in failure case. Fixes yet another possible crash.

svn path=/trunk/; revision=48604
2010-08-23 01:39:28 +00:00
Timo Kreuzer 35eedf6749 [NDK]
Add LdrProcessRelocationBlockLongLong. Fixes build, sorry.


svn path=/trunk/; revision=48603
2010-08-23 01:18:09 +00:00
Cameron Gutman 8d77a3fe00 [TCPIP]
- Read the IP information from the interface key inside the Tcpip service key (confirmed on XP)
- Fix a logic error in my code (no idea how I missed it)
- Restores static IP functionality (still waiting on janderwald to fix netcfgx's DNS value writing)

svn path=/trunk/; revision=48602
2010-08-23 01:17:41 +00:00
Timo Kreuzer ca6ff51038 [NTDLL]
- Call LdrProcessRelocationBlockLongLong from LdrProcessRelocationBlock instead of duplicating the code

svn path=/trunk/; revision=48601
2010-08-23 01:16:42 +00:00
Amine Khaldi 3957ae1572 [FAULTREP]
- Fix a typo.

svn path=/trunk/; revision=48600
2010-08-23 00:02:06 +00:00
Timo Kreuzer 314e02e2f0 [WIN32K] / [GDI32]
- GetTextExtentExPointI and GetTextExtentPointI take an array of glyph indices, not characters. Pass a flag GTEF_INDICES (This is a reactos specific definition and not exactly like on Windows XP, but the real names/values are undocumented and this is the easiest way.) to NtGdiGetTextExtent/NtGdiGetTextExtentExW and handle this flag in TextIntGetTextExtentPoint to account for this.
Fixes bug 3481

svn path=/trunk/; revision=48597
2010-08-22 23:38:02 +00:00
Timo Kreuzer dfce6bb843 [WIN32K]
- When doing a cleanup for a DC, check, if the default brushes are set, before dereferencing them. Fixes a possible kernel mode crash.
- Remove some obsolete casts

svn path=/trunk/; revision=48595
2010-08-22 22:44:36 +00:00
Cameron Gutman 617f243c3f [DHCPCSVC]
- Write the DNS servers in a REG_MULTI_SZ value
[IPHLPAPI]
- Rewrite the registry reading code
- Use HeapFree to free memory from the allocated from heap

svn path=/trunk/; revision=48593
2010-08-22 22:22:27 +00:00
Amine Khaldi f8199cb9e0 [PSDK]
- Improve _MSC_VER related conditions.
- Comment on #endif (for readability).
- DECLSPEC_ALIGN : moar underscores !
- Apply a consistent formatting.

svn path=/trunk/; revision=48590
2010-08-22 13:25:10 +00:00
Cameron Gutman 7f865763fa [NTOSKRNL]
- Fix a typo that broke handling of DevicePropertyEnumeratorName inside IoGetDeviceProperty

svn path=/trunk/; revision=48583
2010-08-21 22:08:00 +00:00
Timo Kreuzer 9280f1e1c3 [WIN32K]
Use the object type index, not the shifted full object type to decide what to do with an object in NtGdiDeleteObjectApp. Fixes leaking derived types such as pens.

svn path=/trunk/; revision=48582
2010-08-21 22:00:50 +00:00
Cameron Gutman 0d3516871b [NTOSKRNL]
- Don't overwrite the ACPI hardware key on every boot

svn path=/trunk/; revision=48581
2010-08-21 21:39:53 +00:00
Cameron Gutman 68eef5481f [NTOSKRNL]
- Append the DLL name and NULL terminate the string more nicely

svn path=/trunk/; revision=48580
2010-08-21 21:25:07 +00:00
Timo Kreuzer 80cc3a0e88 [WIN32K]
- Allocate the DCs prgnVis in DC_AllocDC, instead of "on demand" in GdiSelectVisRgn and properly handle failure case. This fixes a possible crash, when running out of gdi handles.

svn path=/trunk/; revision=48579
2010-08-21 19:55:09 +00:00
Timo Kreuzer 02cb45ab9c [WIN32K]
- co_IntTranslateMouseMessage: properly initialize *HitTest and only send WM_NCHITTEST when the message is going to be removed
- co_IntPeekMessage: Prevent possible use of uninitialized HitTest by ProcessMouseMessage()
- Patch by Jan Roeloffzen [jroeloffzen at hotmail dot com]
- Fixes bug 2139

svn path=/trunk/; revision=48576
2010-08-20 19:24:48 +00:00
Amine Khaldi ca4003c9f8 [PSDK]
- Add missing DISPLAY_BRIGHTNESS and some related definitions.

svn path=/trunk/; revision=48575
2010-08-20 16:55:33 +00:00
Cameron Gutman 5122323eb8 [NTOSKRNL]
- The trailing NULL is NOT included in the string length
- IopNotifyPlugPlayNotification needs a pointer to an actual GUID not a UNICODE_STRING
- The Power Manager can now see ACPI power devices again
- ROS will now do a graceful shutdown and power off if the power button is pressed and ACPI is enabled

svn path=/trunk/; revision=48574
2010-08-20 04:45:25 +00:00
Cameron Gutman 1883a6f208 [ACPI]
- Do all of the work inside the DPC so we don't have IRQL issues when entering the memory manager
- This is a slight hack but we can be assured that data won't be over 24 bits unless somebody wants to push the power/sleep button over 16 million times

svn path=/trunk/; revision=48573
2010-08-20 03:08:50 +00:00
Cameron Gutman 62f520433c [NTOSKRNL]
- Shutdown the system if we receive a SYS_BUTTON_POWER event
- Register for GUID_DEVICE_LID arrival events so we can receive lid events

svn path=/trunk/; revision=48572
2010-08-20 02:27:05 +00:00
Cameron Gutman ab9dae987d [NTOSKRNL]
- Add a special case to IopInitializeDevice for raw devices
- Call IopInitializeDevice to set up our device node and ready it to start
- Fixes assertions hit by ACPI and PCIX

svn path=/trunk/; revision=48570
2010-08-19 23:26:44 +00:00
Cameron Gutman 8d8399c2e5 [OSKITTCP]
- Disable routing because oskit needs to let our code do that
- Comment out the ACK hack and restore the default BSD behavior

svn path=/trunk/; revision=48569
2010-08-19 22:15:58 +00:00
Michael Martin 6a0074f795 [Win32k]
- For SetTimer nIDEvent can be 0 in which case return 1. Zero still needs to be used for nIDEvent when killing the timer. Fixes bug 5553.
- Modify windowless timers to use IDEvent values decrementing from the max number of windowless timers vice incrementing from 1. Done to match windows behavior.


svn path=/trunk/; revision=48568
2010-08-19 10:52:36 +00:00
Timo Kreuzer f87ad01e1a [NTOSKRNL]
- Add missing parentheses. Fixes "cont"

svn path=/trunk/; revision=48567
2010-08-19 10:03:03 +00:00
Timo Kreuzer 681307ff21 [NTOSKRNL]
Fix handling of next instruction in kdbg.
Patch by Daniel Zimmermann, modified by Aleksey Bragin

See issue #4457 for more details.

svn path=/trunk/; revision=48566
2010-08-19 09:03:36 +00:00
Timo Kreuzer 6fb40574c2 [NTOSKRNL]
- Implement support for /BURNMEMORY option.
- Don't stop boot on bad memory type
Patch by Jay Smith, modified by Aleksey, even more modified by me.

See issue #4957 for more details.

svn path=/trunk/; revision=48565
2010-08-19 08:50:23 +00:00
Cameron Gutman 44e8a7f7b6 [NETSTAT]
- Allocate memory for the TCP table properly
- Only netstat -a should show UDP connections
- Patch by Jan Roeloffzen [jroeloffzen at hotmail dot com]

svn path=/trunk/; revision=48564
2010-08-19 06:25:20 +00:00
Cameron Gutman f2d4e1a828 [IPHLPAPI]
- Copy our TCP table into the caller's buffer if we actually get one (not yet!)
- Return ERROR_NO_DATA if we fail to get anything from TCP/IP
- Fixes bug #4185

svn path=/trunk/; revision=48563
2010-08-19 06:05:35 +00:00
Timo Kreuzer 5ae5a35726 [NTOSKRNL]
- Initialize the Parent member of the new Vad to NULL. This also initializes the Balance to 0 aka RtlBalancedAvlTree
Should fix the failed assertion that randomly occurs.

svn path=/trunk/; revision=48562
2010-08-19 05:10:16 +00:00