Commit graph

43433 commits

Author SHA1 Message Date
evb af01479fbf - Add support for PnP IRP to PDO: IRP_MN_QUERY_BUS_INFORMATION (PciQueryBusInformation), IRP_MN_QUERY_ID (PciQueryId), IRP_MN_QUERY_DEVICE_TEXT (PciQueryDeviceText), IRP_MN_QUERY_CAPABILITIES (PciQueryCapabilities), IRP_MN_QUERY_DEVICE_RELATIONS (PciQueryTargetDeviceRelations implement, PciQueryEjectionRelations, stub)
- Stub support for PnP IRP to PDO: IRP_MN_QUERY_RESOURCE_REQUIREMENTS (PciQueryRequirements), IRP_MN_QUERY_RESOURCES(PciQueryResources)
- Add support for PnP IRP to FDO: IRP_MN_QUERY_CAPABILITIES (handle in PciFdoIrpQueryDeviceCapabilities)
- Build device capability UI number (PciDetermineSlotNumber), use PIR$ (seem support broken, need to check loader) or device property for bus not root
- Use parent attachee device and this PDO for build device/system wake states, latency, device/system power mappings
- PCI-ID manage support: PciInitIdBuffer, PciIdPrintf, PciIdPrintfAppend
- Debug helper: PciDebugDumpQueryCapabilities
- Thanks richard for advise + beer
PCI-X driver now pass 10000 codes lines!

svn path=/trunk/; revision=48548
2010-08-14 17:09:20 +00:00
Cameron Gutman 912704ceb8 [NTOSKRNL]
- Move to the next entry in the thread IRP list before calling IoCancelIrp because if everything works as expected and IoCompleteRequest is called, we could end up with the IRP ripped out from under us before can move to the next element
- See issue #5550 for details.

svn path=/trunk/; revision=48546
2010-08-14 14:55:12 +00:00
Cameron Gutman ccfa72f607 [WS2_32]
- Create a temporary variable and pass that to WSAIoctl for the bytes returned value instead of passing argp and corrupting the value we just retrieved

svn path=/trunk/; revision=48545
2010-08-14 13:48:31 +00:00
Aleksey Bragin 0be662421f [WINLOGON]
- NtInitializeRegistry expects not just CM_BOOT_FLAG_ACCEPTED, but a number of the accepted control set to be added to it. After fixing this, NtInitializeRegistry won't fail with STATUS_INVALID_PARAMETER (someone should check return status for errors...) anymore. As a result lazy flushing is enabled.

svn path=/trunk/; revision=48536
2010-08-13 22:02:17 +00:00
Aleksey Bragin e68f31b46a [FASTFAT_NEW]
- Implement asynchronous and delayed close operations.
- Fix a logical bug in FatiClose code, which led to always closing the file object (and freeing respective FCB/VCB/CCB), and then checking flags and queuing a delayed close. Instead, it should only try to close if it's not marked as a delayed close.
- Support stuff added (queues, mutex for closing lists, etc).
- Misc cleanup, debug silencing.

