Commit graph

83320 commits

Author SHA1 Message Date
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
Hermès Bélusca-Maïto 1bb4167211
[NTOS:KD] Fix build, addendum to commit f3dd7133.
This one was more subtle because the prompt (KdIoReadLine) functionality
makes a call-back to KDBG own command history getter function KdbGetHistoryEntry.
It is planned for this to become a registered optional callback pointer.
2023-03-29 03:36:24 +02:00
Hermès Bélusca-Maïto 3c0ba6b22c
Fix build, addendum to commit 35180b3a 2023-03-29 02:55:06 +02:00
Hermès Bélusca-Maïto 35180b3ad2
[NTOS:KDBG] Isolate terminal and input-related routines from the rest of KDBG. (#5188)
This is done in preparation for moving all this functionality in a
separate KDTERM "KD Terminal Driver" DLL.

Additionally:

- Flush the terminal input before sending ANSI escape sequences.

- In KDBG pager, always use the correct reading-key function (the
  same used also for reading keys for a line of user input), and not
  the simplistic two-call KdbpGetCharSerial + KdbpTryGetCharSerial
  that would split the \r \n across calls.

- Call KdbpGetCommandLineSettings() in KdbInitialize() at BootPhase 0,
  which is indirectly called by KdDebuggerInitialize0(). And fix its
  command-line parsing too.
2023-03-29 02:42:31 +02:00
Joachim Henze 56bf3969cd
[SYSSETUP] Tweak IDD_COMPUTERPAGE positioning (#5198)
- make all 3 input boxes IDC_COMPUTERNAME, IDC_ADMINPASSWORD1, IDC_ADMINPASSWORD2 on this page the same length for all languages and start and end at same x-coord, e.g. sk-SK.rc, uk-UA.rc
- let the input boxes end at the same x as the edits in the previous dlg IDD_OWNERPAGE
- respect the right margin of the dialog with all controls for all languages, makes it look more harmonic to previous and next dlg, see video:
- make the input fields as wide as possible, but not wider, depending on what the language allowed I used width of 139, 148, 163 (163 is same as the EDITs in IDD_OWNERPAGE used)
- fix too small x offset for some controls in some languages like bg-BG.rc, that looked very off
- in zh-CN.rc fix the maximum allowed length for computer name from 63 to 15
- ja-JP.rc 15 is max chars for computer name, not 63
- Fix it-IT text truncation "Organizzazione" in IDD_OWNERPAGE
- pl-PL.rc Steal some wisdom from 0.4.9 to better stick with en-US.rc dimensions.
2023-03-29 01:23:00 +02:00
Hermès Bélusca-Maïto f3dd713382
[NTOS:KD:KDBG] Isolate the read-line (prompt) functionality in a separate file.
Rename KdbpReadCommand as KdIoReadLine. Extract the last-command
repetition functionality out of KdIoReadLine and put it where it
belongs: only in the KDBG command main loop KdbpCliMainLoop.
2023-03-28 16:14:40 +02:00
Hermès Bélusca-Maïto 430d7ebb93
[NTOS:KDBG] Use KdbpSendCommandSerial() to send specific ANSI escape sequences.
Use this function instead of KdpDprintf(), otherwise, we send them to
**ALL** the display providers, including for example dmesg. Replaying
the listing with dmesg would then cause the terminal to misbehave later.
For example, it would send the answer of a "Query Device Attributes"
command, as the response to a query for terminal size...
2023-03-28 16:14:39 +02:00
Katayama Hirofumi MZ 29e147beca
[MSPAINT][ATL] Encapsulation: mainWindow (#5178)
- Add DoCreate methods to CFullscreenWindow, CMiniatureWindow, and CMainWindow classes.
- Do encapsulation around mainWindow and _tWinMain.
- Add GetOpenFileName, GetSaveFileName, and ChooseColor helper methods to CMainWindow class.
- Move some code in WinMain into CMainWindow::OnCreate.
- Delay creation of CFullscreenWindow and CMiniatureWindow.
- Extend ATL CImage class as CImageDx in newly-created atlimagedx.h of mspaint.
CORE-18867
2023-03-28 22:31:26 +09:00
Katayama Hirofumi MZ 0569bbd4a7
[KERNEL32] LCMapString: Sync to Wine a little (#5203)
Preparation for LCMAP_FULLWIDTH and LCMAP_HALFWIDTH support.
Slightly synchronize lang.c to locale.c in Wine's dlls/kernelbase.
CORE-11700
2023-03-28 21:09:27 +09:00