3 years ago[VIDEOPRT]
Thomas Faber [Thu, 18 May 2017 21:29:24 +0000 (21:29 +0000)]
- Guard Ke386CallBios calls against concurrent execution.

svn path=/trunk/; revision=74581

3 years ago[UXTHEME] -Remove a debug print that was never meant to be committed.
Giannis Adamopoulos [Thu, 18 May 2017 17:53:33 +0000 (17:53 +0000)]
[UXTHEME] -Remove a debug print that was never meant to be committed.

svn path=/trunk/; revision=74580

3 years ago[UXTHEME] -Apply some suggestions by Thomas.
Giannis Adamopoulos [Thu, 18 May 2017 17:15:22 +0000 (17:15 +0000)]
[UXTHEME] -Apply some suggestions by Thomas.

svn path=/trunk/; revision=74579

3 years ago[MSTSC] Addendum to r74577. CORE-13263
Peter Hater [Thu, 18 May 2017 08:57:26 +0000 (08:57 +0000)]
[MSTSC] Addendum to r74577. CORE-13263

svn path=/trunk/; revision=74578

3 years ago[MSTSC] Fix BSOD when we can't acquire context from CryptoAPI. CORE-13263 #resolve
Peter Hater [Thu, 18 May 2017 08:47:30 +0000 (08:47 +0000)]
[MSTSC] Fix BSOD when we can't acquire context from CryptoAPI. CORE-13263 #resolve

svn path=/trunk/; revision=74577

3 years ago[BOOTLIB]
Thomas Faber [Wed, 17 May 2017 16:06:24 +0000 (16:06 +0000)]
- Avoid uninitialized ComputeHash variable in BlImgLoadImageWithProgress2
CORE-13265 #resolve

svn path=/trunk/; revision=74571

3 years ago[MSTSC] Fix parsing of settings. Patch by Stas'M. Thanks. CORE-13223
Peter Hater [Wed, 17 May 2017 10:53:54 +0000 (10:53 +0000)]
[MSTSC] Fix parsing of settings. Patch by Stas'M. Thanks. CORE-13223

svn path=/trunk/; revision=74568

3 years ago[MSTSC] Send computer name as client name when available. Patch by Stas'M. Thanks...
Peter Hater [Wed, 17 May 2017 10:47:39 +0000 (10:47 +0000)]
[MSTSC] Send computer name as client name when available. Patch by Stas'M. Thanks. CORE-13237

svn path=/trunk/; revision=74567

3 years ago[FORMAT]: Use a better variable type for the media flag.
Hermès Bélusca-Maïto [Tue, 16 May 2017 20:17:18 +0000 (20:17 +0000)]
[FORMAT]: Use a better variable type for the media flag.

svn path=/trunk/; revision=74566

3 years ago[SHELL32]: Fix a FIXME: Recognize the media type for formatting, by calling GetDriveT...
Hermès Bélusca-Maïto [Tue, 16 May 2017 20:16:43 +0000 (20:16 +0000)]
[SHELL32]: Fix a FIXME: Recognize the media type for formatting, by calling GetDriveTypeW(). Based on what does too.

svn path=/trunk/; revision=74565

3 years ago[MSTSC] Fix unwanted change
Peter Hater [Tue, 16 May 2017 18:01:31 +0000 (18:01 +0000)]
[MSTSC] Fix unwanted change

svn path=/trunk/; revision=74564

3 years ago[MSTSC] Fix adding module name and IP to logon packet. Patch by Stas'M. Minor modific...
Peter Hater [Tue, 16 May 2017 17:56:51 +0000 (17:56 +0000)]
[MSTSC] Fix adding module name and IP to logon packet. Patch by Stas'M. Minor modification by me. Thanks. CORE-13234

svn path=/trunk/; revision=74563

3 years agoAddendum to r74559: specify 'void' function aka. doesn't take any parameter. In C...
Hermès Bélusca-Maïto [Tue, 16 May 2017 17:45:52 +0000 (17:45 +0000)]
Addendum to r74559: specify 'void' function aka. doesn't take any parameter. In C, a function whose prototype is () means "take an arbitrary number of args".

svn path=/trunk/; revision=74562

