Commit graph

68594 commits

Author SHA1 Message Date
Alex Ionescu fe15b28371 Virtual memory works baby! Virtual Heap at 0x80000000 fully enabled. Next up, EFI Protocols with Paging Enabled.
[BOOTLIB]: Fix dumb bug in BlMmIsTranslationEnabled which would always return FALSE.
[BOOTLIB]: Fix dumber bug in MmDefInitializeTranslation which was freeing the page directories and self-map pages even in the success path. Causing us to zero out paging structures...
[BOOTLIB]: Cleanup and extend MmMdDbgDumpList for internal use, and add MmMdListPointerToName as another debug function.
[BOOTLIB]: Add a few more checkpoints in unimplemented paths.

svn path=/trunk/; revision=74545
2017-05-14 16:07:21 +00:00
Pierre Schweitzer 4875f5476e [MUP]
Split MUP into two parts; MUP on one side, DFS on the second side.
This will allow using headers in other parts

svn path=/trunk/; revision=74544
2017-05-14 10:15:43 +00:00
James Tabor 5e9d1bc628 [NtGDI]
- Implement internal functions for setting and retrieving DC origin. Related to CORE-13110.
- Code fix ups.

svn path=/trunk/; revision=74543
2017-05-14 01:00:27 +00:00
Alex Ionescu d4534e81e1 [BOOTLIB]: Implement MmMdTruncateDescriptors
[BOOTLIB]: Implement MmPaTruncateMemory and call it during paging initialization to remove > 4GB memory.c
[BOOTLIB]: Implement BlpMmInitializeConstraints if those BCD options are used.

svn path=/trunk/; revision=74542
2017-05-14 00:39:30 +00:00
Alex Ionescu 920b985227 [BOOTLIB]: Complete implementation of MmMdRemoveRegionFromMdlEx
svn path=/trunk/; revision=74541
2017-05-14 00:11:48 +00:00
Thomas Faber b6e4109ff1 [MKHIVE]
- Fail when something goes wrong instead of pretending everything's peachy.
CORE-13241 #resolve

