reactos.git
13 years ago[usb/usbehci]
Michael Martin [Sun, 5 Sep 2010 18:43:17 +0000 (18:43 +0000)]
[usb/usbehci]
- Fix flags settings for PortStatus and PortChange so that the correct flags are set when hub driver sets/requests them.
- Use FastMutex to protect access to async queue and frame list.
- For USB CONFIG DESC, Check the output buffer size before attempting to write all configuration descriptors.
- Fix a bug that caused bmRequestType to be incorret value when requesting configuration and string descriptors.
- Modify some debugging to make it easier to see debug messages from usbhub driver.

svn path=/trunk/; revision=48704

13 years ago[USETUP]
Cameron Gutman [Sun, 5 Sep 2010 17:09:18 +0000 (17:09 +0000)]
[USETUP]
- Add the option to write only the VBR so FreeLoader can easily be chain loaded by GRUB or another boot loader
- Dedicated to James Tabor :)

svn path=/trunk/; revision=48703

13 years agoUpdate the GAS compatible fathelp.S file to reflect the latest changes to the origina...
Timo Kreuzer [Sun, 5 Sep 2010 16:03:08 +0000 (16:03 +0000)]
Update the GAS compatible fathelp.S file to reflect the latest changes to the original file (freeldr PE conversion). This version is tested and works.

svn path=/trunk/; revision=48701

13 years ago[USETUP]
Cameron Gutman [Sat, 4 Sep 2010 20:56:19 +0000 (20:56 +0000)]
[USETUP]
- Remove code that was corrupting disk data and causing setup to fail in rare cases
- Write the MBR in all cases (Windows setup behavior too)
- We can overwrite GRUB and LILO now but we still can't boot because we have trouble reading the partition table if it was made in Linux

svn path=/trunk/; revision=48700

13 years ago[NTOS]: Remove useless variables in kernel code that were set, but never actually...
Sir Richard [Sat, 4 Sep 2010 08:17:17 +0000 (08:17 +0000)]
[NTOS]: Remove useless variables in kernel code that were set, but never actually used (dead code, tests, copy/pasters). If a variable was set but not used because of missing/#if'ed out code, a note was added instead.
[NTOS]: In the process, fix bugs in the Event dispatcher code that used Win32 EVENT_TYPE instead of NT KOBJECTS enumeration.
[NTOS]: Fix a bug in ObpInsertHandleCount, where the object access check was being done with the previous mode, instead of honoring the probe mode, which is defined by OBJ_FORCE_ACCESS_CHECK.
[NTOS]: Fix a bug in a section function which was always returning STATUS_SUCCESS, now it returns the result of the previous Status = function assignment. If this isn't desired, then don't check for the Status anymore.
[NTOS]: Note that MDL code does not support SkipBytes argument. If it is used, MDL could be invalid.
[NTOS]: Add checks for VerifierAllocation and set it when needed (WIP).
[NTOS]: Clarify what _WORKING_LINKER_ is, and the legal risks in continuing to use a linker that builds non-Microsoft drivers when used with headers whose EULA specify that they can only be used for Microsoft drivers.

svn path=/trunk/; revision=48692

13 years ago[OSKITTCP]
Cameron Gutman [Thu, 2 Sep 2010 04:18:17 +0000 (04:18 +0000)]
[OSKITTCP]
- Check for a shutdown connection that we missed a few times
- Remove some junk and stop playing with flags behind oskit's back
- Fix an invalid parameter check
- Enable a check to ensure that accept doesn't get called for a socket that isn't listening
- Use the queue manipulation function instead of manually changing the queue
- Signal that we accepted/connected a socket
[IP]
- Set the network mask and destination address in TCPGetInterfaceData

svn path=/trunk/; revision=48686

13 years ago[PSDK]
Aleksey Bragin [Wed, 1 Sep 2010 13:40:35 +0000 (13:40 +0000)]
[PSDK]
- Add BS_TYPEMASK definition.

svn path=/trunk/; revision=48678

13 years ago[CRT]
Amine Khaldi [Mon, 30 Aug 2010 13:48:40 +0000 (13:48 +0000)]
[CRT]
- Fix __MINGW_MSC_PREREQ logic.

svn path=/trunk/; revision=48657