3 years ago[MSTSC] Enable taking settings folder using SHGetFolderLocation instead of using...
Peter Hater [Tue, 16 May 2017 17:37:48 +0000 (17:37 +0000)]
[MSTSC] Enable taking settings folder using SHGetFolderLocation instead of using "c:\". Patch by Stas'M. Thanks CORE-13225

svn path=/trunk/; revision=74561

3 years ago[MSTSC] Fix image corruption in 24bpp mode CORE-13224
Peter Hater [Tue, 16 May 2017 17:32:19 +0000 (17:32 +0000)]
[MSTSC] Fix image corruption in 24bpp mode CORE-13224

svn path=/trunk/; revision=74560

3 years ago[ACPI] Implement creating volatile registry keys for ACPI tables CORE-12942
Peter Hater [Tue, 16 May 2017 17:26:12 +0000 (17:26 +0000)]
[ACPI] Implement creating volatile registry keys for ACPI tables CORE-12942

svn path=/trunk/; revision=74559

3 years ago[MSTSC] Switch most MSTSC from internal "ssl" functions to CryptoAPI and implement...
Peter Hater [Tue, 16 May 2017 17:20:56 +0000 (17:20 +0000)]
[MSTSC] Switch most MSTSC from internal "ssl" functions to CryptoAPI and implement/enable certificate functions CORE-13259

svn path=/trunk/; revision=74558

3 years ago[MSTSC] Fix build
Peter Hater [Tue, 16 May 2017 17:03:20 +0000 (17:03 +0000)]
[MSTSC] Fix build

svn path=/trunk/; revision=74557

3 years ago[MSTSC] Bring MSTSC closer to latest rdesktop (1.83) CORE-13258
Peter Hater [Tue, 16 May 2017 16:37:29 +0000 (16:37 +0000)]
[MSTSC] Bring MSTSC closer to latest rdesktop (1.83) CORE-13258

svn path=/trunk/; revision=74556

3 years ago[INTL]
Eric Kohl [Mon, 15 May 2017 20:02:48 +0000 (20:02 +0000)]
Advanced page: Show code pages again.
- Use SetupFindFirstLine and SetupFindNextLine to enumerate all code pages.
- Use heap memory functions instead of global memory functions.
- Get rid of TCHAR.
- Hack: Do not fail if EnumSystemCodePages returns FALSE.

svn path=/trunk/; revision=74555

3 years ago[UXTHEME] -ThemeDrawCaptionText: Try to avoid a heap allocation when getting the...
Giannis Adamopoulos [Mon, 15 May 2017 16:05:14 +0000 (16:05 +0000)]
[UXTHEME] -ThemeDrawCaptionText: Try to avoid a heap allocation when getting the window caption.

svn path=/trunk/; revision=74552

3 years ago[UXTHEME] -Simplify ThemeDrawCaptionText.
Giannis Adamopoulos [Mon, 15 May 2017 15:34:43 +0000 (15:34 +0000)]
[UXTHEME] -Simplify ThemeDrawCaptionText.

svn path=/trunk/; revision=74551

4 years agoBL Library now works 100% in paging, protected mode. A picture is worth a thousand...
Alex Ionescu [Mon, 15 May 2017 01:38:49 +0000 (01:38 +0000)]
BL Library now works 100% in paging, protected mode. A picture is worth a thousand commits:
[BOOTLIB]: Add support for protocol open/close/lookup while paging and protected mode is enabled.
[BOOTLIB]: Implement support for dozens of UEFI functions while under protected mode.
[BOOTLIB]: Fix bugs in existing UEFI functions which were switching to _protected_ mode instead of _real mode_ before making the UEFI call.
[BOOTLIB]: Free dynamic descriptor in MmMdFreeDescriptor.
[BOOTLIB]: Implement BlHtDelete.
[BOOTLIB]: Implement re-initialize-all path in DsppInitialize.
[BOOTLIB]: Fix small bug in BlDisplayInvalidateOemBitmap
[BOOTLIB]: Fix bigger bug in BlDisplayGetOemBitmap :)

svn path=/trunk/; revision=74546

4 years agoVirtual memory works baby! Virtual Heap at 0x80000000 fully enabled. Next up, EFI...
Alex Ionescu [Sun, 14 May 2017 16:07:21 +0000 (16:07 +0000)]
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

