- Fix a potential CCB state inconsistency if the IRP is canceled before adding it to the pending list
- Don't wait if the IRP has been canceled
- Preserve the return status of NpfsAddListeningServerInstance
svn path=/trunk/; revision=54328
[KERNEL32]: Cleanup files a bit.
- Bintype.c is gone and moved into VDM (these are functions for VDM support).
- Npipe.c and pipe.c are merged.
- Dosdev is moved into client, these are not quite File APIs.
- Base(8Bit/Unicode) APIs are moved into utils.c
- Wow64 APIs are moved into utils.c
- The mess that was file.c has the Replace* file APIs going into move.c (similar behaviors), the Open* APIs into create.c (similar) and the Read/Write Scatter/Gather APIs into rw.c (where they belong). What remained in file.c were mostly Set/Query functions, so it becomes fileinfo.c
- The remaining APIs in file.c were all about paths -- at the file level, specifically filenames, so they go into filename.c
- Move some File API functions from certain files into other files where they belong more.
svn path=/trunk/; revision=54326
- Make the initial NpfsRead wait uninterruptible since it's really being used like a mutex (avoid the kernel stack being paged out during the wait causing memory corruption)
- Handle interrupted waits that were missed in certain cases
- Fix a potential deadlock that would happen if more I/O was done on a file object after the previous operation was interrupted by an APC or alert
svn path=/trunk/; revision=54325
[KERNEL32]: Reimplement GetFullPathNameA to implement similar functionality and checks as the other reimplemented A functions, especially w.r.t ANSI/OEM and DBCS strings.
svn path=/trunk/; revision=54321
- Fix wait parameters so we can break out of a wait if a user APC is delivered and the file object is opened with FILE_SYNCHRONOUS_IO_ALERT
- Fixes hanging ntdll:pipe winetest (only 1 failure out of 53 tests now)
svn path=/trunk/; revision=54319
- Windows allows the two input buffers to overlap. This means we have to be very careful with copying (and always use RtlMoveMemory) -- the old function was not handling this at all.
- We also have to handle cases where we need to make our own local buffer copy.
- Length validation is more stringent now.
- Checking for short/long path names wasn't correct w.r.t ANSI file mode, as it was calling Rtl which assumes OEM.
- Shortcuts were taken while parsing slashes and path separators. We now call into Rtl to support this, and also support unlimited slashes (note that \\??\c:\\\windows\\\\system32 is actully a valid path, for example).
- ErrorMode is now correctly set for the thread, to avoid "Insert floppy" or "Close CDROM bay door" errors as we are using the FindFile API.
- Correct LastError is set where appropriate.
- An application compatibility flag is now supported.
svn path=/trunk/; revision=54318
- Use the correct buffer length in GetDllDirectoryA
- Do not always return FALSE from BasepIsCurDirAllowedForPlainExeNames
- Some cosmetic fixes
svn path=/trunk/; revision=54317
- Use FIELD_OFFSET for variable-length structure sizes
- Handle an invalid parameter condition in RCreateServiceW. Fixes an advapi32:service test
- Do not dereference a NULL-pointer on out-of-memory
svn path=/trunk/; revision=54315
[KERNEL32]: Fix SetDllDirectoryW:
- Fail if ";" is in path
- Use RtlCreateUnicodeString instead of manual string management -- if the allocation fails, do not free the current base directory string! Older API would always free the current directory string, even if setting up the new one failed.
- Don't assume lpPathName is filled out, it can be NULL, and this means the DLL directory should be cleared.
[KERNEL32]: Fix SetDllDirectoryA as above, additionally use RtlInitAnsiStringEx to protect against overflow, and use Basep8BitStringToUnicodeString, to add support for OEM paths instead of assuming ANSI.
[KERNEL32]: GetDllDirectoryW: correctly NULL-terminate and check lengths
[KERNEL32]: GetDllDirectoryA: same as above, plus use BasepUnicodeString* APIs to correctly support OEM paths instead of assuming ANSI.
[KERNEL32]: NeedCurrentDirectoryForExePath(A/W): call internal BasepIsCurDirAllowedForPlainExeNames instead of converting from A->W, this isn't needed.
[KERNEL32]: GetFullPathNameW just calls RtlGetFullPathName_U, no extra checks/etc are needed.
Next steps are GetFullPathNameA, GetShort/LongPathNameA, GetShort/LongPathNameW, hoping to bring the wine test failures closer to zero.
svn path=/trunk/; revision=54309
- Initialize OLEINPLACEFRAMEINFO.cb for IOleInPlaceSite::GetWindowContext. Fixes explorer "Web" button assert. Already applied upstream.
See issue #6011 for more details.
svn path=/trunk/; revision=54304
- Fix ParseDisplayName based on wine by checking for paths that are parsable through IEParseDisplayNameWithBCW. Score 2 failed wine tests in shlfolder
svn path=/trunk/; revision=54300
- Sync heap.c and undname.c with Wine 1.3.32
- Remove incorrect casts. Undo an incorrect warning fix. Fixes hang in msvcrt:cpp test
svn path=/trunk/; revision=54297
- Fixed Dialog Ansi and color control brush acquisition.
- Added stack protection for message recursion. Due to wine message bug when in dialog initialization. See bug 6126.
- Miscellaneous fixups.
svn path=/trunk/; revision=54293
[KERNEL32]: Acquire SE_INCREASE_WORKING_SET_PRIVILEGE in SetInformationJobObject if needed.
[KERNEL32]: Only do conversion of Process Priority Class in SetInformationJobObject if the limit flags request it.
[KERNEL32]: Add missing size checks in QueryInformationJobObject.
[KERNEL32]: Use RtlEncode/DecodePointer to protect the top level exception handler pointer, as done on NT 5.2+
[KERNEL32]: Fix IsBadRead/WritePtr to use the correct page size from the CSRSS shared section.
[KERNEL32]: Fix IsBad(String)Read/WritePtr loops
[KERNEL32]: SetErrorMode now handles SEM_NOALIGNMENTFAULTEXCEPT.
[KERNEL32]: Set/GetErrorMode do not set LastError on failure.
[KERNEL32]: RaiseException can simply use memcpy instead of copying argument by argument.
[KERNEL32]: Minor formatting changes.
svn path=/trunk/; revision=54291
- StackLimit was set incorrectly.
- Code was not using BaseStaticServerdata, but querying NT instead.
- Fix memory leak in failure case.
- StackCommit and StackReserved values were not aligned correctly.
- Windows Server 2003+ feature of "Guaranteed Stack Commit Size" was not respected.
- Some math was screwy.
- Failure to get NT headers was not handled.
svn path=/trunk/; revision=54285
[KERNEL32]: Fix some error cases in the helper string functions.
[KERNEL32]: Implement BasepIsRealtimeAllowed.
[KERNEL32]: Don't need RPL_MASK when setting up the CONTEXT, this now matches what Windows sets up (and also helps us validate the kernel is doing the right thing).
svn path=/trunk/; revision=54284
- Small performance improvement : Directly reference dll when getting its handle instead of just checking it's there and then load it
svn path=/trunk/; revision=54283