Commit graph

43678 commits

Author SHA1 Message Date
Sir Richard
c444de303a [NTOS]: Aleksey wants an easy way to see debug messages coming from one process vs. another, which is an obvious idea that should've done a long time ago. Now you can see who is generating a given debug message (including the thread).
svn path=/trunk/; revision=48479
2010-08-07 16:16:17 +00:00
Timo Kreuzer
4adeefec39 [KERNEL32]
Go back to spec file. Don't worry it's fixed.

svn path=/trunk/; revision=48478
2010-08-07 16:07:13 +00:00
Sir Richard
0be9ddc03e [KERNEL32]: Aleksey wants debug channels, I agree this is the way forward. Leverage existing NT infrastructure to enable Windows-compatible debug channel support, instead of using a UNIX-based 3rd party library. Same debug channel names as before have been re-added, but using NT Debug Filters.
svn path=/trunk/; revision=48477
2010-08-07 16:01:30 +00:00
Aleksey Bragin
4e45370f82 [KERNEL32]
- That's what happens when most of the commit's changes are not related to most of the commit message. Fixes build.

svn path=/trunk/; revision=48476
2010-08-07 09:10:06 +00:00
Sir Richard
e4d5c13a6b [KERNEL32]: While working on the CMAKE branch, Amine and myself discovered a rather serious issue in kernel32 (and perhaps other libraries as well). Unlike rbuild, CMake does not allow you to export non-existant DLL functions (try it: add "poopyhead" in kernel32's exports under RBuild, and will it export "poopyhead", God knowing what that will actually link to).
As an additional feature on top of the "allow non-existing functions to be exported" "feature", because rbuild generates and links STDCALL function names without the proper decoration (vs. enforcing decoration at linking, but only removing it at export-time), this allows the definition (as an export) of a STDCALL function that is completely different from the actual function itself.
            For example, the 5-parameter Foo function is normally Foo@20, while the 3-parameter Foo function woudl be Foo@12. Linking one against the other would fail (say, 2 parameters were added to Foo in a newer version). However, under RBUILD, both of these would appear as "Foo", and the linker/compiler would happilly connect the caller of Foo@3 (that has pushed 3 parameters) to the receiving side of Foo@5 (that is about to pop 5 parameters).
            Even -if- decorations WERE to be applied, Foo@12 would STILL succeed, because of the first feature, which would enable the export of Foo@12 even though no such function exist.
            In a further, bizare, twist of fate, the behavior of this RBUILD "feature", when the target function is not found, is to link the exported DLL TO ITSELF.
            Therefore, one can see how, previously to this patch, kernel32.dll would import a dozen functions from itself (all the non-existing functions).
            To really seal the deal, the behavior of exported functions used by kernel32, but that are actually forwarded to another DLL deserves a special mention.
            GetLastError, for example, merely forwards to RtlGetLastWin32Error, so it is normal behavior to use a #define in the C code so that all internal calls to the function are routed correctly.
            This did not happen, so instead, kernel32 tried importing/linking/exporting GetLastError, but this symbol is not found in the binary, because it is only a forwarder.
            This caused kernel32 to import from itself (the behavior when an exported symbol is not found). When importing from itself, the loader would now find the _forwarded_ for GetLastError, and correctly link with ntdll.
            What should be a one-liner of assembly (inline TEB access) thus became a triple-call indirection (GetLastError@0->StubLastError@0->__impGetLastError@0->__impRtlGetLastWin32Error->RtlGetLastWin32Error.
            While analyzing these issues, we also realized a strange macro SetLastErrorByStatus that manually tried to perform what there already exists a function for: RtlSetLastNtStatusFromWin32Error.
	    And, in an exciting coda, we also realized that our Server 2003 Kernel32 exports more than a dozen Windows 95 APIs, through an auto-stub generation mechanism within winebuild, that gets linked as an object behind the scenes.
[KERNEL32]: Removed all Win95 exports, cleaned up exports.
[KERNEL32]: Fixed up set/get error macros by making them inline and/or calling the correct ntdll function.
[KERNEL32]: Removed bizare calls to Wine-internal/specific APIs from our core Win32 DLL.
[KERNEL32]: Wrote stubs for all functions which should be exported, and set the correct number of parameters for them.
[KERNEL32]: Kernel32 is smaller, loads faster, does not export Windows 95 functions, does not export non-existing functions, and does not import from itself anymore.
Note: This is one of the many failings of RBUILD the CMAKE system has helped us discover. I believe these issues are serious enough to warrant an immediate sync with trunk, but rest assured, there are many more completely broken, infinitely-regressing things that we discovered while switching to CMAKE.


svn path=/trunk/; revision=48475
2010-08-07 05:02:58 +00:00
Cameron Gutman
9ce4714f6b [IPHLPAPI]
- Comment out the GetAdaptersAddresses code and add the stub back
- Fixes Firefox 3.x (bug 5399)

svn path=/trunk/; revision=48474
2010-08-06 23:01:10 +00:00
Timo Kreuzer
003e0bb556 [CRT]
- Remove "implementations" of __lc_collate_cp, __lc_handle and __lc_codepage. These are not functions, but varuables, implemented as MSVCRT_*
- add ___lc_codepage_func and ___lc_handle_func taken from wine
- Fix msvcrt spec file
- Fixes compilation with gcc 4.5.1

svn path=/trunk/; revision=48473
2010-08-06 22:42:07 +00:00
Aleksey Bragin
d521bf4480 - (Hack)fix build.
svn path=/trunk/; revision=48469
2010-08-06 12:04:12 +00:00
Aleksey Bragin
50a341134c [CDFS]
- MAXIMUM_VOLUME_LABEL_LENGTH is in bytes, not in characters. Fix struct definition and access beyond the buffer. Spotted by Carlo Bramini.
- Trim trailing spaces from the volume label name, instead of stopping at the first encountered space. Fix by Carlo Bramini.
See issue #5505 for more details.

svn path=/trunk/; revision=48468
2010-08-05 21:57:02 +00:00
Aleksey Bragin
cf3a6fe7c5 - Sync ole32 and oleaut32 regtests to Wine-1.3.
svn path=/trunk/; revision=48467
2010-08-05 21:28:34 +00:00
Aleksey Bragin
c2ead94de7 - Sync ole32 and oleaut32 to Wine-1.3.
svn path=/trunk/; revision=48466
2010-08-05 21:19:46 +00:00
Timo Kreuzer
b51cf52307 [SHELL32]
When creating a shortcut icon and we have 32 bpp, use GdiAlphaBlend to create the final bitmap. This is neccessary, since we want to support alpha channels and those are destroyed when using SRCPAINT or any similar ROPs on the alpha bitmap (not a bug, Windows works like that, too). We could use MaskBlt, if it would work correctly, but on reactos it destroys the alpha channel as well (bug!), it's also most likely slower then the current solution.
Fixes broken overlay icons.
See issue #5455 for more details.

svn path=/trunk/; revision=48463
2010-08-05 14:42:56 +00:00
Timo Kreuzer
1eac149580 [WIN32K]
- Copy the alpha channel as well when doing RGB<->BGR color translations.

svn path=/trunk/; revision=48462
2010-08-05 14:32:30 +00:00
Timo Kreuzer
589577fe34 [NTOSKRNL]
- Fixed FsRtlIsNameInExpression to make it properly handle * in expressions
- Fix formatting
- Patch by Pierre Schweitzer
- Fixes everything

See issue #5541 for more details.

svn path=/trunk/; revision=48461
2010-08-05 12:23:23 +00:00
Amine Khaldi
32e98673b9 [CMAKE]
- Set windmc to write binary messages as ascii.

svn path=/branches/cmake-bringup/; revision=48460
2010-08-05 00:43:33 +00:00
Amine Khaldi
7c99b62e1f [CMAKE]
- Move generated precompiled headers to binary folders.
- Enable auto image base for ntdll.
- Update the location of generated PCH files for rtl, ntdll and crt.

svn path=/branches/cmake-bringup/; revision=48459
2010-08-04 19:10:43 +00:00
Sir Richard
fc5ac84ba5 [CMAKE]: Don't prefix DLLs with "lib".
[CMAKE]: Add our libgcc by default.

svn path=/branches/cmake-bringup/; revision=48458
2010-08-04 14:42:05 +00:00
Sir Richard
3930317e12 [CMAKE]: Disable standard C libraries (WIP: Should add libgcc).
[CMAKE]: Set global linker flags we need for all libraries.
[CMAKE]: Set specific NTDLL linker flag.
Thanks to Amine for some of his help.

svn path=/branches/cmake-bringup/; revision=48457
2010-08-04 14:29:24 +00:00
Timo Kreuzer
e715956b80 [KERNEL32]
Fix a check in ContainsPath. Patch by Gabriel Ilardi. 

See issue #5478 for more details.

svn path=/trunk/; revision=48456
2010-08-04 13:33:37 +00:00
Amine Khaldi
98c16868ae [CMAKE]
- Add games base file.

svn path=/branches/cmake-bringup/; revision=48455
2010-08-04 13:30:27 +00:00
Amine Khaldi
48b65ad43b [CMAKE]
- Add cmdutils base file.

svn path=/branches/cmake-bringup/; revision=48454
2010-08-04 13:16:46 +00:00
Timo Kreuzer
692801bff2 [FASTFAT]
- Fix a check in VfatCreateFile. Patch by Pierre Schweitzer.

See issue #4571 for more details.

svn path=/trunk/; revision=48453
2010-08-04 13:06:47 +00:00
Amine Khaldi
ba7d98adba [CMAKE]
- Fix precompiled header support (the pch cleanup phase).
- Improve its use in crt.

svn path=/branches/cmake-bringup/; revision=48452
2010-08-04 10:38:17 +00:00
Sir Richard
ce238e95a4 [CMAKE]: Add missing file.
svn path=/branches/cmake-bringup/; revision=48451
2010-08-04 08:17:04 +00:00
Sir Richard
3bad5d8bbf [CMAKE]: PCH for NTDLL too.
svn path=/branches/cmake-bringup/; revision=48450
2010-08-04 08:16:37 +00:00
Sir Richard
5ef41e4848 [CMAKE]: Closer to a valid NTDLL. Resources and exports are compiled in now.
[CMAKE]: WIP: CMAKE_C_CREATE_SHARED_LIBRARY breakdown + top-level.

svn path=/branches/cmake-bringup/; revision=48449
2010-08-04 07:52:21 +00:00
Sir Richard
807b0907d5 [CMAKE]: Add full support for linking RC files with windres.
svn path=/branches/cmake-bringup/; revision=48448
2010-08-04 07:51:26 +00:00
Sir Richard
d928872abe [CMAKE]: Add support for precompiled headers (this was not fun).
[CMAKE]: Use them in RTL and CRT. Someone needs to add them to the other makefiles.

svn path=/branches/cmake-bringup/; revision=48447
2010-08-04 06:41:07 +00:00
Timo Kreuzer
9fd87c4954 [GDI32]
Fix parameter check in GetTextExtentExPointA/W. Patch by Kamil Hornicek. Fixes bug 5486, bug 5507 and bug 5511

svn path=/trunk/; revision=48446
2010-08-04 00:01:30 +00:00
Timo Kreuzer
e3736b149a Add some tests for GetTextExtentExPoint. Dedicated to Pigglesworth
svn path=/trunk/; revision=48445
2010-08-03 23:15:20 +00:00
Amine Khaldi
53edf4d8fa [CMAKE]
- Formatting. No code change.

svn path=/branches/cmake-bringup/; revision=48444
2010-08-03 21:58:41 +00:00
Amine Khaldi
fb995372b0 [CMAKE]
- Fix ntdllsys and win32ksys.

svn path=/branches/cmake-bringup/; revision=48443
2010-08-03 21:57:06 +00:00
Amine Khaldi
34db564f0a [CMAKE]
- Improve header inclusions.

svn path=/branches/cmake-bringup/; revision=48442
2010-08-03 21:55:42 +00:00
Amine Khaldi
2939360909 [CMAKE]
- Add IDL generated headers to build.

svn path=/branches/cmake-bringup/; revision=48441
2010-08-03 21:51:59 +00:00
Sir Richard
9e90eaa575 [CMAKE]: NTDLL WIP.
svn path=/branches/cmake-bringup/; revision=48440
2010-08-03 21:39:17 +00:00
Sir Richard
0efbac95d2 [CMAKE]: Don't auto-link with Win32 stuff.
svn path=/branches/cmake-bringup/; revision=48439
2010-08-03 21:38:59 +00:00
Sir Richard
1bd315d9e1 [CMAKE]: Fix CRT.
svn path=/branches/cmake-bringup/; revision=48438
2010-08-03 21:38:39 +00:00
Timo Kreuzer
9c9f4cb9e9 [WIN32K]
Protect access to the result pointer from KeUserModeCallback with SEH. Fixes a possible kernel mode crash.

svn path=/trunk/; revision=48437
2010-08-03 21:36:39 +00:00
Sir Richard
3b6a29974b [CMAKE]: Use some nice options which will make makefiles simpler regarding includes.
svn path=/branches/cmake-bringup/; revision=48436
2010-08-03 21:12:51 +00:00
Sir Richard
12ccd98393 [CMAKE]: Cant' have comments in mc files.
svn path=/branches/cmake-bringup/; revision=48435
2010-08-03 21:12:16 +00:00
Sir Richard
700aa715cb [CMAKE]: Amine doesn't read man pages, nor does he actually review patches :-)
svn path=/branches/cmake-bringup/; revision=48434
2010-08-03 20:51:47 +00:00
Aleksey Bragin
f986e82a8d [KERNEL32]
- Sync lcformat.c to Wine-1.3. This fixes (a number of potential) problems introduced by new nls data files being synced recently and led to crashes on locales having different months genitives. Original issue confirmed by Sergey Gusev <evilslon@mail.ru> and Igor Paliychuk.

svn path=/trunk/; revision=48433
2010-08-03 20:23:43 +00:00
Timo Kreuzer
cf02088179 [CRT]
Implement a proper version of _assert. It nows shows a message box with the details and let's the user choose to either abort, debug or ignore the assertion.
See bug 5486, bug 5507, bug 5511

svn path=/trunk/; revision=48432
2010-08-03 16:09:33 +00:00
Sir Richard
734491e01c [CMAKE]: Forgot to delete this guy.
svn path=/branches/cmake-bringup/; revision=48431
2010-08-03 16:06:10 +00:00
Sir Richard
3fff31cd81 [CMAKE]: Start working on ntdll.
svn path=/branches/cmake-bringup/; revision=48430
2010-08-03 16:05:53 +00:00
Sir Richard
f0a4bf29e6 [CMAKE]: Simplify more makefiles.
svn path=/branches/cmake-bringup/; revision=48429
2010-08-03 14:56:22 +00:00
Sir Richard
0436f84653 [CMAKE]: Simplify makefiles.
svn path=/branches/cmake-bringup/; revision=48428
2010-08-03 14:54:19 +00:00
Sir Richard
5abcbffcd0 [CMAKE]: Make simple rule for building ASM files.
[CMAKE]: Enable RC support.
[CMAKE]: Stop building tools we won't need.

svn path=/branches/cmake-bringup/; revision=48427
2010-08-03 14:53:12 +00:00
Amine Khaldi
9c529a8548 [CMAKE]
- Richard : Group message headers creation into one macro.

svn path=/branches/cmake-bringup/; revision=48426
2010-08-03 14:29:04 +00:00
Sir Richard
044e663dad [RTL]: Rtl ByteSwap functions should use intrinsics, isntead of assembly code. This should be merged into trunk!
svn path=/branches/cmake-bringup/; revision=48425
2010-08-03 01:56:35 +00:00