Commit graph

83328 commits

Author SHA1 Message Date
Timo Kreuzer 93dface84e [PSEH] Change return type of filter function prototype to avoid broken return from inside it. 2023-04-14 11:56:08 +03:00
Timo Kreuzer cb74d9e24e [NTOS/CC] Fix broken usage of _SEH2_FINALLY
Finally handlers are - unlike except blocks - not part of the function they are in, but separate functions, which are called during unwind. PSEH implements them on GCC using nested functions. While "return" from a finally handler is allowed with native SEH, it's handled by the compiler through an extra unwinding operation using _local_unwind, WHICH IS NOT SUPPORTED BY PSEH! With PSEH, returning from a finally handler does not return from the function, instead it will only return from the finally handler and the function will continue below the finally handler as if there was no return at all. To fix this, the return is removed and an additional success check is added.
Also use _SEH_VOLATILE to make sure the variable assignment is not optimized away by the compiler and add zero out the result parameters on error.
2023-04-14 11:56:08 +03:00
Timo Kreuzer b2fcd27aaa [NTOS/CC] Fix calls to CcRosEnsureVacbResident
The function returns BOOLEAN, not NTSTATUS! Also wrap it in SEH, because it can throw an exception on failure.
2023-04-14 11:56:08 +03:00
Timo Kreuzer 178285c275 [USER32_WINETEST] Change module type to win32cui to be able to see test results 2023-04-14 11:47:29 +03:00
Mark Jansen 89f58017c0
[CODEOWNERS] Add Giannis and myself as reviewer for shell related stuff 2023-04-13 19:09:55 +02:00
Thamatip Chitpong 77d4653164
[NTUSER] co_UserDestroyWindow: Validate window before destroying it (#5054)
Prevent the window from being destroyed twice
fixes BSOD 0x1E CORE-18821
2023-04-12 22:20:46 +02:00
Thamatip Chitpong 15c755e5f9
[MMSYS] Improve sound test button (#4879)
- Make sound test button able to stop the sound (like WinXP's mmsys.cpl)
- Change stop icon
- Add documentation for GetSoundDuration
2023-04-12 22:00:37 +02:00
Hermès Bélusca-Maïto 99b0e4b9a9
[NTOS:KDBG] Only use the direct KdbPrintf instead of KdbpPrint (pager) inside the exception handler (outside the debugger main loop). 2023-04-12 19:30:57 +02:00
Hermès Bélusca-Maïto 9808d32f4a
[NTOS:KDBG] Use local KdbPrintf function for DPRINT1 instead of DbgPrint...
... that would otherwise cause a debugger re-entry.

Also use KdbPuts/Printf instead of KdpDprintf that won't be available
once KDBG is moved out of it.
2023-04-12 19:30:56 +02:00
Hermès Bélusca-Maïto f620ce7705
[NTOS:KDBG] Introduce local versions of KdpPrintString, KdpDprintf and KdpPromptString...
... since the original ones are internal to the kernel and won't be
available once KDBG is moved out of it.

Use these functions in the pager/prompt support.
2023-04-12 19:30:54 +02:00
Hermès Bélusca-Maïto fdf4814ebb
[NTOS:KDBG] Correctly balance KeStackAttachProcess with KeUnstackDetachProcess, instead of KeDetachProcess. 2023-04-11 00:44:11 +02:00
Hermès Bélusca-Maïto 579eab8a31
[NTOS] Include kdbg/kdb.h only in the files that really need it. 2023-04-11 00:44:10 +02:00
Katayama Hirofumi MZ 8f2c2c1def [COMCTL32][USER32] EDIT: Fix caret position for IME
CORE-11700
2023-04-10 08:27:50 +09:00
Katayama Hirofumi MZ 5ff0ef403e
[NTUSER] IntImmActivateLayout: Set CI_IMMACTIVATE if not pImeWnd (#5231)
In IntImmActivateLayout function, if pImeWnd was NULL and pti->spDefaultImc was non-NULL, then set CI_IMMACTIVATE flag. CORE-11700
2023-04-09 15:19:47 +09:00
Katayama Hirofumi MZ 66c8ded454
[COMCTL32][USER32] EDIT: CompForm and CandForm (#5226)
The changes of this PR are on EDIT controls.
- Delete composition_len and composition_start members.
- Add EDIT_ImmSetCompositionWindow helper function.
- At EDIT_SetCaretPos, set the position of the composition window.
- We don't use internal composition string. Rely on the composition window.
- Improve WM_IME_STARTCOMPOSITION, WM_IME_COMPOSITION and WM_IME_ENDCOMPOSITION message handling.
CORE-11700
2023-04-09 15:19:19 +09:00
Katayama Hirofumi MZ a9284b5664 [MSPAINT] Fix handle leaks about memory bitmap
This fixes CORE-18919. CORE-18867
2023-04-09 11:17:17 +09:00
Doug Lyons bfc6a119c5
[ADVAPI32] Do not fail on creating a registry key if the security attributes have an invalid length. (#5230)
Provide graceful handling of RegCreateKeyExW when lpSecurityAttributes->nLength is zero.
This reverts commit cc0716b65 (SVN r24491).
JIRA issue: CORE-15471
2023-04-09 04:04:04 +02:00
Katayama Hirofumi MZ 96c7fe4ccd [MSPAINT] Fix Copy and Paste
Call GetSelectionContents in SelectionModel::GetBitmap.
CORE-18920, CORE-18867
2023-04-09 09:14:32 +09:00
Katayama Hirofumi MZ 639739a7cd [MSPAINT] Fix SelectionModel::InsertFromHBITMAP bug
CORE-18867, CORE-18920
2023-04-09 09:01:14 +09:00
Katayama Hirofumi MZ f45d80adc9 [MSPAINT] Canvas: Don't draw new frame if HIT_NONE
CORE-18867
2023-04-09 08:49:18 +09:00
Katayama Hirofumi MZ 132f482de2 [MSPAINT] imageSaved = FALSE after image size change
...and redraw canvas after image resizing is canceled.
CORE-18867
2023-04-09 08:23:44 +09:00
Katayama Hirofumi MZ fc5311aaf2
[RAPPS] Calculate download listview position (#5232)
Correctly display Download ListView at right position in any languages. CORE-18706
2023-04-09 05:51:23 +09:00
Katayama Hirofumi MZ efe7368c46
[MSPAINT] Make imageArea window-less (#5215)
- Move imageArea code into canvasWindow.
- Delete imgarea.cpp, imgarea.h, and imageArea.
- Add CCanvasWindow::ImageToCanvas and CCanvasWindow::CanvasToImage to convert the coordinates.
- Realize drawing of resizing image area.
CORE-18867
2023-04-08 22:25:27 +09:00
Katayama Hirofumi MZ fa322c2e14 [RAPPS] Improve Japanese translation
CORE-18706
2023-04-08 17:32:11 +09:00
Katayama Hirofumi MZ 994732c4bb
[RUNDLL32][SHELL32] Rename 'rundll32_window' as 'RunDLL' (#5229)
Improve compatibility.
- Rename window class "rundll32_window" as "RunDLL".
- Delete some shell32 codes about this window class.
CORE-13895, CORE-18350
2023-04-08 15:20:07 +09:00
Hermès Bélusca-Maïto f8f9c170b1
[KDGDB] Fix GCC build. Addendum to commits b577ac07 and de81021ba.
See also PR #5217.
2023-04-05 03:33:42 +02:00
Hermès Bélusca-Maïto 30369b8005
[NTOS] "Bugzilla" --> "Jira" 2023-04-05 03:33:41 +02:00
Hermès Bélusca-Maïto dfc2cc4e42
[NTOS:KD] Fix buffer overflow for the signon in KdPortInitializeEx.
The built string can be:
°°Kernel Debugger: Serial port found: COM1 (Port 0x000003F8) BaudRate 115200°°°°
(with ° representing the \r and \n in the message)
and you can verify that this is more than 80 characters in total.
2023-04-05 03:33:39 +02:00
Hermès Bélusca-Maïto 641c89d834
[KDVBOX] Fix port name comparison. 2023-04-05 03:33:38 +02:00
Hermès Bélusca-Maïto 2b27d08576
Grmbl... 2023-04-05 01:53:32 +02:00
Hermès Bélusca-Maïto 143f8549a5
[NTOS:IO] ... and fix build by adding missing header. 2023-04-05 01:45:32 +02:00
Hermès Bélusca-Maïto 4c6f7c01e5
[NTOS:IO] Avoid magic value in LdrProcessDriverModule. 2023-04-05 01:39:32 +02:00
Hermès Bélusca-Maïto 8b35e46903
[SHIMGVW] Update the display window when selecting the Previous/Next picture. (#5223)
Patch by KRosUser.
CORE-18905
2023-04-04 22:14:14 +02:00
Joachim Henze 99e5f51d5b
[SDK] Shorten autogenerated Copyright strings (#5210)
that we do compile into almost every dll and exe.
Reduces unnecessary scrolling in the
Versions tab of file properties dlg, which precedes the Copyright phrase anyway.

MS also uses shorter strings and therefore doesn't require to scroll at all.
See attached screenshots in the PR.
2023-04-04 12:10:59 +02:00
Katayama Hirofumi MZ 2b356adbc5
[COMCTL32][USER32] EDIT: WM_SETFONT for IME (#5214)
- Call ImmSetCompositionFontW in WM_SETFONT handling of EDIT controls if necessary.
- If the specified font is NULL, then use DEFAULT_GUI_FONT.
CORE-11700
2023-04-04 19:09:21 +09:00
Katayama Hirofumi MZ d0c657074d
[MSPAINT] Allow paletteWindow to be bottom-aligned (#5216)
The user will be able to move the palette window to bottom by dragging.
- Add Bar1ID registry setting.
- Move paletteWindow to top or bottom in mainWindow's WM_SIZE handling.
- Track the mouse dragging on paletteWindow.
- If the dragging is beyond the center point, then move paletteWindow.
CORE-18867
2023-04-04 19:06:06 +09:00
Justin Miller ccef43f3b0
[FREELDR] Implement the memory managment functions for UEFI (#5174)
CORE-11954

- EFI binaries have a different subsystem in the PE header;
- ENVIRON: Make sure INTN and UINTN are 64bit for 64bit platforms;
- Handle UEFI Memory maps and translate it for freeldr;
- Add FAILED_TO_EXIT_BOOTSERVICES Freeldr BSoD code.
2023-04-03 17:33:20 +02:00
Katayama Hirofumi MZ 83e83bfd2c
[MSPAINT] Allow ToolBox to be right-aligned (#5213)
The user will be able to move ToolBox in the main window by dragging.
- Add Bar2ID registry setting.
- Add CPaintToolBar class to encapsulate the toolbar code.
- Capture and track the mouse dragging in CToolBox.
- Move the ToolBox if dragging is beyond the center position.
CORE-18867
2023-04-03 14:34:56 +09:00
Atharva Kulkarni ce562727b8
[MSI] Fix empty disc costing (Terragen, ...) (#5201)
JIRA issue: CORE-18749
2023-04-02 19:19:21 +02:00
Atharva Kulkarni e13c3e856f
[MSI] Revert to previous working solution for disk usage display in dialog.c (#5194)
There is a bug, which displays empty optical drive as a valid Drive where applications can be installed, which is wrong. This change will skip displaying any drives that are not fixed in the disk usage table in the msi installer UI.

JIRA issue: CORE-18758

Proposed changes

Revert to old solution from Doug Lyons which was working fine.
2023-04-02 19:16:18 +02:00
hpoussin 1bdefebc9e
Enable framebuf_new driver (#4775)
Replace framebuf display driver by framebuf_new display driver
Compile framebuf_new as framebuf.dll, and add it to bootcd/livecd
Remove old framebuf from compilation, to not conflict
2023-04-02 23:33:15 +09:00
Joachim Henze 9ee9f73369
[NTUSER] Fix BSOD 0x1E nullptr deref CORE-18899 (#5212)
fix authored by JIRA-user "TANGaming". I do suspect that the possibility of that nullptr deref was introduced on the master branch by 0.4.13-dev-962-g 4193b8d. Doug Lyons signalled his "ok" regarding the fix in chat already. CORE-18899
2023-04-02 23:27:42 +09:00
Joachim Henze c37addcbf5
[CONSOLE] Harmonize IDC_LBOX_FONTTYPE height to 40 for *.rc (#5211)
40 is what en-US uses, and most other langs used that meanwhile as well. Some were forgotten to be synced though.
While comparing all the files, use the opportunity to slightly improve some headers also.
2023-04-02 23:25:43 +09:00
fulup29 14cf589cbc
[SHELL32] Improve French (fr-FR) translation (#5179)
CORE-18382

Original patch is used to fix and improve french translation and layout.
The original (erroneous) horizontal shift of the second checkbox is kept.
It should be fixed homogeneously in all translations at once later.
2023-04-02 00:07:52 +02:00
Jérôme Gardou 573d579873
[NTOSKRNL] Flush file to disk when deleting file mappings (#4302)
CORE-17627
When closing a file, fastfat zeroes it out from ValidDataLength up to the end of the file.
The ValidDataLength field is updated when the file content is actually written to disk.
There is currently a race between the file-close path and the page out path, leading to potential file corruptions when the zeroing happens after the memory has been flushed to disk.

Fix this by actually flushing the file to disk when unmapping files, with file lock acquired. This way, the FS driver cannot zero out the tail of the file while we're actually flushing it to disk.
2023-04-01 23:56:49 +09:00
Katayama Hirofumi MZ 84e580b67e
[REGEDIT] Fix ListView selection and finding (#5150)
We will check the data size correctly, instead of 3 NUL byte appending hack. Add bSelectNone parameter to UpdateAddress and RefreshListView functions. If bSelectNone is TRUE, then select nothing of ListView. Fix item selection of ListView. Rename CompareData helper function as MatchData and improve it. Improve the search algorithm. If the item selection of ListView changed, scroll down to the item. Follow up to #5146. CORE-15986, CORE-18230
2023-04-01 22:21:59 +09:00
Katayama Hirofumi MZ aac89519ec
[MSPAINT] Make selection window-less (#5208)
- Delete selection.cpp and selection.h and selectionWindow.
- Extend ColorKeyedMaskBlt function.
- Implement selection resizing.
CORE-18867
2023-04-01 22:01:04 +09:00
Katayama Hirofumi MZ 3f5bcf5775
[KERNEL32] LCMapString: Fullwidth/halfwidth conversion (#5206)
- Add file dll/win32/kernel32/winnls/string/dakuten.h.
- Add file dll/win32/kernel32/winnls/string/full2half.h.
- Support LCMAP_FULLWIDTH and LCMAP_HALFWIDTH in LCMapString.
CORE-11700
2023-04-01 11:33:36 +09:00
valmorflores 2687c1b415
[NOTEPAD][OSK] Improve/Add Portuguese (Brazilian pt-BR and Portugal pt-PT) translations (#5124)
Co-authored-by: Julen Urizar Compains <julenuri@hotmail.com>
2023-03-31 01:37:45 +02:00
Doug Lyons c8fc8264fe
[SHELL32_APITESTS] Add ROS.ico test file. Improve shell32:ExtractIconEx tests (#5169)
Improve shell32:ExtractIconEx tests by updating it and adding more test files and 1 new icon file.

JIRA issue: ROSTESTS-381

Add new ROS.ico file which has both a normal icon and a PNG one.
Update testing to test for count of icons in file and separately extract the 0th one.
Add tests for sysicon.ico, explorer.exe and the new ROS.ico files.
2023-03-30 13:31:13 +02:00