13 years agoPatch by Pierre Schweitzer.
Michael Martin [Mon, 30 Aug 2010 11:51:17 +0000 (11:51 +0000)]
Patch by Pierre Schweitzer.
[CDFS]
- Several fixes for directory information query.
- Fixed a null access memory under certain circumstances.
- Added support for media ejection.
[FASTFAT]
- Fixed calls to CcMapData(), CcPinRead().
- Fixed an endless loop in FCB management under certain circumstances.
[NTOSKRNL]
- Fixed wrong prototype for IopParseDevice().

svn path=/trunk/; revision=48654

13 years ago[NTOS]: Add an extra layer of protection for freed nonpaged pool: write a 4-byte...
Sir Richard [Sun, 29 Aug 2010 19:32:25 +0000 (19:32 +0000)]
[NTOS]: Add an extra layer of protection for freed nonpaged pool: write a 4-byte signature on freed blocks, and assert its valid on checked builds. Use a slightly less egocentric ASCII value than on Windows (name of the developer who wrote the first memory manager).

svn path=/trunk/; revision=48651

13 years ago[NTOS]: Missed a bunch of codepaths, protected pool "should" work now.
Sir Richard [Sun, 29 Aug 2010 19:27:58 +0000 (19:27 +0000)]
[NTOS]: Missed a bunch of codepaths, protected pool "should" work now.

svn path=/trunk/; revision=48650

13 years ago[NTOS]: Add DRIVER_CAUGHT_MODIFYING_FREED_POOL bugcheck code.
Sir Richard [Sun, 29 Aug 2010 19:13:08 +0000 (19:13 +0000)]
[NTOS]: Add DRIVER_CAUGHT_MODIFYING_FREED_POOL bugcheck code.
[NTOS]: Add support for protected freed nonpaged pool. This is controlled through MmProtectFreedNonPagedPool, which is initialized based on a registry value (see cmdata.c). This is not "Special Pool", but a useful debugging feature Windows implements that we now have too, since I noticed a lot of mj's work was with freed pool access.
NB. It's 3AM and I have not tested this, it should be off in trunk by default, you'll need to try turning it on and testing it. Hope it helps.
--This line, and those low, will be ignored--

M    ntoskrnl/mm/ARM3/pagfault.c
M    ntoskrnl/mm/ARM3/pool.c
M    include/reactos/mc/bugcodes.mc

svn path=/trunk/; revision=48649

13 years ago[ACPI]
Cameron Gutman [Sun, 29 Aug 2010 18:40:33 +0000 (18:40 +0000)]
[ACPI]
- Read and report ACPI_RESOURCE_TYPE_FIXED_MEMORY32

svn path=/trunk/; revision=48648

13 years ago[cdfs]
Michael Martin [Sun, 29 Aug 2010 17:46:18 +0000 (17:46 +0000)]
[cdfs]
- Working with Pierre Schweitzer for yet another NonPaged Pool corruption fix. When copying VolumeLabel the VolumeLabelLength is in Unicode, so theres no need to mulitply it by size of WCHAR.

svn path=/trunk/; revision=48646

13 years ago[NTOSKRNL]
Timo Kreuzer [Sun, 29 Aug 2010 08:35:54 +0000 (08:35 +0000)]
[NTOSKRNL]
Modified version of r48640:
- update the NodeHint to the root node when deleting a node
- remove this code from MmCleanProcessAddressSpace

svn path=/trunk/; revision=48642

13 years ago[ntoskrnl]
Michael Martin [Sun, 29 Aug 2010 07:18:47 +0000 (07:18 +0000)]
[ntoskrnl]
- Revert 48640, as it was incorrect.

svn path=/trunk/; revision=48641

13 years ago[ntoskrnl]
Michael Martin [Sun, 29 Aug 2010 07:00:52 +0000 (07:00 +0000)]
[ntoskrnl]
- When a node is removed, check the NodeHint of the table to see if it matches the one being removed. If so update the NodeHint to the PreviousNode. FIxes VAD corruption messages.

svn path=/trunk/; revision=48640

13 years ago- Disable ACPI again
Cameron Gutman [Sun, 29 Aug 2010 03:51:21 +0000 (03:51 +0000)]
- Disable ACPI again

svn path=/trunk/; revision=48639

