Commit graph

47084 commits

Author SHA1 Message Date
Alex Ionescu 2374f5b1aa [KERNEL32]: Clarify the difference between the macro and Basep8BitStringToStaticUnicodeString.
svn path=/trunk/; revision=52779
2011-07-22 10:10:15 +00:00
Alex Ionescu 278fb2f2b6 [KERNEL32]: Fix Bug #3. Make CreateNamedPipeA use our new macro. Fixes the fact it wasn't checking for success when doing the ANSI->Unicode translation, and just assumed things would work.
svn path=/trunk/; revision=52778
2011-07-22 09:50:33 +00:00
Alex Ionescu 45f4cd3964 [KERNEL32]: Fix Bug #2: FindFirstChangeNotificationA actually returns FALSE instead of INVALID_HANDLE_VALUE if the name conversion failed. In fact, up until Win7, all the *A object APIs do so, even though MSDN has always claimed the APIs return INVALID_HANDLE_VALUE. Since we don't have the Shim Database Microsoft has to unbreak apps on Win7 that probably depend on the old behavior, we'll keep the old behavior (especially since we target NT 5.2 -- and even Vista does it this way).
[KERNEL32]: Bug was fixed by using the new macros implemented last commit.

svn path=/trunk/; revision=52777
2011-07-22 09:09:05 +00:00
Alex Ionescu d19dfaa93c [KERNEL32]: Add a macro function that automatically takes care of A->W conversion for Win32->NT Object Create APIs, and does AllTheRightStuff.
[KERNEL32]: Fix bug #1: CreateFileMappingA was not returning the right error if the file mapping name was too long. By making it use the new ConvertWin32AnsiObjectApiToUnicodeApi macro, it now does.

svn path=/trunk/; revision=52776
2011-07-22 08:59:27 +00:00
Cameron Gutman cb26a7762f [AFD]
- Only trigger the close event if the pending receive list is empty

svn path=/trunk/; revision=52775
2011-07-22 04:31:33 +00:00
Cameron Gutman 2e54713de3 [AFD]
- Wait to signal a graceful receive shutdown until all buffered transport data is read by the application

svn path=/trunk/; revision=52774
2011-07-22 04:11:50 +00:00
Alex Ionescu 5965cf4895 NO CODE CHANGE:
[KERNEL32]: Rename "misc" to "wine" since this is what this is now.

svn path=/trunk/; revision=52773
2011-07-22 03:26:28 +00:00
Alex Ionescu c4e918f7a9 NO CODE CHANGE
[KERNEL32]: And at last, the final stroke. Move toolhelp.c into client, and split time.c into timezone.c (wineisms) and time.c (incorrect/buggy ntisms), which goes into client. Now "misc" truly only contains Wine-code (along with winnls), and the true NT base API that needs to be focused on is in "client".

svn path=/trunk/; revision=52772
2011-07-22 03:21:17 +00:00
Alex Ionescu 2780d189fc [KERNEL32]: We lost an API. Rbuild didn't care.
svn path=/trunk/; revision=52771
2011-07-22 02:43:12 +00:00
Alex Ionescu 222e577a94 [KERNEL32]: Remove stubs.c and instead distribute stubs in their appropriate files.
[KERNEL32]: Create vdm.c and appcache.c since no files existed for these kinds of APIs.

svn path=/trunk/; revision=52770
2011-07-22 02:13:57 +00:00
Sylvain Petreolle e18ef1f5a7 [ROSTESTS]
Add 3 missing tests to rbuild testcd.
Thanks to Caemyr and Testman.

svn path=/trunk/; revision=52769
2011-07-21 23:14:57 +00:00
Jérôme Gardou 39b9815f2e [SPEC2DEF]
- fix forward name export for c++ mangled functions.

svn path=/trunk/; revision=52768
2011-07-21 21:13:28 +00:00
Timo Kreuzer fe6c036e04 [CMAKE]
Add msvcrt20 and msvcrt40 to build

