Commit graph

48865 commits

Author SHA1 Message Date
Alex Ionescu f237a863e7 Hurray for misisng includes.
svn path=/trunk/; revision=54337
2011-11-07 15:44:07 +00:00
Alex Ionescu 6d37c787cd [KERNEL32]: Fix various bugs in the file mapping APIs, mainly related to lack of EXECUTE mappings and incorrect error codes.
svn path=/trunk/; revision=54336
2011-11-07 15:43:37 +00:00
Dmitry Gorbachev bef20836c3 [TRANSLATION]
- Add some Romanian strings to the registry. Fulea Stefan, bug #6603.
- Add a few Russian strings, too.

svn path=/trunk/; revision=54335
2011-11-07 08:01:58 +00:00
Alex Ionescu 40b0836010 [KERNEL32]: Show some love to Get/SetCurrent/Windows/SystemDirectoryA/W. Only SearchPathW and loader stuff remains to be fixed. Also handle SetCurrentDirectory when directory is already current.
[KERNEL32]: Rewrite the tape APIs to use a single generic function, and in the process support pending I/O now, which wasn't handled before.
[KERNEL32]: Moved the interlocked APIs to synch.c instead of dllmain.c

svn path=/trunk/; revision=54334
2011-11-07 07:41:52 +00:00
Pierre Schweitzer b7ad8c6fb9 [KERNEL32]
Fix wrong L usage in new code.

svn path=/trunk/; revision=54333
2011-11-07 06:45:17 +00:00
Alex Ionescu a458290ab1 [KERNEL32]: Fix multiple, multiple, bugs in the last commits. Path is now down to 12 failures (way lower than before the streak), most unrelated to actual path APIs.
svn path=/trunk/; revision=54332
2011-11-07 05:07:58 +00:00
Cameron Gutman c13946eae2 [TCPIP]
- Fix a potential double-completion of an IRP

svn path=/trunk/; revision=54331
2011-11-07 02:02:59 +00:00
Cameron Gutman 703b182d8f [NPFS]
- Fix an access-after-free bug

svn path=/trunk/; revision=54330
2011-11-07 01:47:55 +00:00
Alex Ionescu 1534ace5ad Forgotten file.
svn path=/trunk/; revision=54329
2011-11-07 01:40:33 +00:00
Cameron Gutman 945a5972a9 [NPFS]
- 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
2011-11-07 01:37:35 +00:00
Cameron Gutman 3eff89fe04 [NPFS]
- Fix several cancellation races and broken checks