svn path=/trunk/; revision=48525
2010-08-12 21:59:22 +00:00
Cameron Gutman 8d3e4feb39 - I hate catching these things as the commit is going out
svn path=/trunk/; revision=48523
2010-08-12 13:15:35 +00:00
Cameron Gutman 17e0e75eb5 [MSAFD]
- Update lpcbBytesReturned when FIONREAD is called
- Fix the value inside lpErrno when XxxSocketInformation() fails
- Pass the unrecognized IOCTLs to the winsock helper (no behavior change for this yet because wshtcpip's WSHIoctl is unimplemented)

svn path=/trunk/; revision=48522
2010-08-12 13:13:19 +00:00
Aleksey Bragin 11f2175562 [FASTFAT_NEW]
- Plug in a commented out notification call in case of cleanup.
- Implement a case of device info query.
- Implement lock control.

svn path=/trunk/; revision=48518
2010-08-11 12:18:24 +00:00
Timo Kreuzer aac1625f1f [NTOSKRNL]
Stop using the new paged pool code, before ExpLoadInitialProcess is called. For so far unknown reasons, it causes evil things to happen. Fixes "Assertion NewSize < pool->UserSize failed"
See issue #5551 for more details.

svn path=/trunk/; revision=48517
2010-08-11 01:22:06 +00:00
Amine Khaldi da140c1ba3 [DDK]
- De-duplicate __GNU_EXTENSION.
- Apply a consistent formatting.

svn path=/trunk/; revision=48514
2010-08-10 20:50:55 +00:00
Aleksey Bragin 94c9f4008f [FASTFAT]
Pierre Schweitzer
- Fix volume opening on FAT volume. Commented out a directory check as it doesn't match realized tests, in spite of what's in WDK.

svn path=/trunk/; revision=48513
2010-08-10 20:08:31 +00:00
Amine Khaldi 0fb515fa5b [XDK]
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions.
[DDK]
- Update XDK generated headers to reflect the recent changes.
- Update some header guards.
- Add some missing new lines at the end of files.
- Fix PUSB_DEVICE_HANDLE guard.
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions.
[PSDK]
- Update some header guards.
- Add missing new line at the end of driverspecs.h
[NDIS]
- Update the ndis header guard.

svn path=/trunk/; revision=48511
2010-08-10 13:53:10 +00:00
Amine Khaldi 07bb7dd863 [PSDK]
- Add some missing headers' headers.

svn path=/trunk/; revision=48510
2010-08-10 11:27:27 +00:00
Amine Khaldi 3e2e35f5db [PSDK]
- Add WINELIB_NAME_AW and DECL_WINELIB_TYPE_AW to the wine specific imm.h.

svn path=/trunk/; revision=48509
2010-08-10 10:25:10 +00:00
Cameron Gutman 1fde230130 [WS2_32]
- Fix a crash when running with ws2_32 debugging on

svn path=/trunk/; revision=48507
2010-08-10 07:14:42 +00:00
Timo Kreuzer 713d12fd47 Add include guards in wine/ddk/imm.h and inlude it from wine/imm.h
svn path=/trunk/; revision=48503
2010-08-10 01:08:03 +00:00
Amine Khaldi a334719f12 [PSDK]
- Move INPUTCONTEXT and ImmLockIMC to the wine imm.h
- Add wingdi.h inclusion.

svn path=/trunk/; revision=48502
2010-08-10 00:46:27 +00:00
Timo Kreuzer 2bf65890b7 [WIN32K] Fix NtGdiMaskBlt to handle patterns correctly, use SRCAND, which is more optimized, instead of DSTERASE, and set fore and background colors correctly to not destroy alpha channel.
[SHELL32] Use MaskBlt to draw the shortcut overlay
Finally fixes bug 5455. Forever. (I hope.)

svn path=/trunk/; revision=48501
2010-08-09 23:28:19 +00:00
Amine Khaldi 329c3e4970 [PSDK]
- Add some missing imm.h definitions.
[IMM32]
- Fix imm.h inclusion.
[IPHLPAPI]
- Fix tdiinfo.h inclusion.

svn path=/trunk/; revision=48500
2010-08-09 22:53:07 +00:00
Amine Khaldi 7e8308d2f2 [DDK]
- Move several headers to PSDK where they belong.
[PSDK]
- ddrawi.h : Fix pUnkOuter.

svn path=/trunk/; revision=48499
2010-08-09 22:20:05 +00:00
Aleksey Bragin 03d3e84856 [FASTFAT_NEW]
- Implement opening an existing DCB.
- Add a bunch of useful macros and helper functions and use them throughout the code.
- Implement in-memory setendoffile set information class. On-disk to be done.
- Implement user fs ctrl wrapper with stubs.
- Fill up QueryVolumeInfo with classes it should handle. Silence up a warning about classes it should reject.

svn path=/trunk/; revision=48498
2010-08-09 21:33:17 +00:00
Amine Khaldi e787f57ee7 [DDK]
- Move several headers to PSDK where they belong.
- Add _ANONYMOUS_UNION.
- De-duplicate __GNU_EXTENSION definition from several headers.
- Remove semicolons after the closing bracket of extern "C"
- Add a missing one in ioaccess.h
- Apply a consistent formatting.
[PSDK]
- De-duplicate __GNU_EXTENSION definition from several headers.
- Add missing extern "C" opening bracket in ddkernel.h and remove the semicolon from the closing one.
- Add __GNU_EXTENSION definition to ddraw.h and remove the semicolon after the closing bracket of extern "C"
- Add missing extern "C" closing bracket in ddrawi.h
- Remove semicolons after the closing brackets of extern "C" in dinput.h, dmemmgr.h and sti.h
- Apply a consistent formatting.
[DXSDK]
- Move ddraw.h to PSDK.

svn path=/trunk/; revision=48497
2010-08-09 20:58:47 +00:00
Aleksey Bragin 07a6bcfb57 Carlo Bramix
- Prevent possible out-of-bounds access.
See issue #5505 for more details.

svn path=/trunk/; revision=48495
2010-08-09 20:41:41 +00:00
Aleksey Bragin 9d1462a2b7 Pierre Schweitzer
- A better fix for CdfsIsNameLegalDOS8Dot3.

See issue #2404 for more details.

svn path=/trunk/; revision=48494
2010-08-09 20:38:12 +00:00
Cameron Gutman 6cb85c8ae3 [DHCPCSVC]
- Set the SO_BROADCAST option to 1 before we send data to the broadcast address so we don't get stonewalled by mswsock
- DHCP is now compatible with mswsock_new

svn path=/trunk/; revision=48493
2010-08-09 20:37:32 +00:00
evb 55f39ef1a3 Support PCI device resource dicsovery for limit and current now, so bridge + device BAR functionning
PciScanBus second pass enabled: PciProcessBus, most stubs now until VGA/ISA system tested
PciClassifyDeviceType implement as helper function
PCI Enumeration 100% complete!

svn path=/trunk/; revision=48492
2010-08-09 19:07:52 +00:00
Cameron Gutman f83e778875 [WS2_32]
- Check the return value of WSPSelect instead of the error number because the error number doesn't have to be initialized if the function doesn't return SOCKET_ERROR

svn path=/trunk/; revision=48491
2010-08-09 15:42:51 +00:00
Aleksey Bragin f1a6ba977a [FASTFAT_NEW]
- Implement close and cleanup infrastructure.
- Add necessary FCB and VCB counters.
- Add missing op and file locks initialization.
- A lot of small cleanups, improvements, and other things, bringing fastfat_new much closer to a minimally working state.

svn path=/trunk/; revision=48487
2010-08-08 10:43:28 +00:00
Aleksey Bragin 1dac3daaa1 Pierre Schweitzer
- Implemented CdfsIsNameLegalDOS8Dot3 and use it to check filenames. It avoids
calling Rtl* functions that need NLS. (Modified merge of 35501).
See issue #2404 for more details.

svn path=/trunk/; revision=48486
2010-08-08 08:24:19 +00:00
Timo Kreuzer 7dc11f26bf [TASKMGR]
- Use messages instead of events to notify the update threads
- Fixes a handle leak
- Fix some typos
- Patch by Carlo Bramini (carlo.bramix at libero dot it)

See issue #3104 for more details.

svn path=/trunk/; revision=48484
2010-08-08 03:41:33 +00:00
Timo Kreuzer 9caaf3d69c [KERNEL32] Convert default locales to actual locale identifiers, before passing to IsValidLocale(). Fixes corrupted file size strings in explorer.
[SHLWAPI] Fix some comments (As usual: "should be sent to wine")
Patch by Rafal Harabień, <rafalh1992 AT o2 DOT pl>

See issue #5557 for more details.

svn path=/trunk/; revision=48482
2010-08-07 22:41:23 +00:00
Timo Kreuzer dfe0f8a1a1 [DDK]
Make functions in ntstrsafe.h static, so they can be used in more than one file. Maybe that encourages people using it instead of unsafe and banned apis.

svn path=/trunk/; revision=48481
2010-08-07 21:29:00 +00:00
Timo Kreuzer 0156668176 [NTOSKRNL]
Deferred success...

svn path=/trunk/; revision=48480
2010-08-07 21:22:00 +00:00
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
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
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
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