Improve the code to enumerate monitors.
- Don't use custom MIN / MAX / ABS macros
- Calculate distance by r^2 = x^2 + y^2
- Use RECTL_bIntersectRect instead of code duplication
- Fix possible NULL pointer dereference
- pass bottom-right exclusive rect to IntGetMonitorsFromRect from NtUserMonitorFromPoint
- Don't handle MONITOR_DEFAULTTOPRIMARY and MONITOR_DEFAULTTONEAREST twice
- Use unsigned variables for unsigned values
- Don't check the result of a UINT returning function for < 0
- Improve readability
svn path=/trunk/; revision=49310
- Don't lie about page protection in MiQueryAddressState. Fixes PDFCreator-alike bugs.
See issue #5627 for more details.
svn path=/trunk/; revision=49296
- Handle various special cases in NtQueryVirtualMemory (e.g. querying illegal virtual addresses, shared memory area, etc). Example of an app doing this - OllyDbg.
svn path=/trunk/; revision=49277
Main features:
- Implement LDEVOBJ api. Responsible for loading dlls (display drivers, font drivers, keyboard layout, etc), replacing code in different locations.
- Implement PDEVOBJ api. A PDEVOBJ represents a physical device and is the core component for handling multiple display devices.
- Rewrite device locking. The new method was neccessary to allow dynamic mode switching.
- Implement support for enumerating display devices and settings.
- Implement dynamic mode switching.
- Implement a number of Eng mapping functions.
- Rewrite Eng level surface handling for cleaner code and better compatability.
- Rewrite parts of the DIB handling code.
- Rewrite DC creation and deletion. Deletion and cleanup is now completely callback based. Now we don't leak the DC objects when terminating a process, like we did before.
- Improve the XLATE and BRUSH code, removing several old hacks.
- Improve icon code.
Thanks to Jerome Gardou, Kamil Hornicek and everyone helping.
svn path=/trunk/; revision=49275
- One more leftover to add. Now we test for both Local and Global hooks in user32. This will force any message sent to win32k if there are any Global hookers so we loose in performance. We need to rethink our usage of these Global hookers in our code.
svn path=/trunk/; revision=49268
Simplify the RLE hack and avoid code duplication.
Bail out of UserEnumDisplaySettings early in case invalid ModeNum was requested.
Use default BPP value in UserChangeDisplaySettings if DM_BITSPERPEL is not set. Partially fixes "fullscreen issue" as described on the yarotows wiki page.
Remove some unused variables + misc cleanup.
svn path=/branches/reactos-yarotows/; revision=49267
Set proper flags and masks in BuildDIBPalette. Set PAL_BGR for 24/32 BPP in AllocPalette. Rename Mode to Flags to better reflect its usage. Fixes "red icons" and dibtest.
svn path=/branches/reactos-yarotows/; revision=49265
- Initialize Found to FALSE in NtQueryVirtualMemory. I wonder how GCC missed uninitialized var usage?
- Implement case when NtQueryVirtualMemory is called with non-existing virtual address.
See issue #3755 for more details.
svn path=/trunk/; revision=49261
- Fix a broken loop that resulted in us registering the resources of multiple COM ports as our KD port
- Fixes bug #5530
svn path=/trunk/; revision=49256
- Use new handle check functions in RCloseServiceHandle().
- RControlService: Check if a control request is acceptable for a user mode service before sending it to the service.
svn path=/trunk/; revision=49253
- Fix a critical bug in the conflict detection code
- Don't unconditionally skip conflict detection for shared resources, instead it should be done on a descriptor-by-descriptor basis (if both descriptors are shared)
- This check wasn't removed when I initially wrote this code and added the proper check below
svn path=/trunk/; revision=49252
- Check that we got a valid vector back from HAL when translating an interrupt resource
- Add some debugging messages for failure paths in device resource handling code
svn path=/trunk/; revision=49251
- Fix an exception when set condition * first always is used then moving the mouse. There seems to be an initialization issue (The Init Bug) and not setting a desktop.
svn path=/trunk/; revision=49250
- Partially implement IoAssignResources so that it creates a non-conflicting resource list from the requirements but it doesn't claim the resources for the device in the registry
- Partially implement IoReportResourceUsage so that it checks the resource list for conflicts but doesn't claim the resources in the registry
- Please test this revision with a variety of hardware and drivers because it activates several code paths in the PnP manager
- If this causes problems, look for "Denying an attempt to claim resources currently in use by another device!" in the debug log and report the bug to me
svn path=/trunk/; revision=49249
- Rewrite the resource map code to fix a regression, several failures cases, and a few memory leaks
- Remove an incorrect definition of IopDetectResourceConflict in pnpreport.c (no idea how this didn't trigger an onslaught of warnings)
svn path=/trunk/; revision=49248