svn path=/trunk/; revision=52766
2011-07-21 18:40:41 +00:00
Timo Kreuzer 59f0449d2a [SPEC2DEF]
Fix creation of stubs for c++ mangled names

svn path=/trunk/; revision=52765
2011-07-21 18:39:24 +00:00
Sylvain Petreolle c5dc599680 [HIVES]
Fix Nls registry keys casing.
Tested by Alex.

svn path=/trunk/; revision=52764
2011-07-21 17:33:38 +00:00
Alex Ionescu cb35516e05 [KERNEL32]: Don't know how to fix this without breaking the synch... but this should fix CMAKE.
svn path=/trunk/; revision=52763
2011-07-21 17:28:21 +00:00
Alex Ionescu 1d0de632fd [KERNEL32]: C'mon cmake..you can do it!
svn path=/trunk/; revision=52762
2011-07-21 17:21:43 +00:00
Alex Ionescu 7d27bafbd7 [KERNEL32]: Add the #defines only to Winesynched code. Should fix CMAKE build...
[KERNEL32]: Move more Vista APIs out of the way and un-export some functions. Reset the WINNT_VERSION to 0x502 instead of 0x600, except for synch.c (TBD).
[KERNEL32]: Fix casts and math in GetTickCount and GetTickCount64. GetTickCount64 is Vista, but Wine-synched DLLs need it, so leave it exported.

svn path=/trunk/; revision=52761
2011-07-21 17:02:48 +00:00
Alex Ionescu 03c9810bee [NLS]: Kill this directory from the build. It produced nothing other than a Vista-calling DLL which was never even on the BootCD.
[KERNEL32]: Remove GetLocaleInfoEx again.
[KERNEL32]: It seems CMAKE build doesn't like kernel32 code calling "HeapAlloc" because HeapAlloc doesn't exist -- it's a forward to RtlAllocateHeap. As a hack, add compiler defines to do the forwarding in C code as well.

svn path=/trunk/; revision=52760
2011-07-21 15:39:28 +00:00
Alex Ionescu abbef1be00 [NTDLL]: Export RtlActivateActivationContextEx.
svn path=/trunk/; revision=52759
2011-07-21 15:38:05 +00:00
Timo Kreuzer eb8ac37dc0 [CMAKE]
Add msconfig to build

