Implemented FstubFixupEfiPartition():
Purpose is to let ReactOS handle realistic partitions length in case of an EFI/GPT protective MBR.
Indeed, when formatting a disk to GPT, you add a protective MBR that contains a fake partition entry, with type 0xEE having the following property: its size is set to maximum allocatable size in MBR.
In that case, if disk is small, you may go beyond disk size.
This is why a fix to partition length may be needed when re-reading partition entry.
This is the way ReactOS creates protective MBR.
You may find some more information here: http://msdn.microsoft.com/en-us/windows/hardware/gg463525
Fixed xHalIoReadPartitionTable():
- Allocate a buffer that has the proper size (instead of allocating a buffer which is too big). Especially since this leads to partial init only some lines after.
- Remove redundant & useless affectation.
- Check/fix 0xEE partition length in case of an EFI/GPT protective MBR (see upper point).
svn path=/trunk/; revision=51002
Fix IntCreateCompatibleBitmap, previously when the given DC was a memory DC with a dibsection selected, the function would only work if the dibsection was <= 8 bpp.
svn path=/trunk/; revision=50999
clip the destination rect against the bounds of the destination and source surface. Fixes a crash of gdi32_winetest bitmap that occurs as soon as IntCreateCompatibleBitmap is fixed. Other Eng* code needs to be checked as well.
svn path=/trunk/; revision=50998
- Print supported CPU features.
- Simplify detection of non working but claimed SYSENTER support for intel processors
- Workaround a virtualbox "feature" : claim that SYSENTER isn't supported despite the fact that it is.
Fix hang on registration of mshtml.dll in 2nd stage when using Virtualbox.
svn path=/trunk/; revision=50991
Use GreCreateBitmapEx instead of EngCreateBitmap in NtGdiSetDIBitsToDeviceInternal, so that the RLE hack works. Fix initialization of XLATEOBJ.
svn path=/trunk/; revision=50989
- Remove the old SetDIBBits, it severed us well.... Hold on to the win32k call.
- Tested, Area.exe, wine gdi32 bitmaps test, AbiWord 2.8.6, OOo 2.4.3, SM 2.0.11 and ReactOS applications.
- Aimp 2.61.583 (FULL, pinted okay), CoolPlayer 219, winamp 0.98d and winamp 2.95 (not FUll). The rest have drawing issue with DIB. See bug 5886.
svn path=/trunk/; revision=50987
- Rafal Harabien: Sync UniATA to 0.40a5. Changelog:
* Fixed bug with BSOD on newer SATA/AHCI Intel chips.
* Added support for different number of devices on different channls.
* Updated AHCI support code (not ready yet).
* All ReactOS specific changes have been left.
See issue #5976 for more details.
svn path=/trunk/; revision=50985
- Implement parameters checking in FsRtlIsNameInExpressionPrivate.
- Add two shortcuts for common wildcard invocations to make the function faster.
- Second (main part of the function) is still under review.
svn path=/trunk/; revision=50981
FlushFileBuffers:
- In spite of what MSDN pretends, it appears that FlushFileBuffers flushes console input buffer when it's called with a console handle. Then, do it here as well.
- Get rid of SetLastErrorByStatus here...
svn path=/trunk/; revision=50980
- RtlpInsertUnCommittedPages: Don't rely on linked list data in an UCR Descriptor after destroying it.
No functionality change because the linked list data was still "as expected", but not something we want to rely on.
- RtlpCreateUnCommittedRange: Fix a typo that caused the head of UCR Segment list of the Heap to be treated as an UCR Segment header.
Side effects of the typo: When this list wasn't empty, the (fake) UCR Segment it described was grown to contain more UCR descriptors.
Due to the data involved, this always happened to be the initial Heap Segment, which contains the Heap Header.
Writing the new UCR descriptors caused the Heap Header and trailing Heap Entries to be partially corrupted.
svn path=/trunk/; revision=50978
- Use one instead of two critical sections to synchronize service start and control actions.
- Fail, if an already running service is started again.
svn path=/trunk/; revision=50977
- Fix a buffer overflow (overread) when adding a locale key to the registry. The history of this bug is funny:
1. Eric wrote the code, which sets a key of REG_SZ type, as 4 widechars plus terminating zero, but passes 8 as the bytesize of the buffer. It's not fully correct (a terminating zero is absent from the bytesize of the buffer, but MSDN doesn't specify if it should be added or not, and hardcoding "8" is not the best idea too) but not dramatic. That was revision 9596, 7 years ago.
2. Lentin notices something is not right in this code, and decides to "fix" it by multiplying that same hardcoded value by.... guess what? sizeof(PWCHAR)! That is, size of a pointer, which on an x86 would be 4 bytes. Massive out of bounds access obviously happens. That was revision 31642, 3 years ago.
3. Very soon Colin reshuffles and improves the code based on patch #2635, however the problem still goes unnoticed (r31655+).
See issue #5810 for more details.
svn path=/trunk/; revision=50968
- Missed the clearing of the clip region for the window at the end of of its life. The mouse is looking for the window, doing so, scanning through all of them, even the ones that are at deaths door.
svn path=/trunk/; revision=50962
- Fix the select of the clip region for a window. Apologies to Rafal Harabien select works like select, also don't
assume the original author is always right.
svn path=/trunk/; revision=50961
Revert part of r50941. First its architecturally unclean to lock a DC in a USER function, 2nd its a bug to keep the lock while sending a message.
svn path=/trunk/; revision=50959
- Prevent code duplication by using vfatAttachFCBToFileObject() for volume opening, instead of rewritting the whole function.
- Properly check requested disposition when opening a volume.
This fixes bug #5839. Trying to exec \\.\C: in explorer run dialog now ends with an error, as it does on Windows.
svn path=/trunk/; revision=50958
Patch by Thomas Faber:
When the Edit receives WM_KILLFOCUS, it will notify its parent (the ListView)
of losing focus, which in turn will send WM_CLOSE to destroy the edit control.
This will cause the edit to receive WM_DESTROY and free the EDITSTATE.
When control returns to the WM_KILLFOCUS handler, this would call
EDIT_UnlockBuffer on the now invalid EDITSTATE.
Fix this by checking the validity of the EDITSTATE before calling EDIT_UnlockBuffer.
Fixes explorer crash, when cancelling file renaming.
See issue #5895 for more details.
svn path=/trunk/; revision=50956
- Update path.c code to Wine 1.3.14. Fixes a buffer overwrite happening in RtlDosSearchPath_U() when invoked by "shell32_winetest.exe shlexec".
- RtlDosPathNameToNtPathName_U remains unsynced.
- Author names added to the header of the file.
See issue #5964 for more details.
svn path=/trunk/; revision=50954