svn path=/trunk/; revision=54327
2011-11-07 00:52:32 +00:00
Alex Ionescu 784e19a384 [KERNEL32]: Implement Wow64Enable/Disable/RevertWow64Direction, document the Rtl equivalents in NDK, export and implement them in NTDLL.
[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
2011-11-07 00:18:13 +00:00
Cameron Gutman 35a7096ebc [NPFS]
- 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
2011-11-06 23:40:06 +00:00
Thomas Faber 1f8bcd7af2 [KERNEL32_WINETEST]
- Do not use strcat_s. It is not guaranteed to exist on Windows.

svn path=/trunk/; revision=54324
2011-11-06 23:38:39 +00:00
Alex Ionescu 1a2f9d3279 [KERNEL32]: Move the "curdir.c" APIs into path.c as well, as they are Path APIs. No code changes (just formatting and moving to DPRINTs).
svn path=/trunk/; revision=54323
2011-11-06 23:01:04 +00:00
Alex Ionescu bc813e0cee [KERNEL32]: Give the same treatement to SearchPathA. Also add a comment on why exactly the A<->W conversion has to be more complex than what Wine was attempting.
svn path=/trunk/; revision=54322
2011-11-06 22:46:31 +00:00
Alex Ionescu 504de2415f [KERNEL32]: Fix infinite loop in FindLFNorSFN_U.
[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
2011-11-06 21:00:10 +00:00
Alex Ionescu 3bdf1b6e8a [KERNEL32]: Fix some bugs in previous two commits (thanks Thomas).
svn path=/trunk/; revision=54320
2011-11-06 19:42:59 +00:00
Cameron Gutman ee06a00c1a [NPFS]
- 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
2011-11-06 18:47:51 +00:00
Alex Ionescu 1bdbaed2a7 [KERNEL32]: Rewrite GetLong/ShortPathNameW away from Wine. Some changes:
- 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
2011-11-06 17:17:16 +00:00
Thomas Faber 61db405237 [KERNEL32]
- Use the correct buffer length in GetDllDirectoryA
- Do not always return FALSE from BasepIsCurDirAllowedForPlainExeNames
- Some cosmetic fixes

svn path=/trunk/; revision=54317
2011-11-06 15:52:20 +00:00
Alex Ionescu 36a7df4966 [KERNEL32]: Reimplement GetLong/ShortPathNameA to get rid of Wineisms and fix the fact they were forcing paths to MAX_PATH when doing A->W->A conversion. The correct behavior is to call W to get the true, real path length (no matter how big), and then deal with the sizing issues when downconverting back to A.
svn path=/trunk/; revision=54316
2011-11-06 15:34:39 +00:00
Thomas Faber 0b595ead09 [SERVICES]
- 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
2011-11-06 14:23:39 +00:00
Thomas Faber ac825c5ef6 [ADVAPI32][SERVICES]
- Remove unnecessary casts, fix some const-ness, fix a DPRINT, some spacing

svn path=/trunk/; revision=54314
2011-11-06 13:33:29 +00:00
Thomas Faber 4cabf96ae6 [MSVCRTEX]
- Fix some warnings
- Remove a ros-diff in favor of mingw-w64's solution

svn path=/trunk/; revision=54313
2011-11-06 13:07:43 +00:00
Thomas Faber bf96abff4b [CRT]
- Export _resetstkoflw from msvcrt. Implementation from Wine 1.3.32

svn path=/trunk/; revision=54312
2011-11-06 12:51:18 +00:00
Thomas Faber aeacf320c4 [SYSSETUP]
- Do not rely on setupapi's FileExists function, which shouldn't even be exported

svn path=/trunk/; revision=54311
2011-11-06 12:17:42 +00:00
Alex Ionescu 3b9a6f799a [KERNEL32]: The ANSI/OEM stubs were never initialized... it's a miracle this ever worked, probably because someone added a #define to at least one of them to hack it into working. Initialize the value snow, fixes boot.
svn path=/trunk/; revision=54310
2011-11-06 04:13:21 +00:00
Alex Ionescu e1ecfcf440 [KERNEL32]: Move path-related APIs away from dir.c, and into path.c instead.
[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
2011-11-06 02:00:56 +00:00
Alex Ionescu f0199db57b [KERNEL32]: Actually properly support ANSI vs OEM SetFileAPI instead of assuming Unicode->ANSI for most things. Note this just adds support, there's still many wine-synched APIs that are using the FileNameA2W hacks and similar, which force ANSI. But it's a step in the right direction.
svn path=/trunk/; revision=54308
2011-11-06 01:47:49 +00:00
Alex Ionescu ec9698366a [NTDLL]: Export RtlImageNtHeaderEx and LodrLoadAlternateResourceModule.
[NDK]: Add LdrLoadAlternateResourceModule. Fix RtlDosApplyFileIsolationRedirection_UStr and add flags.
[NTDLL]: Halfplement LdrLoad/UnloadAlternateResourceModule.

svn path=/trunk/; revision=54307
2011-11-06 01:34:06 +00:00
Pierre Schweitzer 485d80b662 [KERNEL32]
Fix c/p mistake.
Brought to you by Vincenzo Cotugno

svn path=/trunk/; revision=54306
2011-11-06 00:09:33 +00:00
Sylvain Petreolle 32212570af -Add missing struct to winnt.h.
svn path=/trunk/; revision=54305
2011-11-06 00:04:57 +00:00
Thomas Faber 238b9ff6c3 [MSHTML][SHDOCVW]
- 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
2011-11-05 20:40:59 +00:00
Claudiu Mihail c10be1a84f [shell32]
- Fix a few more winetests in shlfolder tests.

svn path=/trunk/; revision=54303
2011-11-05 20:09:30 +00:00
Cameron Gutman 2506e5967c [LWIP]
- Properly sync to lwIP 1.4.0
- No code changes (except unit tests)

svn path=/trunk/; revision=54302
2011-11-05 18:54:49 +00:00
Amine Khaldi 64e1212557 [SHELL32]
* Fix rbuild build.
* Remove a debug breakpoint that is no longer needed.

svn path=/trunk/; revision=54301
2011-11-05 17:56:10 +00:00
Claudiu Mihail eee7297139 [shell32]
- 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
2011-11-05 16:40:42 +00:00
Thomas Faber 325e646e25 [KERNEL32]
- Fix MSVC build

svn path=/trunk/; revision=54299
2011-11-05 11:39:37 +00:00
Thomas Faber e325aa3a89 [CRT]
- Gracefully fail on NULL for gmtime functions. Fixes msvcrt:time crash

svn path=/trunk/; revision=54298
2011-11-05 10:24:24 +00:00
Thomas Faber 48680406d2 [CRT]
- 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
2011-11-05 10:08:06 +00:00
Thomas Faber e2d5a05b09 [MSVCRT_WINETEST]
- Sync to Wine 1.3.32

svn path=/trunk/; revision=54296
2011-11-05 09:54:41 +00:00
Thomas Faber c5eb6b4cdf [PSDK][KERNEL32]
- Fix some DWORD vs SIZE_T confusion for memory functions

svn path=/trunk/; revision=54295
2011-11-05 09:07:39 +00:00
James Tabor 98c56da01a [Win32k]
- Reposition IntCallWndProc/Ret so it call when sending to client.

svn path=/trunk/; revision=54294
2011-11-05 06:01:05 +00:00
James Tabor c30a8a6e49 [User32]
- 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
2011-11-05 05:18:57 +00:00
Alex Ionescu 888f1950e9 [KERNEL32]: Fix a missing "~" in GlobalReAlloc and LocalReAlloc, which caused a flag never to be removed.
svn path=/trunk/; revision=54292
2011-11-05 04:53:18 +00:00
Alex Ionescu d30964b0fb [KERNEL32]: Implement CreateJobSet
[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
2011-11-05 01:19:52 +00:00
Thomas Faber c0f989c66a [RICHED20_WINETEST]
- Sync to Wine 1.3.32

svn path=/trunk/; revision=54290
2011-11-04 23:07:16 +00:00
James Tabor 2db8caa0e5 - Fix build.
svn path=/trunk/; revision=54289
2011-11-04 13:21:13 +00:00
James Tabor bc031d7389 [Win32k|User32]
- Move control color support to Win32k.

svn path=/trunk/; revision=54288
2011-11-04 13:16:48 +00:00