add code to register pre/post systemcall hooks. Its #if 0'ed to avoid unneccessary overhead. Can be enabled for debugging puposes.
svn path=/trunk/; revision=50879
One-line fix for FsRtlIs*InExpression(). This fixes failing tests, but not overrun.
Added some breaks to reach more quickly the end
svn path=/trunk/; revision=50873
- Implement DPH version of ReAllocateHeap. Scenario of falling back to normal heap is stubbed everywhere now.
- Fix a bug in POINTER_ADD_BIAS which noone noticed.
svn path=/trunk/; revision=50872
Adding more tests for FsRtlIs*InExpression() functions.
All are failing (overrun / wrong result).
Based on Thomas Faber's C program.
See bug #5923
svn path=/trunk/; revision=50870
Fix special behaviour of wsprintf: when used with # flag, the "0x" prefix does not count into the field width, so we have to add additional 2 characters here. Fixes Opera installer.
See issue #5900 for more details.
svn path=/trunk/; revision=50866
Patch by EDIJS <terminedijs at yahoo dot com>: Improve window caption string.
By me: use StringCchCat instead of _tcscat to prevent possible buffer overruns.
See issue #5871 for more details.
svn path=/trunk/; revision=50864
Improve _getdrive and _tchdir. Patch by devpao (devotip at tiscali dot it), small formatting change by me.
See issue #5848 for more details.
svn path=/trunk/; revision=50861
- Implement heap free operation using already implemented busy/free/available/unused lists support and other base routines.
- Implement missing place to free list and remove from busy list routines.
- Implement find busy block routine (using AVL tree).
- Fix a bug in RtlpDphCoalesceNodeIntoAvailable() which resulted in unwanted attempt to merge the only node with itself (which failed anyway).
- Fix a bug in RtlpDphCoalesceNodeIntoAvailable() which incorrectly removed a node from available list (which is implemented as a standard NT double-linked list, compared to unused and free lists which are implemented as single-linked custom lists and busy list which is an AVL tree). Result of that bug was an infinite loop at the next attempt to traverse the list of available nodes.
- In RtlpDphCoalesceFreeIntoAvailable() break when FreeAllocations becomes less than LeaveOnFreeList (before it would break 1 size too early).
- Fix list traversal in RtlpDphSearchAvailableMemoryListForBestFit(). If it couldn't find a node, it would return the last node in the list instead of NULL.
- In RtlpDphFindAvailableMemory(), a new smaller size should be 4 times smaller, not just 2.
- Add a #if0-ed section in RtlpDphRemoveFromAvailableList which checks if a request to remove node not in the list performed. Used only for debugging.
- Add a trace dprint to every type of list insert/removal operation for easier tracking.
- Add break on NULL ptr freeing support.
- RtlpDphSetProtectionAfterUse() is stubbed and protection is set directly in RtlpDphHeapFree(). To be moved into this function.
svn path=/trunk/; revision=50860
- Check if there is a reset request in progress while the wave thread is active. In that case exit the wave buffer commiting activity
- In the reset routine, perform an alertable wait in order to make the apc io completion complete
[PORTCLS]
- Only perform copying audio bytes to dma buffer while the adapter is reset state is KSREST_END
- Set the reset state indicator before canceling the audio buffers
- Should fix the audio hang experienced in Winamp when skipping audio bytes
svn path=/trunk/; revision=50851
Don't mix tab index and memory length...
This fixes several bugs in GetTempFileNameW() and prevents memory corruption ~
Winetest regression is gone :)
svn path=/trunk/; revision=50849
Patch by Rafal Harabien, <rafalh1992 AT o2 DOT pl>:
- Fix Port numbers and ranges in HalpDefaultIoSpace (divide by 0x100)
By me:
- Fix DMA 1 port range and fix comment
See issue #5925 for more details.
svn path=/trunk/; revision=50848
- Add 'pSetup'-Prefix to the string table functions according to the new naming convention.
- Remove the obsolete function StringTableTrim.
svn path=/trunk/; revision=50844
- Get rid of Wine's implementation of GetTempFileNameA/W and reimplement them in the Windows 2003 way.
This fixes bug #5481
svn path=/trunk/; revision=50839
- Get rid of old function Basep8BitStringToLiveUnicodeString() that doesn't exist under Windows, and that was even unused
- Rename Basep8BitStringToHeapUnicodeString() to Basep8BitStringToDynamicUnicodeString() and fix its implementation (and all the calls)
- Define BasepUnicodeStringTo8BitString()
svn path=/trunk/; revision=50838
- Fixed RtlMultiByteToUnicodeN & RtlAnsiCharToUnicodeChar prototype
- Added missing paged code marker to RtlAnsiCharToUnicodeChar
- Added a small hack to RtlAnsiCharToUnicodeChar. Indeed, when it's called during second stage, it's failing due to missing NLS table.
Probably usetup that doesn't define a registry entry. And then, FreeLdr just passes null pointer.
svn path=/trunk/; revision=50836
Add a new API GetTempFile() that returns an identifier to be used for creating temporary files.
This API should be in basesrv.dll
svn path=/trunk/; revision=50835
- Add svn:eol-style native property
- Fix language id (SUBLANG_DEFAULT -> SUBLANG_NEUTRAL)
See issue #5918 for more details.
svn path=/trunk/; revision=50833
Halfplement (win32 only) ProcessWow64Information case in NtQueryInformationProcess. Patch by Samuel Serapion.
See issue #5916 for more details.
svn path=/trunk/; revision=50831
Patch by Carlo Bramini (carlo bramix at libero dot it)
- Make the text copy field a richedit control.
- Use WM_CHAR to copy the characters
- Fix definition of MSFTEDIT_CLASS for the resource compiler
See issue #5275 for more details.
svn path=/trunk/; revision=50830
- Fix a bug with node count in RtlpDphAddNewPool().
- Unprotect needed amount of memory in RtlpDphSetProtectionBeforeUse() instead of always assuming PAGE_SIZE.
- Fix an incorrect virtual block pointer calculation in RtlpPageHeapAllocate().
- Silence RtlpDphShouldAllocateInPageHeap() debug print.
- Add helpful debug prints (disabled by default).
- Some code cleanup for better readibility.
- Heap create, destroy and allocating a block from the heap work now.
svn path=/trunk/; revision=50828
NtGdiSelectBitmap. Don't exclusively lock the old bitmap. This could cause pool corruptions, when the share count reachted 0, the object was deleted and unlocked after that. Use InterlockedCompareExchange to check and exchange the new bitmaps dc. This is commented out, because it causes a lot of drawing problems. Do the referencing manually instead of calling DC_vSelectSurface. Use a shared reference instead of an exclusive lock for the new bitmap. add code for proper handling of DEFAULT_BITMAP, currently hacked due to restrictions in other parts of win32k. Fixes bug 5498 and probably a lot of other problems.
svn path=/trunk/; revision=50827
NtGdiStretchDIBitsInternal: don't call NtGdiGetDCObject and NtGdiCreateCompatibleDC with a dc locked. These cases are not harmful, but generally Nt* and Gre* should never be called with an exclusive gdi lock held. Also don't return in failure case with the dc still locked.
svn path=/trunk/; revision=50826