4 years ago[MUP]
Pierre Schweitzer [Sun, 14 May 2017 10:15:43 +0000 (10:15 +0000)]
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

4 years ago[NtGDI]
James Tabor [Sun, 14 May 2017 01:00:27 +0000 (01:00 +0000)]
- Implement internal functions for setting and retrieving DC origin. Related to CORE-13110.
- Code fix ups.

svn path=/trunk/; revision=74543

4 years ago[BOOTLIB]: Implement MmMdTruncateDescriptors
Alex Ionescu [Sun, 14 May 2017 00:39:30 +0000 (00:39 +0000)]
[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

4 years ago[BOOTLIB]: Complete implementation of MmMdRemoveRegionFromMdlEx
Alex Ionescu [Sun, 14 May 2017 00:11:48 +0000 (00:11 +0000)]
[BOOTLIB]: Complete implementation of MmMdRemoveRegionFromMdlEx

svn path=/trunk/; revision=74541

4 years ago[MKHIVE]
Thomas Faber [Sat, 13 May 2017 22:47:59 +0000 (22:47 +0000)]
- Fail when something goes wrong instead of pretending everything's peachy.
CORE-13241 #resolve

svn path=/trunk/; revision=74540

4 years ago[NTOSKRNL] Improve S-List-Fault detection in KiTrap0EHandler to handle usermode fault...
Timo Kreuzer [Sat, 13 May 2017 20:07:39 +0000 (20:07 +0000)]
[NTOSKRNL] Improve S-List-Fault detection in KiTrap0EHandler to handle usermode faults as well.

svn path=/trunk/; revision=74539

4 years ago[CMAKE]
Thomas Faber [Sat, 13 May 2017 19:54:51 +0000 (19:54 +0000)]
- 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

svn path=/trunk/; revision=74537

4 years ago[BOOTLIB]: Separate free and zero memory, and code vs data runtime data, as newer...
Alex Ionescu [Sat, 13 May 2017 19:32:26 +0000 (19:32 +0000)]
[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

4 years ago[APPHELP][SHIMLIB] Forward some events to loaded shims. CORE-11329
Mark Jansen [Sat, 13 May 2017 18:49:27 +0000 (18:49 +0000)]
[APPHELP][SHIMLIB] Forward some events to loaded shims. CORE-11329

svn path=/trunk/; revision=74535

4 years ago[NDK][RTL] Make the Name argument in RtlQueryEnvironmentVariable_U const.
Mark Jansen [Sat, 13 May 2017 17:26:59 +0000 (17:26 +0000)]
[NDK][RTL] Make the Name argument in RtlQueryEnvironmentVariable_U const.

svn path=/trunk/; revision=74534

4 years ago[UXTHEME] -Fix the tab background pattern hack when the background pattern is smaller...
Giannis Adamopoulos [Fri, 12 May 2017 12:44:49 +0000 (12:44 +0000)]
[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

4 years ago[SHELL32] Add stub for SHEnumerateUnreadMailAccountsW, needed by Thunderbird. Found...
Mark Jansen [Thu, 11 May 2017 20:20:47 +0000 (20:20 +0000)]
[SHELL32] Add stub for SHEnumerateUnreadMailAccountsW, needed by Thunderbird. Found by Joachim Henze. CORE-13229

svn path=/trunk/; revision=74521

4 years agoFully working x86 paging support!
Alex Ionescu [Wed, 10 May 2017 14:38:34 +0000 (14:38 +0000)]
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

4 years ago[PRINTING]
Colin Finck [Wed, 10 May 2017 13:03:08 +0000 (13:03 +0000)]
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

4 years ago[SHELL32_APITEST] -Add tests for Control_RunDLLW.
Giannis Adamopoulos [Wed, 10 May 2017 10:06:02 +0000 (10:06 +0000)]
[SHELL32_APITEST] -Add tests for Control_RunDLLW.

svn path=/trunk/; revision=74517

4 years ago[USETUP]: Fix the primary/extended partitions creation checks introduced in r63392...
Hermès Bélusca-Maïto [Tue, 9 May 2017 22:09:06 +0000 (22:09 +0000)]
[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

4 years ago[FREELDR]: Report the correct number of BIOS (hard) disk drives detected, that is...
Hermès Bélusca-Maïto [Tue, 9 May 2017 19:33:46 +0000 (19:33 +0000)]
[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.

svn path=/trunk/; revision=74515

4 years ago[SDK] Add enum for PEB.AppCompatFlagsUser
Mark Jansen [Tue, 9 May 2017 18:15:22 +0000 (18:15 +0000)]
[SDK] Add enum for PEB.AppCompatFlagsUser

svn path=/trunk/; revision=74514

4 years ago[PRINTING]
Colin Finck [Tue, 9 May 2017 15:44:42 +0000 (15:44 +0000)]
- 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 :)

svn path=/trunk/; revision=74513

4 years ago[USETUP]: Improve the bootsector validity check performed in IsThereAValidBootSector:
Hermès Bélusca-Maïto [Tue, 9 May 2017 15:31:53 +0000 (15:31 +0000)]
[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

4 years ago[DESK.CPL] -Addendum to 74506 which was a bit rushed. Make it possible to apply a...
Giannis Adamopoulos [Tue, 9 May 2017 08:13:49 +0000 (08:13 +0000)]
[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

4 years ago[SHELL32]
Thomas Faber [Tue, 9 May 2017 07:45:30 +0000 (07:45 +0000)]
- Fix AddCommasW

svn path=/trunk/; revision=74510

4 years ago[DISK]: Small fixes:
Hermès Bélusca-Maïto [Mon, 8 May 2017 21:34:07 +0000 (21:34 +0000)]
[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

4 years agoMore build fixes.
Giannis Adamopoulos [Mon, 8 May 2017 19:08:30 +0000 (19:08 +0000)]
More build fixes.

svn path=/trunk/; revision=74508

4 years agoFix build.
Giannis Adamopoulos [Mon, 8 May 2017 19:02:49 +0000 (19:02 +0000)]
Fix build.

svn path=/trunk/; revision=74507

4 years ago[DESK.CPL] -Implement opening msstyles files.
Giannis Adamopoulos [Mon, 8 May 2017 18:45:35 +0000 (18:45 +0000)]
[DESK.CPL] -Implement opening msstyles files.

svn path=/trunk/; revision=74506

4 years ago[EXPLORER] Some style suggestions by Mark Jansen. Thanks
Robert Naumann [Mon, 8 May 2017 17:46:55 +0000 (17:46 +0000)]
[EXPLORER] Some style suggestions by Mark Jansen. Thanks

svn path=/trunk/; revision=74505

4 years ago[CONSOLE.CPL]: Fix the console window preview:
Hermès Bélusca-Maïto [Mon, 8 May 2017 17:33:33 +0000 (17:33 +0000)]
[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

4 years ago[CONSOLE.CPL]: Minor modifications:
Hermès Bélusca-Maïto [Mon, 8 May 2017 17:24:57 +0000 (17:24 +0000)]
[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

4 years ago[CONSOLE.CPL]: Simplify the color selection code by factorizing common parts.
Hermès Bélusca-Maïto [Mon, 8 May 2017 17:19:07 +0000 (17:19 +0000)]
[CONSOLE.CPL]: Simplify the color selection code by factorizing common parts.

svn path=/trunk/; revision=74502

4 years ago[EXPLORER] Addendum to r74500. Those 2 commits belong to CORE-11498
Robert Naumann [Mon, 8 May 2017 15:50:07 +0000 (15:50 +0000)]
[EXPLORER] Addendum to r74500. Those 2 commits belong to CORE-11498

svn path=/trunk/; revision=74501

4 years ago[EXPLORER]
Robert Naumann [Mon, 8 May 2017 15:27:33 +0000 (15:27 +0000)]
- 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

4 years ago[WIN32SS] Fix font names not including style info (Bold etc). Patch by Katayama Hirof...
Mark Jansen [Mon, 8 May 2017 14:53:30 +0000 (14:53 +0000)]
[WIN32SS] Fix font names not including style info (Bold etc). Patch by Katayama Hirofumi MZ. CORE-12179 #comment Thanks!

svn path=/trunk/; revision=74499

4 years ago[SHELL32]
Thomas Faber [Mon, 8 May 2017 10:59:27 +0000 (10:59 +0000)]
- Avoid leaking the list items on destruction of CEnumIDListBase

svn path=/trunk/; revision=74498

4 years ago[USER32]
Thomas Faber [Mon, 8 May 2017 08:29:17 +0000 (08:29 +0000)]
- Avoid a memory leak in User32EnumWindows in case the window count is zero.

svn path=/trunk/; revision=74497

4 years ago[NTOS:IO]
Thomas Faber [Mon, 8 May 2017 06:54:35 +0000 (06:54 +0000)]
- Use pool tagging

svn path=/trunk/; revision=74496

4 years ago[NTOS]: Addendums to r74491 and r74493:
Hermès Bélusca-Maïto [Mon, 8 May 2017 00:58:45 +0000 (00:58 +0000)]
[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

4 years ago[NTOS]: Code formatting + free the memory in the reverse order from how it was allocated.
Hermès Bélusca-Maïto [Mon, 8 May 2017 00:51:44 +0000 (00:51 +0000)]
[NTOS]: Code formatting + free the memory in the reverse order from how it was allocated.

svn path=/trunk/; revision=74494

4 years ago[NTOS]: Capture the counted BaseDllName unicode string into a local NULL-terminated...
Hermès Bélusca-Maïto [Sun, 7 May 2017 18:15:12 +0000 (18:15 +0000)]
[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

4 years ago[NTOS]: Code formatting changes only.
Hermès Bélusca-Maïto [Sun, 7 May 2017 18:12:18 +0000 (18:12 +0000)]
[NTOS]: Code formatting changes only.

svn path=/trunk/; revision=74492

4 years ago[NTOS]: Fix a potential memory leak.
Hermès Bélusca-Maïto [Sun, 7 May 2017 17:50:18 +0000 (17:50 +0000)]
[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

4 years ago[NTDLL]
Thomas Faber [Sat, 6 May 2017 17:51:26 +0000 (17:51 +0000)]
- 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

4 years ago[KMTESTS:RTL]
Thomas Faber [Sat, 6 May 2017 15:29:56 +0000 (15:29 +0000)]
- Add a test for RtlWalkFrameChain and RtlCaptureStackBackTrace

svn path=/trunk/; revision=74489

4 years ago[INTL]
Eric Kohl [Sat, 6 May 2017 14:41:50 +0000 (14:41 +0000)]
- 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

4 years ago[INTL]
Eric Kohl [Sat, 6 May 2017 13:43:03 +0000 (13:43 +0000)]
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.

svn path=/trunk/; revision=74487

4 years ago[WIN32K:NTGDI]
Thomas Faber [Sat, 6 May 2017 12:18:21 +0000 (12:18 +0000)]
- Avoid using floating point operations in kernel mode.

svn path=/trunk/; revision=74486

4 years ago[MMSYS]
Thomas Faber [Sat, 6 May 2017 10:14:29 +0000 (10:14 +0000)]
- Simplify code by using windowsx.h. Patch by Katayama Hirofumi MZ.

svn path=/trunk/; revision=74485

4 years ago[MMSYS]
Thomas Faber [Sat, 6 May 2017 09:27:32 +0000 (09:27 +0000)]
- Make browse dialog title and filter localizable. Based on a patch by Katayama Hirofumi MZ.

svn path=/trunk/; revision=74484

4 years ago[MMSYS]
Thomas Faber [Sat, 6 May 2017 08:43:56 +0000 (08:43 +0000)]
- Pass byte counts to RegQueryValueEx instead of character counts. Based on a patch by Katayama Hirofumi MZ.

svn path=/trunk/; revision=74483

4 years ago[MMSYS]
Thomas Faber [Sat, 6 May 2017 08:22:50 +0000 (08:22 +0000)]
Patch by Katayama Hirofumi MZ:
- Use _countof where appropriate
- Prefer sizeof(variable) to sizeof(TYPE)

svn path=/trunk/; revision=74482

4 years ago[COMCTL32]
Thomas Faber [Fri, 5 May 2017 19:23:04 +0000 (19:23 +0000)]
- Fix heap memory leak in BUTTON_DrawTextCallback

svn path=/trunk/; revision=74481

4 years ago[COMCTL32] Toolbar: Use DrawThemeText when themes are enabled. CORE-12789
Giannis Adamopoulos [Fri, 5 May 2017 10:55:12 +0000 (10:55 +0000)]
[COMCTL32] Toolbar: Use DrawThemeText when themes are enabled. CORE-12789

svn path=/trunk/; revision=74480

4 years ago[SHELL32] -CMenuDeskBar: Handle WM_NCPAINT and paint the border with the correct...
Giannis Adamopoulos [Fri, 5 May 2017 09:01:15 +0000 (09:01 +0000)]
[SHELL32] -CMenuDeskBar: Handle WM_NCPAINT and paint the border with the correct color when it has the flat style.

svn path=/trunk/; revision=74479

4 years ago[KERNEL32_APITEST]
Thomas Faber [Thu, 4 May 2017 16:45:42 +0000 (16:45 +0000)]
- Fix a broken test name. APITests can not have names already used by Wine tests!  ... they should be named after APIs, anyway...

svn path=/trunk/; revision=74478

4 years ago[NDK]: Guard the Bitmap API prototypes in a NTOS_MODE_USER, so that a driver that...
Hermès Bélusca-Maïto [Thu, 4 May 2017 16:12:52 +0000 (16:12 +0000)]
[NDK]: Guard the Bitmap API prototypes in a NTOS_MODE_USER, so that a driver that includes both wdm.h and ndk/rtlfuncs.h for whatever reason does not include twice the bitmap API.
This in particular fixes compilation under x64 due to the fact that, in x64, one of these API is declared (force)inline and the compiler complained that this function already had a body.

svn path=/trunk/; revision=74477

4 years ago[USBD.SYS]: Exports:
Hermès Bélusca-Maïto [Thu, 4 May 2017 15:46:09 +0000 (15:46 +0000)]
[USBD.SYS]: Exports:
- The three C-decorated exports _USBD_CreateConfigurationRequestEx@8, _USBD_ParseConfigurationDescriptorEx@28 and _USBD_ParseDescriptors@16 are only exported in the i386 version of the driver (not present in x64, checked on WinXP x64).
  This fixes warnings in ReactOS x64 compilation.
- Add (commented out) the remaining exports (without their parameters) that need to be implemented and exported.

svn path=/trunk/; revision=74476

4 years ago[KERNEL32_APITEST]: Internationalization console tests by Katayama Hirofumi MZ.
Hermès Bélusca-Maïto [Thu, 4 May 2017 15:39:50 +0000 (15:39 +0000)]
[KERNEL32_APITEST]: Internationalization console tests by Katayama Hirofumi MZ.
Passes on Win2k3 (either are skipped because either Russian or Japanese locales or codepages are absent, or are passed OK), but not on ReactOS yet. They are committed as reference for future work.

svn path=/trunk/; revision=74475

4 years ago[BROWSEUI_APITEST] -Add tests for SHExplorerParseCmdLine for CORE-12882.
Giannis Adamopoulos [Thu, 4 May 2017 15:15:45 +0000 (15:15 +0000)]
[BROWSEUI_APITEST] -Add tests for SHExplorerParseCmdLine for CORE-12882.

svn path=/trunk/; revision=74474

4 years ago[SHELL32_APITEST] -Add some tests for SHParseDisplayName for CORE-12882.
Giannis Adamopoulos [Thu, 4 May 2017 15:05:10 +0000 (15:05 +0000)]
[SHELL32_APITEST] -Add some tests for SHParseDisplayName for CORE-12882.

svn path=/trunk/; revision=74473

4 years ago[CONSOLE.CPL]: Spanish translation update by Javier Fernandez, thanks!
Hermès Bélusca-Maïto [Thu, 4 May 2017 14:21:41 +0000 (14:21 +0000)]
[CONSOLE.CPL]: Spanish translation update by Javier Fernandez, thanks!
CORE-13187 #resolve

svn path=/trunk/; revision=74472

4 years ago[CONSOLE.CPL]: Fix the console props color buttons (was broken by r74468). Noted...
Hermès Bélusca-Maïto [Thu, 4 May 2017 14:18:14 +0000 (14:18 +0000)]
[CONSOLE.CPL]: Fix the console props color buttons (was broken by r74468). Noted by Katayama Hirofumi MZ, thanks!
CORE-13186 #resolve

svn path=/trunk/; revision=74471

4 years ago[RAPPS]
Thomas Faber [Thu, 4 May 2017 07:09:18 +0000 (07:09 +0000)]
- Display download URL in information panel. Patch by Alexander Shaposhnikov.
CORE-12442 #resolve

svn path=/trunk/; revision=74470

4 years ago[CONSOLE.CPL]: Rewrite the way we deal with console font samples in the console prope...
Hermès Bélusca-Maïto [Wed, 3 May 2017 23:56:35 +0000 (23:56 +0000)]
[CONSOLE.CPL]: Rewrite the way we deal with console font samples in the console properties dialog:
- Remove the font helper functions that were already moved into concfg/font.c in r74462, and use the latter instead.
- Use a double list for listing the available font sizes for a given face:
  * a ListBox for raster fonts;
  * a ComboBox for TrueType fonts, allowing the user to specify a custom size.
  The raster ListBox is wrapped using the LIST_CTL structure so that we can use
  the bisection functions on it.
- Allow the user to specify TrueType font size either in pixels or in points. Raster font sizes however are always in pixels.
- Try to remember the nearest font size across different selected face changes.
- Try to support custom-sized TrueType fonts (using the ComboBox's edit field). May need more improvements!
- Retrieve the correct character cell height & width size in pixels when selecting a font (especially when it's a TrueType one).
- We now support bold console fonts too, see CORE-13122 (thanks Katayama!).
- Remove the commented-out "temporary code for future reference".
- Use a global cached font "hCurrentFont" that gets initialized when the console properties applet is created,
  so that we now can have a correct font in the screen samples when one directly views e.g. the "Color" tab,
  without going first in the "Font" tab. This current font is of course updated whenever one changes the font settings.

Tested with success on Windows 2003, Windows 7 and on ReactOS.

CORE-13122 CORE-13182 #resolve

svn path=/trunk/; revision=74469

4 years ago[CONSOLE.CPL]: Minor code refactoring (cont.):
Hermès Bélusca-Maïto [Wed, 3 May 2017 23:05:25 +0000 (23:05 +0000)]
[CONSOLE.CPL]: Minor code refactoring (cont.):
- Use 'hDlg' for the dialog window handle variable (instead of hwndDlg), as already done in other parts of the code;
- Use our regular formatting for function prototypes;
- Use explicit unicode functions;

In addition:
- Correctly check for the dialog controls notifications (within WM_COMMAND message);
- Update the current code page when the code page combobox selection changes, but only notify the property sheet of the change when the combobox contents is validated (either the user pressed ENTER in some way, or the combobox lost its focus).

svn path=/trunk/; revision=74468

4 years ago[SHELL32] -CMenuBand: Correctly get the setting for flat menus. CORE-8925
Giannis Adamopoulos [Wed, 3 May 2017 21:49:38 +0000 (21:49 +0000)]
[SHELL32] -CMenuBand: Correctly get the setting for flat menus. CORE-8925

svn path=/trunk/; revision=74467

4 years ago[CONSOLE.CPL]: Minor code refactoring:
Hermès Bélusca-Maïto [Wed, 3 May 2017 20:35:12 +0000 (20:35 +0000)]
[CONSOLE.CPL]: Minor code refactoring:
- Move the bisection functions into their own source file, and make them a bit more general so that they can be used on other types of list structures than win32 combo-boxes.
- Adjust the code in options.c to reflect those changes.

svn path=/trunk/; revision=74466

4 years ago[CONSOLE.CPL]: Harmonize most of the resources (sizes of dialog controls for some...
Hermès Bélusca-Maïto [Wed, 3 May 2017 20:23:12 +0000 (20:23 +0000)]
[CONSOLE.CPL]: Harmonize most of the resources (sizes of dialog controls for some dialogs), and add some new controls in the font dialog that will be used soon.
To translators: Please check that I haven't broken any translations! :)

svn path=/trunk/; revision=74465

4 years ago[CONSRV]: Improvements for console font support (part 2):
Hermès Bélusca-Maïto [Wed, 3 May 2017 20:13:23 +0000 (20:13 +0000)]
[CONSRV]: Improvements for console font support (part 2):
- Use the font functions from the concfg library (see r74462) to create a new console font & retrieve its metrics, inspired by the suggestions from Katayama Hirofumi MZ in CORE-12451 and CORE-13122;
- Use string-safe functions to copy the font names into the fixed-size buffers;
- Use explicit UNICODE calls to GetObject and CreateFontIndirect.
Related to CORE-13182.

svn path=/trunk/; revision=74464

4 years ago[CONSRV]: Use string-safe functions to copy the font names into the fixed-size buffers.
Hermès Bélusca-Maïto [Wed, 3 May 2017 19:57:28 +0000 (19:57 +0000)]
[CONSRV]: Use string-safe functions to copy the font names into the fixed-size buffers.

svn path=/trunk/; revision=74463

4 years ago[CONCFG]: Diverse improvements/additions for the console configuration library. CORE...
Hermès Bélusca-Maïto [Wed, 3 May 2017 19:47:18 +0000 (19:47 +0000)]
[CONCFG]: Diverse improvements/additions for the console configuration library. CORE-13182
- Use string-safe functions to copy the font names into the fixed-size buffers;
- Modify some default settings;
- Add a set of console font manipulation functions, to be used later by both the console applet console.cpl and by CONSRV.
  Some of these functions come from r74365 with minor improvements (see CORE-12451 too), others are based from a patch
  by Katayama Hirofumi MZ from CORE-13122, and the rest are needed for an upcoming commit for console.cpl.
- Add PCH support in concfg.
- Minor code formatting: Use our regular formatting for function prototypes.

svn path=/trunk/; revision=74462

4 years ago[ISOHYBRID]
Colin Finck [Wed, 3 May 2017 15:32:33 +0000 (15:32 +0000)]
Patch all our ISOs (bootcd, bootcdregtest, livecd, hybridcd) with isohybrid in order to make them bootable from HDDs or any kind of USB drives.
The added MBR at the beginning of each ISO doesn't cause any harm for normal CD booting anymore after my patch in r74460.
There is also no need for the dedicated isohybrid targets anymore.

Our ISOMBR master boot record now successfully loads our ISOBOOT boot sector. ISOBOOT loads FreeLdr and indicates that we're booting from HDD, so that FreeLdr can successfully load the kernel.
We then bugcheck in the kernel with either 0x0000007B (INACCESSIBLE_BOOT_DEVICE) using bootcd or 0x0000006B (PROCESS1_INITIALIZATION_FAILED) using livecd.
Testcase is:
  qemu-system-i386 -m 512 -hda bootcd_or_livecd.iso

Needs more investigation, but these are separate bugs and I consider CORE-12648 fixed.

svn path=/trunk/; revision=74461

4 years ago[FREELDR]
Colin Finck [Wed, 3 May 2017 14:53:57 +0000 (14:53 +0000)]
Set BootPartition (DH) to 0xFF in isoboot.S when booting from CD.
Then check for that 0xFF value in FreeLdr to unambiguously detect CD booting instead of using BIOS functions (which don't work reliably on broken BIOSes) or checking for an MBR (which doesn't work on hybrid ISOs).


svn path=/trunk/; revision=74460

4 years ago[UXTHEME] -Use GdiDrawStream in UXTHEME_DrawImageGlyph and UXTHEME_DrawImageBackground.
Giannis Adamopoulos [Wed, 3 May 2017 11:13:23 +0000 (11:13 +0000)]
[UXTHEME] -Use GdiDrawStream in UXTHEME_DrawImageGlyph and UXTHEME_DrawImageBackground.

svn path=/trunk/; revision=74457

4 years ago[GDI32] -Add a public undocgdi.h file to keep the definitions for undocumented export...
Giannis Adamopoulos [Wed, 3 May 2017 10:55:54 +0000 (10:55 +0000)]
[GDI32] -Add a public undocgdi.h file to keep the definitions for undocumented exports. For now it only contains GdiDrawStream.

svn path=/trunk/; revision=74452

4 years ago[NTOSKNRL]
Pierre Schweitzer [Tue, 2 May 2017 21:32:20 +0000 (21:32 +0000)]
Misc fixes in NtQueryDirectoryFile():
- Don't leak auxbuffer
- Don't allow two completion routines

svn path=/trunk/; revision=74451

4 years ago[FASTFAT]
Thomas Faber [Tue, 2 May 2017 19:33:14 +0000 (19:33 +0000)]
- Add support for FILE_DELETE_ON_CLOSE
CORE-6931 #resolve

svn path=/trunk/; revision=74450