svn path=/trunk/; revision=74540
2017-05-13 22:47:59 +00:00
Timo Kreuzer 698c2abb16 [NTOSKRNL] Improve S-List-Fault detection in KiTrap0EHandler to handle usermode faults as well.
svn path=/trunk/; revision=74539
2017-05-13 20:07:39 +00:00
Thomas Faber 4185903012 [CMAKE]
- Only call mkhive once, as it always generates all 6 binary hives (and if you don't give it all inf files, some of the hives will end up empty).
- Remove no longer needed dependency of efisys on bcd_hive
CORE-13241

svn path=/trunk/; revision=74537
2017-05-13 19:54:51 +00:00
Alex Ionescu 29d82352a3 [BOOTLIB]: Separate free and zero memory, and code vs data runtime data, as newer bootlibs do.
[BOOTLIB]: Fix bugs in MmMdpHasPrecedence and cleanup.
[BOOTLIB]: Fix bug in MmMdFreeDescriptor.
[BOOTLIB]: Cleanup MmMdpSaveCurrentListPointer.
[BOOTLIB]: Fix bug in MmMdpCoalesceDescriptor.
[BOOTLIB]: Fix multiple bugs in MmMdAddDescriptorToList, and cleanup.

svn path=/trunk/; revision=74536
2017-05-13 19:32:26 +00:00
Mark Jansen c7afd6f90c [APPHELP][SHIMLIB] Forward some events to loaded shims. CORE-11329
svn path=/trunk/; revision=74535
2017-05-13 18:49:27 +00:00
Mark Jansen b4e46f9021 [NDK][RTL] Make the Name argument in RtlQueryEnvironmentVariable_U const.
svn path=/trunk/; revision=74534
2017-05-13 17:26:59 +00:00
Giannis Adamopoulos e4832e1f99 [UXTHEME] -Fix the tab background pattern hack when the background pattern is smaller than the window that we are trying to paint. CORE-13147, CORE-13192.
There is still a bug where the pattern doesn't change after a theme change.

svn path=/trunk/; revision=74522
2017-05-12 12:44:49 +00:00
Mark Jansen 3305b84402 [SHELL32] Add stub for SHEnumerateUnreadMailAccountsW, needed by Thunderbird. Found by Joachim Henze. CORE-13229
svn path=/trunk/; revision=74521
2017-05-11 20:20:47 +00:00
Alex Ionescu 676adf3c06 Fully working x86 paging support!
[BOOTLIB]: Fix a critical bug in BlpArchSwitchContext which was not switching to Firmware mode once paging was enabled.
[BOOTLIB]: Fix a critical bug in OslMain which was incorrectly setting BL_LIBRARY_INITIALIZATION_COMPLETED instead of BL_LIBRARY_FLAG_REINITIALIZE_ALL and causing all sorts of failure paths.
[BOOTLIB]: MmDefInitializeTranslation now turns on paging.
[BOOTLIB]: Implement TrpGenerateMappingTracker and BlpArchEnableTranslation
[BOOTLIB]: BlMmMapPhysicalAddressEx now works with paging enabled, and correctly finds mapped memory to use from the virtual MDLs.
[BOOTLIB]: MmPapAllocateRegionFromMdl now handles virtual allocations from MmMdlMappedUnallocated.
[BOOTLIB]: MmPapAllocatePagesInRange now handles BlMemoryKernelRange (KSEG0) allocations.
[BOOTLIB]: MmMdFindSatisfyingRegion now handles virtual descriptors as well, and handles alignment better.

svn path=/trunk/; revision=74519
2017-05-10 14:38:34 +00:00
Colin Finck a366e71f50 [PRINTING]
SetDefaultPrinterW needs to fail with ERROR_INVALID_PRINTER_NAME if the input parameter is invalid. Also add a test for that.

svn path=/trunk/; revision=74518
2017-05-10 13:03:08 +00:00
Giannis Adamopoulos 643b7c9da9 [SHELL32_APITEST] -Add tests for Control_RunDLLW.
svn path=/trunk/; revision=74517
2017-05-10 10:06:02 +00:00
Hermès Bélusca-Maïto 3acad0e9e5 [USETUP]: Fix the primary/extended partitions creation checks introduced in r63392 : indeed this is if there are *already* 4 (primary) partitions in the table that we cannot create new primary/extended partitions.
Otherwise with the old (broken) checks, we allowed creating more than 4 partitions, and then we overflowed over memory and corrupted the partition list structures.

svn path=/trunk/; revision=74516
2017-05-09 22:09:06 +00:00
Hermès Bélusca-Maïto af645ee7a2 [FREELDR]: Report the correct number of BIOS (hard) disk drives detected, that is, without any possible extra boot drive that went enumerated afterwards.
This fixes the list of disks enumerated in HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\MultifunctionAdapter\0\DiskController\0\DiskPeripheral\
and we now behave in this regards similarly to Windows 2003 & co.
I thank Lesan Ilie for reporting & testing, and Serge Gautherie and Peter Hater for reviewing.
This fixes a bug introduced in commit r59079.
CORE-13131

svn path=/trunk/; revision=74515
2017-05-09 19:33:46 +00:00
Mark Jansen 423102807d [SDK] Add enum for PEB.AppCompatFlagsUser
svn path=/trunk/; revision=74514
2017-05-09 18:15:22 +00:00
Colin Finck 5b6e082869 [PRINTING]
- Implement GetDefaultPrinterA/W and SetDefaultPrinterA/W in winspool.drv. Also add tests for these functions.
- Set our "Dummy Printer on LPT1" as the default printer in the user registry.
- Return meaningful values for DeviceNotSelectedTimeout and TransmissionRetryTimeout in PRINTER_INFO_5 in localspl.

The Print dialog now preselects "Dummy Printer on LPT1" in all applications.
One more task done from the list at https://reactos.org/wiki/Printing :)

svn path=/trunk/; revision=74513
2017-05-09 15:44:42 +00:00
Hermès Bélusca-Maïto f06734e55d [USETUP]: Improve the bootsector validity check performed in IsThereAValidBootSector:
- Check for the first 3 bytes (and not 4) of the bootsector to not be zero (that's our criterium for a "valid instruction"). Therefore, a bootsector starting with "00 00 00 xx" (with xx the first byte of a volume identifier) is detected as invalid (because the BIOS won't be able to run it anyways) and therefore, needs to be overwritten.
- Check that its last 2 bytes are the valid 0xAA55 signature.
These improvements were suggested by Serge Gautherie and Peter Hater.
CORE-4870 CORE-12672 CORE-13188
- Move a DPRINT1 around.

svn path=/trunk/; revision=74512
2017-05-09 15:31:53 +00:00
Giannis Adamopoulos 16e06b89aa [DESK.CPL] -Addendum to 74506 which was a bit rushed. Make it possible to apply a theme that was opened by double click. Also add the active theme in the list of themes if it was not enumerated in the themes directory.
svn path=/trunk/; revision=74511
2017-05-09 08:13:49 +00:00
Thomas Faber a465b60e7f [SHELL32]
- Fix AddCommasW

svn path=/trunk/; revision=74510
2017-05-09 07:45:30 +00:00
Hermès Bélusca-Maïto 0c9cd421ee [DISK]: Small fixes:
- Check for malformed disk identifier, which must be at least 9 WCHARs long (as done by disk_new);
- Prevent possible memory leaks (missing ExFreePool's) + closing registry key.
Investigated by Lesan Ilie during tests; as part of CORE-13131.
- Make one of our hacks more readable (by me).
(We also note that this driver uses the ExAllocate/FreePool functions in the old-school way).

svn path=/trunk/; revision=74509
2017-05-08 21:34:07 +00:00
Giannis Adamopoulos 4bb2162111 More build fixes.
svn path=/trunk/; revision=74508
2017-05-08 19:08:30 +00:00
Giannis Adamopoulos 8b566eee47 Fix build.
svn path=/trunk/; revision=74507
2017-05-08 19:02:49 +00:00
Giannis Adamopoulos bd209c59d1 [DESK.CPL] -Implement opening msstyles files.
svn path=/trunk/; revision=74506
2017-05-08 18:45:35 +00:00
Robert Naumann ac91514ccd [EXPLORER] Some style suggestions by Mark Jansen. Thanks
svn path=/trunk/; revision=74505
2017-05-08 17:46:55 +00:00
Hermès Bélusca-Maïto a3842a814c [CONSOLE.CPL]: Fix the console window preview:
- turn it into a custom control;
- supports dynamic preview area depending on the actual current monitor screen resolution;
  (note that on ReactOS, the WM_DISPLAYCHANGE is not correctly sent, see CORE-13212, therefore this functionality won't show up yet)
- supports correct rescaling of the console preview drawn in the preview area;
- supports dependence of the console preview with respect to the chosen font character dimensions.
The code is there, it may be a little bit improved in the future.
CORE-13196 #resolve

Other additions:
- Add a few space between the console preview text window border and the text sample;
- PaintText and PaintStaticControls do not need to return anything.

svn path=/trunk/; revision=74504
2017-05-08 17:33:33 +00:00
Hermès Bélusca-Maïto 9e97728d4f [CONSOLE.CPL]: Minor modifications:
- Use "hDlg" (as done in the rest of the code) instead of "hwndDlg";
- Refresh the console window preview whenever a dimension or a position was changed.

svn path=/trunk/; revision=74503
2017-05-08 17:24:57 +00:00
Hermès Bélusca-Maïto c24fbddd42 [CONSOLE.CPL]: Simplify the color selection code by factorizing common parts.
svn path=/trunk/; revision=74502
2017-05-08 17:19:07 +00:00
Robert Naumann e8476bec2a [EXPLORER] Addendum to r74500. Those 2 commits belong to CORE-11498
svn path=/trunk/; revision=74501
2017-05-08 15:50:07 +00:00
Robert Naumann a0360cc9e8 [EXPLORER]
- Load and save "Lock Taskbar", "Hide inactive icons", and "Group similar taskbar buttons". Verified on Win2k3 via "Nirsoft RegFromApp".
- use a loader function for registry values.
- save the "show seconds" setting together with the other explorer settings instead of a ROS specific key.
- Add some documentation comments.

svn path=/trunk/; revision=74500
2017-05-08 15:27:33 +00:00
Mark Jansen 5c8991ddbd [WIN32SS] Fix font names not including style info (Bold etc). Patch by Katayama Hirofumi MZ. CORE-12179 #comment Thanks!
svn path=/trunk/; revision=74499
2017-05-08 14:53:30 +00:00
Thomas Faber 8600730e9c [SHELL32]
- Avoid leaking the list items on destruction of CEnumIDListBase
CORE-13194

svn path=/trunk/; revision=74498
2017-05-08 10:59:27 +00:00
Thomas Faber 0db63068ac [USER32]
- Avoid a memory leak in User32EnumWindows in case the window count is zero.
CORE-13194

svn path=/trunk/; revision=74497
2017-05-08 08:29:17 +00:00
Thomas Faber ba1fcb6554 [NTOS:IO]
- Use pool tagging

svn path=/trunk/; revision=74496
2017-05-08 06:54:35 +00:00
Hermès Bélusca-Maïto 55bf6ea8ff [NTOS]: Addendums to r74491 and r74493:
- Free the FullServiceName buffer if PnpRootCreateDevice failed (erroneously committed in r74494, see pnpmgr.c line 1080);
- No need to close InstanceHandle if the IopCreateDeviceKeyPath call failed, since in this case the registry handle wasn't opened. CORE-13207
- Don't assert on Buffer allocation but return a proper failure code in case of failure. CORE-13208
These are suggestions from Serge Gautherie + Lesan Ilie.

- Add a forgotten ZwClose call in the success code path of IopCreateDeviceKeyPath in IopQueryDeviceCapabilities (by me).

svn path=/trunk/; revision=74495
2017-05-08 00:58:45 +00:00
Hermès Bélusca-Maïto 32b595761c [NTOS]: Code formatting + free the memory in the reverse order from how it was allocated.
svn path=/trunk/; revision=74494
2017-05-08 00:51:44 +00:00
Hermès Bélusca-Maïto 837c766030 [NTOS]: Capture the counted BaseDllName unicode string into a local NULL-terminated buffer before calling wcsrchr on it (actually I think it would be better to create & use a similar function that takes counted strings in input).
Also use 'L' prefix for wide characters and UNICODE_NULL for string terminator.
Patch by Lesan Ilie.
CORE-13208 #resolve

svn path=/trunk/; revision=74493
2017-05-07 18:15:12 +00:00
Hermès Bélusca-Maïto 2b8120a968 [NTOS]: Code formatting changes only.
svn path=/trunk/; revision=74492
2017-05-07 18:12:18 +00:00
Hermès Bélusca-Maïto 0b299f6798 [NTOS]: Fix a potential memory leak.
- If one of the ZwSetValueKey function fails, 'Node->ServiceName.Buffer' is leaked. 
- Also use 'L' prefix for wide characters.
Patch by Lesan Ilie, thanks!
- Use "P(C)WSTR" instead of win32 "LP(C)WSTR" string pointer types (by me).
CORE-13207 #resolve

svn path=/trunk/; revision=74491
2017-05-07 17:50:18 +00:00
Thomas Faber cf595e72fa [NTDLL]
- Implement user-mode version of RtlWalkFrameChain (mostly as a copy of the kernel version). Now RtlCaptureStackBackTrace actually, you know, captures stack back-traces.

svn path=/trunk/; revision=74490
2017-05-06 17:51:26 +00:00
Thomas Faber 8550143bab [KMTESTS:RTL]
- Add a test for RtlWalkFrameChain and RtlCaptureStackBackTrace

svn path=/trunk/; revision=74489
2017-05-06 15:29:56 +00:00
Eric Kohl d4b437e4ee [INTL]
- Get rid of the individual getter funtions. Use GetSelectedComboBoxIndex for all CBS_DROPDOWNLIST comboboxes and GetSelectedComboBoxText for all CBS_DROPDOWN comboboxes.
- Check the relevant settings only!
- Rename SetXxxSettings to GetXxxSettings because it is a getter function.
- Handle the bogus WM_COMMAND/EN_CHANGE message that is sent when the IDC_SECONDYEAR_EDIT edit control is initialized. Controls should NEVER send notifications when they are modified programmatically! :-/

svn path=/trunk/; revision=74488
2017-05-06 14:41:50 +00:00
Eric Kohl 3ac350cfe0 [INTL]
Changed locale options doesn't reload correctly before next reboot.
- Added SetNumberSetting, SetCurrencySetting, SetDateSetting and SetTimeSetting functions to get and check values.
- Don't directly change pGlobalData.
- Post WM_WININICHANGE after all changes have been applied.
Based on a patch by Katayama Hirofumi MZ.
CORE-10170

svn path=/trunk/; revision=74487
2017-05-06 13:43:03 +00:00
Thomas Faber 80aa7fd7f9 [WIN32K:NTGDI]
- Avoid using floating point operations in kernel mode.
CORE-10893

svn path=/trunk/; revision=74486
2017-05-06 12:18:21 +00:00
Thomas Faber 26344e7671 [MMSYS]
- Simplify code by using windowsx.h. Patch by Katayama Hirofumi MZ.
CORE-12903

svn path=/trunk/; revision=74485
2017-05-06 10:14:29 +00:00
Thomas Faber 3dfda10ed9 [MMSYS]
- Make browse dialog title and filter localizable. Based on a patch by Katayama Hirofumi MZ.
CORE-12903

svn path=/trunk/; revision=74484
2017-05-06 09:27:32 +00:00
Thomas Faber 9ef60ad5b0 [MMSYS]
- Pass byte counts to RegQueryValueEx instead of character counts. Based on a patch by Katayama Hirofumi MZ.
CORE-12903

svn path=/trunk/; revision=74483
2017-05-06 08:43:56 +00:00