svn path=/trunk/; revision=52758
2011-07-21 14:20:50 +00:00
Ged Murphy 801b51ce18 [KERNEL32]
Add GetLocaleInfoEx back to the exports, idndl needs it.
Should fix default (rbuild) build. No idea (and don't care) about the cmake build, the cmake boys will have to deal with that if it breaks.

svn path=/trunk/; revision=52757
2011-07-21 13:40:57 +00:00
Alex Ionescu 9da861ac5c [KERNEL32]: Try to fix CMAKE build. I love how the RBUILD build is fine though.
svn path=/trunk/; revision=52756
2011-07-21 05:56:31 +00:00
Alex Ionescu ca5fb1b692 [KERNEL32]: Now really kill combdcb.c, as the Wine implementation is now in comm.c
svn path=/trunk/; revision=52755
2011-07-21 05:26:12 +00:00
Alex Ionescu 8d4cdb4ba1 [KERNEL32]: Winesync all there is to Winesync in ReactOS' kernel32. This mainly affects LZ*, Comm*, *ProfileString* (INI), and *Resource* APIs, however the changes in there are relatively minor. More substantial changes affect the locale/NLS/language functions, many which were bitrotting for 6+ years.
In theory, this code is "better" than before, and it is closer to Wine (which arguably has better compatibility). It also resets things in sync with Wine however, and may lose and "fixes" ReactOS may have added over the years. But this is a good thing, since these fixes have been "lost" (they obviously never made it into Wine), and if regressions are now found due to this, actual upstream patches can be sent and picked up on the next sync. This avoids maintaining duplicate code, at the expenses of some potential short-term regressions in i18n.
Finally, note that much of /string seems to be taken from Wine's Unicode library (which a host "unicode" already exists in ReactOS' tools/. It may be better (for someone with more experience as to these wine-isms) to simply just pull-in whatever winelib files are not currently present in ReactOS, and have kernel32 and tools/unicode use winelib, instead of having 2 or 3 copies of the code.

svn path=/trunk/; revision=52754
2011-07-21 05:24:59 +00:00
Alex Ionescu b61bacd753 [WINE]: Fix build.
svn path=/trunk/; revision=52753
2011-07-21 03:19:44 +00:00
Alex Ionescu 2d6abdac2d NO CODE CHANGE
[KERNEL32]: Final part of the re-structure: move the last few files from "misc" into "client". Now "misc" is mostly composed of Wine-based code (which will soon by Winesynched) that provides functionality such as INI, .rsrc parsing and LZip expansion, as well as the RS232-based APIs. The rest of "client" is NT-layer glue, much of it buggy and in need of help.
[KERNEL32]: Move "Beep" from environ.c to deviceio.c... seems to make more sense there.
[KERNEL32]: Set kernel32_handle since Wine-synched code will depend on this.
[KERNEL32]: Link with winelib, don't link with normaliz anymore.

svn path=/trunk/; revision=52752
2011-07-21 02:55:56 +00:00
Alex Ionescu fcd58d94bb [PSDK]: Add missing RESETDEV define to winbase.
[WINE]: Wrap Wine's get_char_typeW to iswctype in unicode.h, which will allow better sharing of synched code.

svn path=/trunk/; revision=52751
2011-07-21 02:51:50 +00:00
Timo Kreuzer 1519ee0ed7 [KERNEL32]
Hey Arch, stop deleting our code!

svn path=/trunk/; revision=52749
2011-07-20 20:18:17 +00:00
Cameron Gutman 1e3d0d1bb6 [USETUP]
- Fix length calculation for FAT16 volumes

svn path=/trunk/; revision=52748
2011-07-20 19:56:58 +00:00
Timo Kreuzer 94cd89e643 [CMAKE]
Really fix build

svn path=/trunk/; revision=52747
2011-07-20 19:04:59 +00:00
Cameron Gutman e399b918e2 [RTL]
- Fix a couple of potential null pointer accesses

svn path=/trunk/; revision=52746
2011-07-20 18:38:13 +00:00
Cameron Gutman 04db4cde59 [KERNEL32]
- Try to fix CMake build

svn path=/trunk/; revision=52745
2011-07-20 18:14:08 +00:00
Cameron Gutman c4097c4a0c [RTL]
- Validate parameters passed into path functions

svn path=/trunk/; revision=52744
2011-07-20 17:59:16 +00:00
Timo Kreuzer ad1f4ccd47 [USETUP]
Fix formatting. No code change.

svn path=/trunk/; revision=52743
2011-07-20 17:54:28 +00:00
Timo Kreuzer 9b7459ef6c [USETUP]
Patch by Dmitry Gorbachev:
Don't overwrite the OemName field in the bootsector. Although this field could theoretically contain any string, MS recommends using "MSWIN4.0" and MSDOS does even rely on it being this (or having higher last 2 characters)
This way we preserve what is being put there when the disk is formatted, which is "MSWIN4.0"
See issue #6386 for more details.

svn path=/trunk/; revision=52742
2011-07-20 17:00:28 +00:00
Timo Kreuzer ffe1655d1a [NTOSKRNL]
Patch by Thomas Faber
ExAcquireSharedStarveExclusive and ExAcquireSharedWaitForExclusive should
return FALSE when they cannot immediately acquire the resource, and the Wait parameter is false. They return TRUE instead, leading the caller to believe it acquired the resource, which will result in a bugcheck when it tries to release it.

See issue #6375 for more details.

svn path=/trunk/; revision=52741
2011-07-20 16:29:38 +00:00
Alex Ionescu 723d09b46c NO CODE CHANGE.
[KERNEL32]: Delete now empty directories.

svn path=/trunk/; revision=52740
2011-07-20 16:16:14 +00:00
Alex Ionescu 6517fcc0c7 NO CODE CHANGE.
[KERNEL32]: Delete now empty directories.

svn path=/trunk/; revision=52739
2011-07-20 16:15:56 +00:00
Alex Ionescu c37513d3e0 NO CODE CHANGE
[KERNEL32]: Reorganize the source tree into a "client" section (The Win32 API proper and its wrapping of the NT base system -- unsynchable with Wine until they have a proper NtDll and choose to use our code) and a "winnls" section (string/language/etc stuff easily synchable with Wine).
[KERNEL32]: Note: this is not perfect yet, but a step in the right direction.

svn path=/trunk/; revision=52738
2011-07-20 16:14:21 +00:00
Alex Ionescu 1b4336a2c1 NO CODE CHANGES.
[KERNEL32]: Reorganize certain functions in different files, and move files into more appropriate locations. Will lead to a simplification of the directory structure.

svn path=/trunk/; revision=52737
2011-07-20 15:54:21 +00:00
Alex Ionescu 3013167a9d [PSDK]: Add missing QUOTA_LIMITS_EX.
[NDK]: Fix certain SxS functions.
[RTL]: "Implement" RtlActivateActivationContextEx which lets you specify a TEB. RtlActivateActivationContext uses the current TEB. NOTE: All these functions are broken because they copy-paste Win32 wine code into NT Native functions (with different parameters/structures).
[NDK]: Fix pstypes.h -- it was a #define mess, and worked by luck because we are a < Vista OS.
[NDK]: Add RtlInitEmptyAnsiString.

svn path=/trunk/; revision=52736
2011-07-20 14:46:15 +00:00
Timo Kreuzer 825444af66 [NTOSKRNL]
Patch by Thomas Faber:
Fix broken interlocked functions

See issue #6374 for more details.

svn path=/trunk/; revision=52735
2011-07-20 13:48:06 +00:00
Cameron Gutman bbbb4ccf95 [RTL]
- Fix the string length calculation for the partial name
- Fixes the 2nd stage regression

svn path=/trunk/; revision=52733
2011-07-20 07:11:38 +00:00
Cameron Gutman d559321dff [RTL]
- Fix returning relative path names for path API calls using RtlpDosPathNameToRelativeNtPathName_Ustr on the backend

svn path=/trunk/; revision=52732
2011-07-20 05:34:33 +00:00
Dmitry Gorbachev 629b082a69 [NTOSKRNL]
Do not assign drive letters to unrecognized partitions. Fixes bug #2564.

svn path=/trunk/; revision=52731
2011-07-18 20:27:42 +00:00
Cameron Gutman 70bcf6fc0a [IP]
- Register an interface route for interfaces with a static IP address

svn path=/trunk/; revision=52729
2011-07-18 16:38:36 +00:00
Alex Ionescu 1fdc23fa32 [RTL]: Makes sure there is a curdir handle.
svn path=/trunk/; revision=52728
2011-07-18 13:46:43 +00:00
Alex Ionescu 16163bbc4a [RTL]: Fix a typo in RtlpDosPathNameToRelativeNtPathName_Ustr thanks so smiley.
[RTL]: Implement the unimplemented corner case based on the old ReactOS code.

svn path=/trunk/; revision=52727
2011-07-18 13:45:32 +00:00
Alex Ionescu b328750c1b [RTL]: Implement RtlDosPathNameToRelativeNtPathName_U_WithStatus, RtlDosPathNameToRelativeNtPathName_U, RtlDosPathNameToNtPathName_U_WithStatus.
[RTL]: Reimplement RtlDosPathNameToNtPathName_U to use UNICODE_STRING semantics.
[RTL]: Fix RtlGetFullPathName_Ustr.
[RTL]: RtlGetFullPathName_U remains based on the legacy non-UNICODE_STRING mechanism, but it's too complex to attempt changing for now.

svn path=/trunk/; revision=52726
2011-07-18 13:22:09 +00:00