13 years ago[NTOSKRNL]
Cameron Gutman [Sun, 29 Aug 2010 03:48:59 +0000 (03:48 +0000)]
[NTOSKRNL]
- Fix a regression in ACPI function from r48581
- Enable ACPI for testing purposes (will be disabled next commit)

svn path=/trunk/; revision=48638

13 years ago[TCPIP]
Cameron Gutman [Sun, 29 Aug 2010 02:29:10 +0000 (02:29 +0000)]
[TCPIP]
- Don't allocate pool if there is nothing in the route table
- Fixes bug 5493

svn path=/trunk/; revision=48637

13 years ago[win32k]
Michael Martin [Sat, 28 Aug 2010 23:55:27 +0000 (23:55 +0000)]
[win32k]
- Mouse messages can be sent before the desktop is initialized. Check for this and return false if its not. FIxes assert when moving mouse before desktop is up.

svn path=/trunk/; revision=48636

13 years ago[input/i8042prt]
Michael Martin [Sat, 28 Aug 2010 23:23:43 +0000 (23:23 +0000)]
[input/i8042prt]
- Fix a check when queuing the mouse packet. Check that the buffer size (MouseInBuffer) is not greater or equal to MouseDataQueueSize. Fixes a NonPagedPool corruption that occurs when the mouse is moved before the desktop window is up and running.

svn path=/trunk/; revision=48635

