Commit graph

48997 commits

Author SHA1 Message Date
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
Kamil Hornicek 600cd17828 [KERNEL32]
Fix a copypasta.
See issue #6635 for more details.

svn path=/trunk/; revision=54287
2011-11-03 13:48:23 +00:00
Alex Ionescu 549dd7a686 [KERNEL32]: BaseNamedObjectDirectory should work on demand, instead of on startup. Also, support cases when the thread is doing impersonation, to make sure it uses its real session ID and security access. Also, support cases when the BNO directory is not available, and use the BNO\Restricted directory instead (we should have our CSRSS create it).
svn path=/trunk/; revision=54286
2011-11-03 07:00:48 +00:00
Alex Ionescu 4ba4fdcb2c [KERNEL32]: Fix multiple issues in BaseCreateStack:
- 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
2011-11-03 06:46:22 +00:00
Alex Ionescu e5f31ab0a9 [KERNEL32]: Rearrange and rename some base functions.
[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
2011-11-03 00:30:44 +00:00
Jérôme Gardou b63701a2c9 [KERNEL32]
- 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
2011-11-02 23:37:38 +00:00
Kamil Hornicek b9abf0ef06 [KERNEL32]
Fix GetEnvironmentStringsA/W.
See issue #6633 for more details.

svn path=/trunk/; revision=54282
2011-11-02 20:10:02 +00:00
Eric Kohl 09de8a1431 [SYSDM]
Handle the user wait interval.

svn path=/trunk/; revision=54281
2011-11-01 17:47:18 +00:00
Cameron Gutman 7be8df8976 [USETUP]
- Fix FAT32 boot sector pointer arithmetic
- Fixes setup error when installing FAT32 boot sector to file

svn path=/trunk/; revision=54280
2011-10-31 07:32:00 +00:00
Alex Ionescu 5671dd839b [KERNEL32]: In failure cases we should return one more byte for ANSI_NULL as well. Also fix another length check.
svn path=/trunk/; revision=54279
2011-10-30 21:41:12 +00:00
Jérôme Gardou 5ef1d7f8d2 [NTOSKRNL]
- Fix typo

svn path=/trunk/; revision=54278
2011-10-30 19:19:49 +00:00
Jérôme Gardou daf8019f6c [WIN32K]
- Allocate lokkaside lists from non paged pool.
- Add allocation failure check.

svn path=/trunk/; revision=54277
2011-10-30 18:37:30 +00:00
Alex Ionescu 9f4d272bac [KERNEL32]: Fix many bugs and confusion regarding string sizes in previous commit.
svn path=/trunk/; revision=54276
2011-10-30 16:49:25 +00:00
James Tabor 12f502c35b [Win32k]
- don't hangup on the user while in send message.

svn path=/trunk/; revision=54275
2011-10-30 15:44:31 +00:00
Alex Ionescu 0bf4287f08 [KERNEL32]: Rewrite (in some cases, simply clean-up) environment handling functions for better string handling, error codes, and performance. Part of ongoing kernel32 work.
svn path=/trunk/; revision=54274
2011-10-30 01:07:09 +00:00
Jérôme Gardou bfc68fc3a1 [CDFS]
- Read all blocks at once for misaligned read.

svn path=/trunk/; revision=54273
2011-10-30 00:58:21 +00:00
Eric Kohl f39c8938c3 [UMPNPMGR]
- Implement PNP_GetHwProfInfo.
- Fix PNP_GetClassRegProp: Set the transfer length only in case of success.

svn path=/trunk/; revision=54272
2011-10-29 21:54:24 +00:00
Jérôme Gardou f6d2cc099e [CDFS]
- fix non cached reading when offset or length is not aligned on block size

svn path=/trunk/; revision=54271
2011-10-29 20:34:08 +00:00
Jérôme Gardou d028b2cb22 [NTOSKRNL]
- add missing lock/unlock of kernel address space

svn path=/trunk/; revision=54270
2011-10-29 16:25:11 +00:00