13 years ago[ntoskrnl/ps]
Michael Martin [Sat, 28 Aug 2010 00:26:02 +0000 (00:26 +0000)]
[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

13 years ago[ntoskrnl/ps]
Michael Martin [Fri, 27 Aug 2010 22:18:10 +0000 (22:18 +0000)]
[ntoskrnl/ps]
- Acquire and Release RundownProtection on the Parent Pocess not the newly created Pcess when setting the SectionObject.

svn path=/trunk/; revision=48631

13 years ago[WIN32K]
Timo Kreuzer [Fri, 27 Aug 2010 10:57:54 +0000 (10:57 +0000)]
[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

13 years ago[USER32]
Timo Kreuzer [Fri, 27 Aug 2010 10:20:25 +0000 (10:20 +0000)]
[USER32]
- Revert r47238 as requested by Giannis: "this commit breaks any program that wants to subclass mdi client windows"

svn path=/trunk/; revision=48629

13 years ago[OSKITTCP]
Cameron Gutman [Fri, 27 Aug 2010 04:46:04 +0000 (04:46 +0000)]
[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

13 years agoFix building on newer Linux systems (particularly Fedora 13)
Colin Finck [Thu, 26 Aug 2010 18:33:46 +0000 (18:33 +0000)]
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

13 years ago[NTOSKRNL]
Timo Kreuzer [Thu, 26 Aug 2010 15:25:33 +0000 (15:25 +0000)]
[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

13 years agoFix build
Timo Kreuzer [Thu, 26 Aug 2010 02:48:03 +0000 (02:48 +0000)]
Fix build

svn path=/trunk/; revision=48625

13 years ago[OSKITTCP]
Cameron Gutman [Thu, 26 Aug 2010 02:29:38 +0000 (02:29 +0000)]
[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

13 years ago[NTDLL_APITEST]
Timo Kreuzer [Thu, 26 Aug 2010 02:29:19 +0000 (02:29 +0000)]
[NTDLL_APITEST]
- Add a test for RtlInitializeBitMap.

svn path=/trunk/; revision=48623

13 years agodelete old Zwcontinue test
Timo Kreuzer [Wed, 25 Aug 2010 10:15:34 +0000 (10:15 +0000)]
delete old Zwcontinue test

svn path=/trunk/; revision=48622

13 years ago[ROSTESTS]
Timo Kreuzer [Wed, 25 Aug 2010 10:15:01 +0000 (10:15 +0000)]
[ROSTESTS]
- Add wine style ntdll_apitest and move test for ZwContinue there

svn path=/trunk/; revision=48621

13 years agoAdd missing files
Timo Kreuzer [Wed, 25 Aug 2010 08:50:10 +0000 (08:50 +0000)]
Add missing files

svn path=/trunk/; revision=48620

13 years ago[APITESTS]
Timo Kreuzer [Wed, 25 Aug 2010 08:48:55 +0000 (08:48 +0000)]
[APITESTS]
Convert dciman32api, user32api and wa2_32 into wine style tests

svn path=/trunk/; revision=48619

13 years ago[FASTFAT]
Timo Kreuzer [Wed, 25 Aug 2010 08:29:52 +0000 (08:29 +0000)]
[FASTFAT]
- "Fix for a stupid mistake"
- patch by Pierre Schweitzer

svn path=/trunk/; revision=48618

13 years agoConvert gdi32api into wine style test
Timo Kreuzer [Tue, 24 Aug 2010 13:54:10 +0000 (13:54 +0000)]
Convert gdi32api into wine style test

svn path=/trunk/; revision=48617

13 years agoFix copy paste error in file header
Timo Kreuzer [Tue, 24 Aug 2010 05:27:39 +0000 (05:27 +0000)]
Fix copy paste error in file header

svn path=/trunk/; revision=48616

13 years ago[REGTESTS]
Timo Kreuzer [Tue, 24 Aug 2010 05:20:16 +0000 (05:20 +0000)]
[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

13 years ago[WINGDI.H]
Timo Kreuzer [Tue, 24 Aug 2010 05:19:31 +0000 (05:19 +0000)]
[WINGDI.H]
Add missing GetCharWidthI, GetTextExtentExPointI, GetTextExtentPointI

svn path=/trunk/; revision=48614

13 years ago- Revert the change from REG_SZ to REG_MULTI_SZ because it turns out that Windows...
Cameron Gutman [Mon, 23 Aug 2010 21:11:01 +0000 (21:11 +0000)]
- 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

13 years ago[NTOSKRNL]
Timo Kreuzer [Mon, 23 Aug 2010 03:00:03 +0000 (03:00 +0000)]
[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

13 years ago[WIN32K]
Timo Kreuzer [Mon, 23 Aug 2010 01:41:56 +0000 (01:41 +0000)]
[WIN32K]
Seperate DC_vSetLayout from NtGdiSetLayout and save the old value before setting the new one.

svn path=/trunk/; revision=48605

13 years ago[WIN32K]
Timo Kreuzer [Mon, 23 Aug 2010 01:39:28 +0000 (01:39 +0000)]
[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

13 years ago[NDK]
Timo Kreuzer [Mon, 23 Aug 2010 01:18:09 +0000 (01:18 +0000)]
[NDK]
Add LdrProcessRelocationBlockLongLong. Fixes build, sorry.

svn path=/trunk/; revision=48603

13 years ago[TCPIP]
Cameron Gutman [Mon, 23 Aug 2010 01:17:41 +0000 (01:17 +0000)]
[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

13 years ago[NTDLL]
Timo Kreuzer [Mon, 23 Aug 2010 01:16:42 +0000 (01:16 +0000)]
[NTDLL]
- Call LdrProcessRelocationBlockLongLong from LdrProcessRelocationBlock instead of duplicating the code

svn path=/trunk/; revision=48601

13 years ago[FAULTREP]
Amine Khaldi [Mon, 23 Aug 2010 00:02:06 +0000 (00:02 +0000)]
[FAULTREP]
- Fix a typo.

svn path=/trunk/; revision=48600

13 years ago[WIN32K] / [GDI32]
Timo Kreuzer [Sun, 22 Aug 2010 23:38:02 +0000 (23:38 +0000)]
[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

13 years ago[WIN32K]
Timo Kreuzer [Sun, 22 Aug 2010 22:44:36 +0000 (22:44 +0000)]
[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

13 years ago[DHCPCSVC]
Cameron Gutman [Sun, 22 Aug 2010 22:22:27 +0000 (22:22 +0000)]
[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

13 years ago[PSDK]
Amine Khaldi [Sun, 22 Aug 2010 13:25:10 +0000 (13:25 +0000)]
[PSDK]
- Improve _MSC_VER related conditions.
- Comment on #endif (for readability).
- DECLSPEC_ALIGN : moar underscores !
- Apply a consistent formatting.

svn path=/trunk/; revision=48590

13 years ago[NTOSKRNL]
Cameron Gutman [Sat, 21 Aug 2010 22:08:00 +0000 (22:08 +0000)]
[NTOSKRNL]
- Fix a typo that broke handling of DevicePropertyEnumeratorName inside IoGetDeviceProperty

svn path=/trunk/; revision=48583

13 years ago[WIN32K]
Timo Kreuzer [Sat, 21 Aug 2010 22:00:50 +0000 (22:00 +0000)]
[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

13 years ago[NTOSKRNL]
Cameron Gutman [Sat, 21 Aug 2010 21:39:53 +0000 (21:39 +0000)]
[NTOSKRNL]
- Don't overwrite the ACPI hardware key on every boot

svn path=/trunk/; revision=48581

13 years ago[NTOSKRNL]
Cameron Gutman [Sat, 21 Aug 2010 21:25:07 +0000 (21:25 +0000)]
[NTOSKRNL]
- Append the DLL name and NULL terminate the string more nicely

svn path=/trunk/; revision=48580

13 years ago[WIN32K]
Timo Kreuzer [Sat, 21 Aug 2010 19:55:09 +0000 (19:55 +0000)]
[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

13 years ago[WIN32K]
Timo Kreuzer [Fri, 20 Aug 2010 19:24:48 +0000 (19:24 +0000)]
[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

13 years ago[PSDK]
Amine Khaldi [Fri, 20 Aug 2010 16:55:33 +0000 (16:55 +0000)]
[PSDK]
- Add missing DISPLAY_BRIGHTNESS and some related definitions.

svn path=/trunk/; revision=48575

13 years ago[NTOSKRNL]
Cameron Gutman [Fri, 20 Aug 2010 04:45:25 +0000 (04:45 +0000)]
[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

13 years ago[ACPI]
Cameron Gutman [Fri, 20 Aug 2010 03:08:50 +0000 (03:08 +0000)]
[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

13 years ago[NTOSKRNL]
Cameron Gutman [Fri, 20 Aug 2010 02:27:05 +0000 (02:27 +0000)]
[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

13 years ago[NTOSKRNL]
Cameron Gutman [Thu, 19 Aug 2010 23:26:44 +0000 (23:26 +0000)]
[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

13 years ago[OSKITTCP]
Cameron Gutman [Thu, 19 Aug 2010 22:15:58 +0000 (22:15 +0000)]
[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

13 years ago[Win32k]
Michael Martin [Thu, 19 Aug 2010 10:52:36 +0000 (10:52 +0000)]
[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

13 years ago[NTOSKRNL]
Timo Kreuzer [Thu, 19 Aug 2010 10:03:03 +0000 (10:03 +0000)]
[NTOSKRNL]
- Add missing parentheses. Fixes "cont"

svn path=/trunk/; revision=48567

13 years ago[NTOSKRNL]
Timo Kreuzer [Thu, 19 Aug 2010 09:03:36 +0000 (09:03 +0000)]
[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

13 years ago[NTOSKRNL]
Timo Kreuzer [Thu, 19 Aug 2010 08:50:23 +0000 (08:50 +0000)]
[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

13 years ago[NETSTAT]
Cameron Gutman [Thu, 19 Aug 2010 06:25:20 +0000 (06:25 +0000)]
[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

13 years ago[IPHLPAPI]
Cameron Gutman [Thu, 19 Aug 2010 06:05:35 +0000 (06:05 +0000)]
[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

13 years ago[NTOSKRNL]
Timo Kreuzer [Thu, 19 Aug 2010 05:10:16 +0000 (05:10 +0000)]
[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

13 years ago[IP]
Cameron Gutman [Thu, 19 Aug 2010 02:41:54 +0000 (02:41 +0000)]
[IP]
- Fix a major bug in socket closure. Prior to this, a socket with pending IRPs that could not be satisfied when the socket was closed would be destroyed without completing the pending requests. Now, we check all of our IRP queues if we get a SEL_FIN signal and kill all the requests that cannot be satisfied immediately.
- Maybe it's just me but Firefox 2 seems much more responsive after this fix (like actually usable!)

svn path=/trunk/; revision=48561

13 years ago[FASTFAT]
Timo Kreuzer [Wed, 18 Aug 2010 23:21:15 +0000 (23:21 +0000)]
[FASTFAT]
Make our FAT driver PNP aware.
On PNP requests it should handle, it will return STATUS_NOT_IMPLEMENTED.
On the others, it will pass them to lower driver.
This is the first step outside the kernel into getting IoGetRelatedTargetDevice (and so notifications) working.
It doesn't work at the moment, as class2 doesn't handle PNP.

[NTOSKRNL]
Some fixes to IRP cancelation process:
- Renamed IopRemoveThreadIrp() to IopDisassociateThreadIrp() to match Windows 2k3
- Made dead IRP global, to make its debug easier.
- IopDisassociateThreadIrp(), Handle dead IRP at dispatch level, using IoCompletionLock.
- IopDisassociateThreadIrp(), Use the proper error code to write the entry to logs.
- IoCancelIrp(), removed non needed ASSERT, which is even not present on Windows, removed corresponding var as well.
- IoCancelIrp(), fixed parameters to KeBugCheckEx() call.
- IoCancelThreadIo() is pageable.
- IoCancelThreadIo() under Windows isn't using given thread, but using current. Do the same here.
All that stuff doesn't fix bug #5550, it comes from outside.

Patch by Pierre Schweitzer, modified by me to make it compile. If it breaks anything, don't blame me!

svn path=/trunk/; revision=48560

13 years ago[NTOSKRNL]
Timo Kreuzer [Tue, 17 Aug 2010 16:04:46 +0000 (16:04 +0000)]
[NTOSKRNL]
- Simplified IopGetRelatedTargetDevice implementation
- Added notification in case of success in NtSetVolumeInformationFile()
Patch by Pierre Schweitzer

svn path=/trunk/; revision=48559

13 years ago[NTOSKRNL]
Timo Kreuzer [Mon, 16 Aug 2010 20:18:25 +0000 (20:18 +0000)]
[NTOSKRNL]
- Fixed IoGetRequestorProcess, IoGetRequestorProcessId, IoGetRequestorSessionId
- Pass user buffer in NtNotifyChangeDirectoryFile
- Fixed magic value in IoGetPagingIoPriority
Patch by Pierre Schweitzer

svn path=/trunk/; revision=48557

13 years ago[NTDLL]
Timo Kreuzer [Mon, 16 Aug 2010 01:57:09 +0000 (01:57 +0000)]
[NTDLL]
LdrPerformRelocations: Delta is a LONG_PTR rather than ULONG_PTR

See issue #5577 for more details.

svn path=/trunk/; revision=48556

13 years ago[WIN32K]
Timo Kreuzer [Mon, 16 Aug 2010 01:29:13 +0000 (01:29 +0000)]
[WIN32K]
- Remove IntEngExtEscape stub. This function is completely useless. If the driver doesn't provide a DrvEscape, the function should simply fail and must return 0, not -1.
- If a NULL surface is passed, pass on NULL pso to the driver function

See issue #4563 for more details.

svn path=/trunk/; revision=48555

13 years ago[user32_winetest]
Timo Kreuzer [Mon, 16 Aug 2010 00:06:55 +0000 (00:06 +0000)]
[user32_winetest]
Skip 2 tests that hang on reactos. Patch by Giannis Adamopoulos

svn path=/trunk/; revision=48554

13 years ago[NTOSKRNL]
Aleksey Bragin [Sun, 15 Aug 2010 08:48:03 +0000 (08:48 +0000)]
[NTOSKRNL]
- Revert 48546. The code was correct, and there is more of same code in other places which firstly cancels the IRP and then moves to the next entry. The actual bug is somewhere else.
See issue #5550 for more details.

svn path=/trunk/; revision=48551

13 years ago- IRP_MN_QUERY_RESOURCE_REQUIREMENTS half support now, PciQueryRequirements, PciAlloc...
evb [Sat, 14 Aug 2010 18:06:19 +0000 (18:06 +0000)]
- IRP_MN_QUERY_RESOURCE_REQUIREMENTS half support now, PciQueryRequirements, PciAllocateIoRequrementsList, full implement, but PciBuildRequirementsList return 0 always for now
- Debug helpers: PciDebugPrintIoResReqList, PciDebugPrintIoResource, PciDebugCmResourceTypeToText
Now hit assert Assertion '(DeviceNode->Flags & DNF_ADDED)' failed at ntoskrnl/io/pnpmgr/pnpmgr.c line 201, too night to debug, maybe tomorow

svn path=/trunk/; revision=48550

13 years ago- IRP_MN_QUERY_RESOURCES support for PDO (PciQueryResources, PciAllocateCmResourceLis...
evb [Sat, 14 Aug 2010 17:33:10 +0000 (17:33 +0000)]
- IRP_MN_QUERY_RESOURCES support for PDO (PciQueryResources, PciAllocateCmResourceList), now remain IRP_MN_QUERY_RESOURCE_REQUIREMENTS to last device stack interogration from PNPMGR

svn path=/trunk/; revision=48549

13 years ago- Add support for PnP IRP to PDO: IRP_MN_QUERY_BUS_INFORMATION (PciQueryBusInformatio...
evb [Sat, 14 Aug 2010 17:09:20 +0000 (17:09 +0000)]
- Add support for PnP IRP to PDO: IRP_MN_QUERY_BUS_INFORMATION (PciQueryBusInformation), IRP_MN_QUERY_ID (PciQueryId), IRP_MN_QUERY_DEVICE_TEXT (PciQueryDeviceText), IRP_MN_QUERY_CAPABILITIES (PciQueryCapabilities), IRP_MN_QUERY_DEVICE_RELATIONS (PciQueryTargetDeviceRelations implement, PciQueryEjectionRelations, stub)
- Stub support for PnP IRP to PDO: IRP_MN_QUERY_RESOURCE_REQUIREMENTS (PciQueryRequirements), IRP_MN_QUERY_RESOURCES(PciQueryResources)
- Add support for PnP IRP to FDO: IRP_MN_QUERY_CAPABILITIES (handle in PciFdoIrpQueryDeviceCapabilities)
- Build device capability UI number (PciDetermineSlotNumber), use PIR$ (seem support broken, need to check loader) or device property for bus not root
- Use parent attachee device and this PDO for build device/system wake states, latency, device/system power mappings
- PCI-ID manage support: PciInitIdBuffer, PciIdPrintf, PciIdPrintfAppend
- Debug helper: PciDebugDumpQueryCapabilities
- Thanks richard for advise + beer
PCI-X driver now pass 10000 codes lines!

svn path=/trunk/; revision=48548

13 years ago[NTOSKRNL]
Cameron Gutman [Sat, 14 Aug 2010 14:55:12 +0000 (14:55 +0000)]
[NTOSKRNL]
- Move to the next entry in the thread IRP list before calling IoCancelIrp because if everything works as expected and IoCompleteRequest is called, we could end up with the IRP ripped out from under us before can move to the next element
- See issue #5550 for details.

svn path=/trunk/; revision=48546

13 years ago[WS2_32]
Cameron Gutman [Sat, 14 Aug 2010 13:48:31 +0000 (13:48 +0000)]
[WS2_32]
- Create a temporary variable and pass that to WSAIoctl for the bytes returned value instead of passing argp and corrupting the value we just retrieved

svn path=/trunk/; revision=48545

13 years ago[WINLOGON]
Aleksey Bragin [Fri, 13 Aug 2010 22:02:17 +0000 (22:02 +0000)]
[WINLOGON]
- NtInitializeRegistry expects not just CM_BOOT_FLAG_ACCEPTED, but a number of the accepted control set to be added to it. After fixing this, NtInitializeRegistry won't fail with STATUS_INVALID_PARAMETER (someone should check return status for errors...) anymore. As a result lazy flushing is enabled.

svn path=/trunk/; revision=48536

13 years ago[FASTFAT_NEW]
Aleksey Bragin [Thu, 12 Aug 2010 21:59:22 +0000 (21:59 +0000)]
[FASTFAT_NEW]
- Implement asynchronous and delayed close operations.
- Fix a logical bug in FatiClose code, which led to always closing the file object (and freeing respective FCB/VCB/CCB), and then checking flags and queuing a delayed close. Instead, it should only try to close if it's not marked as a delayed close.
- Support stuff added (queues, mutex for closing lists, etc).
- Misc cleanup, debug silencing.

svn path=/trunk/; revision=48525

13 years ago- I hate catching these things as the commit is going out
Cameron Gutman [Thu, 12 Aug 2010 13:15:35 +0000 (13:15 +0000)]
- I hate catching these things as the commit is going out

svn path=/trunk/; revision=48523

13 years ago[MSAFD]
Cameron Gutman [Thu, 12 Aug 2010 13:13:19 +0000 (13:13 +0000)]
[MSAFD]
- Update lpcbBytesReturned when FIONREAD is called
- Fix the value inside lpErrno when XxxSocketInformation() fails
- Pass the unrecognized IOCTLs to the winsock helper (no behavior change for this yet because wshtcpip's WSHIoctl is unimplemented)

svn path=/trunk/; revision=48522

13 years ago[FASTFAT_NEW]
Aleksey Bragin [Wed, 11 Aug 2010 12:18:24 +0000 (12:18 +0000)]
[FASTFAT_NEW]
- Plug in a commented out notification call in case of cleanup.
- Implement a case of device info query.
- Implement lock control.

svn path=/trunk/; revision=48518

13 years ago[NTOSKRNL]
Timo Kreuzer [Wed, 11 Aug 2010 01:22:06 +0000 (01:22 +0000)]
[NTOSKRNL]
Stop using the new paged pool code, before ExpLoadInitialProcess is called. For so far unknown reasons, it causes evil things to happen. Fixes "Assertion NewSize < pool->UserSize failed"
See issue #5551 for more details.

svn path=/trunk/; revision=48517

13 years ago[DDK]
Amine Khaldi [Tue, 10 Aug 2010 20:50:55 +0000 (20:50 +0000)]
[DDK]
- De-duplicate __GNU_EXTENSION.
- Apply a consistent formatting.

svn path=/trunk/; revision=48514

13 years ago[FASTFAT]
Aleksey Bragin [Tue, 10 Aug 2010 20:08:31 +0000 (20:08 +0000)]
[FASTFAT]
Pierre Schweitzer
- Fix volume opening on FAT volume. Commented out a directory check as it doesn't match realized tests, in spite of what's in WDK.

svn path=/trunk/; revision=48513

13 years ago[XDK]
Amine Khaldi [Tue, 10 Aug 2010 13:53:10 +0000 (13:53 +0000)]
[XDK]
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions.
[DDK]
- Update XDK generated headers to reflect the recent changes.
- Update some header guards.
- Add some missing new lines at the end of files.
- Fix PUSB_DEVICE_HANDLE guard.
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions.
[PSDK]
- Update some header guards.
- Add missing new line at the end of driverspecs.h
[NDIS]
- Update the ndis header guard.

svn path=/trunk/; revision=48511

13 years ago[PSDK]
Amine Khaldi [Tue, 10 Aug 2010 11:27:27 +0000 (11:27 +0000)]
[PSDK]
- Add some missing headers' headers.

svn path=/trunk/; revision=48510

13 years ago[PSDK]
Amine Khaldi [Tue, 10 Aug 2010 10:25:10 +0000 (10:25 +0000)]
[PSDK]
- Add WINELIB_NAME_AW and DECL_WINELIB_TYPE_AW to the wine specific imm.h.

svn path=/trunk/; revision=48509

13 years ago[WS2_32]
Cameron Gutman [Tue, 10 Aug 2010 07:14:42 +0000 (07:14 +0000)]
[WS2_32]
- Fix a crash when running with ws2_32 debugging on

svn path=/trunk/; revision=48507

13 years agoAdd include guards in wine/ddk/imm.h and inlude it from wine/imm.h
Timo Kreuzer [Tue, 10 Aug 2010 01:08:03 +0000 (01:08 +0000)]
Add include guards in wine/ddk/imm.h and inlude it from wine/imm.h

svn path=/trunk/; revision=48503

13 years ago[PSDK]
Amine Khaldi [Tue, 10 Aug 2010 00:46:27 +0000 (00:46 +0000)]
[PSDK]
- Move INPUTCONTEXT and ImmLockIMC to the wine imm.h
- Add wingdi.h inclusion.

svn path=/trunk/; revision=48502

13 years ago[WIN32K] Fix NtGdiMaskBlt to handle patterns correctly, use SRCAND, which is more...
Timo Kreuzer [Mon, 9 Aug 2010 23:28:19 +0000 (23:28 +0000)]
[WIN32K] Fix NtGdiMaskBlt to handle patterns correctly, use SRCAND, which is more optimized, instead of DSTERASE, and set fore and background colors correctly to not destroy alpha channel.
[SHELL32] Use MaskBlt to draw the shortcut overlay
Finally fixes bug 5455. Forever. (I hope.)

svn path=/trunk/; revision=48501