Commit graph

82785 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 271b985981
[NTOS:KD] Cleanup of some old code.
- Remove KdbInit() macro and directly use KdbpCliInit() (since the place
  where it was used was already within an #ifdef KDBG block).

- Declare KdpKdbgInit() only when KDBG is defined, move its definition
  into kdio.c and remove the legacy wrappers/kdbg.c file.
  And in KdbInitialize(), set KdpInitRoutine directly to the former,
  instead of using the KdpKdbgInit indirection.

- Don't reset KdComPortInUse in KdpDebugLogInit().

- Minor refactorings: KdpSerialDebugPrint -> KdpSerialPrint and make it
  static; argument name "Message" -> "String", "StringLength" -> "Length".
2022-11-18 18:11:30 +01:00
Hermès Bélusca-Maïto 98e585364b
[NTOS:KD] Annotate KdInitSystem and remove redundant declaration in kd.h 2022-11-18 18:11:29 +01:00
Hermès Bélusca-Maïto 4a93b0a463
[NTOS:IO] Show the captured/generated driver name in one failure path of IoCreateDriver. 2022-11-18 18:11:28 +01:00
Hermès Bélusca-Maïto 56be4eafd5
[NTOS:IO][NDK] Add the exported IoDeleteDriver to the NDK headers. 2022-11-18 18:11:26 +01:00
Joachim Henze 9c5bb096bc
[COMCTL32] Remove a rosdiff TOOLBAR_EraseBackground() (#4887)
This fixes the toolbar in FileZilla 3.8 being drawn wrong (grey)
It regressed by 0.4.15-dev-1603-g 232c45fcd7

And todays fix is a partial revert of that guilty rev.
The reverted part is not even necessarily needed for what we had in mind back then,
It was just a first tiny step with the aim to get rid of the comctl32.h changes of that commit.
But that goal was and even is far out of reach for many other reasons also.
Actually we should have reverted the toolbar.c change back then already,
before committing the "flipfix9".

CORE-18263
2022-11-18 12:42:32 +01:00
Katayama Hirofumi MZ 7cc89e520c [NTUSER] Implement IntCheckImeShowStatusInThread
CORE-11700
2022-11-17 10:27:12 +09:00
Joachim Henze bcb9abc133 [SYSDM][SMSS] Addendum to (#4843) (#4844) CORE-18574
[SYSDM] Prevent my german-teacher from getting a heart-attack by that misplaced comma.

[SMSS] Prevent myself from getting a heart-attack by that superfluous dot.

Furthermore this addendum serves the purpose of actually linking both PRs
and their 4 previous commits to the actual JIRA ticket CORE-18754, which wasn't
the case before:
0.4.15-dev-5392-g 04b2d35f5b
0.4.15-dev-5391-g a8e06d92e8

0.4.15-dev-5390-g a4274ad548
0.4.15-dev-5389-g 5dc43c0f32
2022-11-16 23:08:52 +01:00
Serge Gautherie 770b3a3ce5
[HHPCOMP:CHMC] chmc_crunch_lzx(): Disable a dead check (#4880)
CORE-18642
2022-11-16 22:19:52 +01:00
Hermès Bélusca-Maïto 04b2d35f5b
[SYSDM] Improvements for the Paging File settings dialog. (#4844)
- Implement the architecture-specific pagefile size limits.
  In particular, verify that the selected volume on which to create
  the page file can accomodate the theoretical maximum limit (e.g.
  FAT32 cannot accomodate a 16 TB pagefile on x64, and the limit must
  be lowered down to 4 GB).

- Change the IDS_WARNINITIALRANGE and IDS_WARNMAXIMUMRANGE strings
  so that the maximum limit mentioned is the dynamic one.

- Review, improve and fix other aspects of the code.

Parts of this PR: addendum to commits 4d2d2dbb2 (#2597), 3bee3b92a (#2706).
2022-11-16 21:55:23 +01:00
Hermès Bélusca-Maïto a8e06d92e8
[SYSDM] Make ResourceMessageBox() support printf-like messages. (#4844)
+ Make usage of this new functionality.
+ Cleanup precomp.h.
2022-11-16 21:55:22 +01:00
Hermès Bélusca-Maïto a4274ad548
[SMSS][NTOS:MM] Implement the architecture-specific pagefile size limits + code review. (#4843)
What we have:
- Maximum number of pagefiles: 16
- Minimum pagefile size: 256 pages (1 MB when page size = 4096 bytes)
- Maximum pagefile size:
  * 32-bit platforms: (1024 * 1024 - 1) pages (~ 4095 MB)
  * x86 with PAE support: same size as for AMD x64
  * x64 platform:  (4 * 1024 * 1024 * 1024 - 1) pages (~ 16 TB)
  * IA64 platform: (8 * 1024 * 1024 * 1024 - 1) pages (~ 32 TB)

Those are the values as supported and verified by the NT kernel.
Now,  user-mode programs (including SMSS.EXE)  have different opinions
on these, namely, they consider estimates directly in MB, respectively:
4095 MB, (16 * 1024 * 1024) MB, and (32 * 1024 * 1024) MB
(verified on Win2k3 and Win7 32 and 64 bits).
Also here, the minimum pagefile size is set to 2 MB.

Starting Windows 8+ (and 10), those values change slightly, and are
still not fully synchronized between NTOS:MM and SMSS. Finally, while
(x86 PAE and) AMD64 and ARM64 seem to share the maximum pagefile
size limit, 32-bit ARMv7 appears to use different limits than regular
x86 (2 GB instead of 4).

Please keep those values as they are for NT compatibility!

See the following references:
https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/mm/modwrite/create.htm
https://techcommunity.microsoft.com/t5/ask-the-performance-team/what-is-the-page-file-for-anyway/ba-p/372608
+ Manual extraction of the values from different NT 6.2,6.3,10 builds.

[SMSS] Fill out in particular the x86-specific case for PAE.

[NTOS:MM] Some cleanup in the NtCreatePagingFile() code, namely:
- Clarify some comments;
- Validate the lower and upper bounds of the Minimum and Maximum sizes
  (based on Windows behaviour as explained by Geoff + manual tests).
- Open the pagefile in case-insensitive;
- Simplify the loop that finds an existing matching pagefile;
- Simplify some failure exit paths;
- Add a "Missing validation steps TODO" comment block explaining the
  existing code-hole.
2022-11-16 21:54:31 +01:00
Hermès Bélusca-Maïto 5dc43c0f32
[SMSS] Improve some comments. 2022-11-16 21:54:21 +01:00
Hervé Poussineau 12ef61ba10 [WIN32SS:ENG] Set VGA device as child of primary device
That way, we don't have anymore the VGA device together with primary device in device list.

Change also EngpUnlinkGraphicsDevice() function to add back VGA device to device list
when removing its parent from device list.

CORE-18522
2022-11-15 23:16:10 +01:00
Hervé Poussineau b3cdb7e713 [WIN32SS:ENG] Add EngpLinkGraphicsDevice, to add a device to gpGraphicsDeviceFirst list 2022-11-15 23:16:10 +01:00
Hervé Poussineau 3d01a103d7 [WIN32SS:ENG] Zero memory when allocating GRAPHICS_DEVICE structures 2022-11-15 23:16:10 +01:00
Hervé Poussineau ea30b96334 [WIN32SS:ENG] When VGA mode is requested, drop all graphic devices except VGA one
We don't need driver cooperation anymore to handle VGA mode request.
2022-11-15 23:15:26 +01:00
Hervé Poussineau 0ecd997bdf [WIN32SS:NTUSER] Extract InitVideo() prototype and gbBaseVideo variable to header 2022-11-15 23:15:26 +01:00
Hervé Poussineau 79f16507c4 [VGAMP/VGADDI] Be consistent in IOCTL_VIDEO_GET_CURRENT_MODE and IOCTL_VIDEO_SET_CURRENT_MODE
As IOCTL_VIDEO_GET_CURRENT_MODE returns 2 as ModeIndex, wait for the same value
in IOCTL_VIDEO_SET_CURRENT_MODE.
Also change vgaddi to send this hardcoded value.

vga_new also uses 2 as index for 640x480x16
2022-11-15 23:15:26 +01:00
Katayama Hirofumi MZ a2c6af0da4
[BOOTDATA][NTUSER] Add UserIsIMMEnabled and use it (#4882)
This PR enables SRVINFO_IMM32 also for non-CJK. You can disable this flag by setting zero to the LoadIMM registry value if you're non-CJK.
CORE-11700
2022-11-15 17:10:06 +09:00
Serge Gautherie ba1ed89f91
[HALX86] HalpQueryInterface(): Debug log InterfaceType param (#4772)
This should help to find out which GUIDs are actually wanted.
Based on CircularTriangle06's patch.

CORE-11632
2022-11-15 02:04:04 +03:00
Serge Gautherie 5efb6e3d97
[NTFS] NtfsCreateFCB(): Check allocation result (#4795) 2022-11-15 01:28:33 +03:00
Stanislav Motylkov a09e903398
[SHELL32] CDrivesFolder: Unhardcode pqcminfo->idCmdFirst value
DFM_MERGECONTEXTMENU handler works better now. However there is difference
between ours and Windows' menu building systems, which has to be fixed.

Addendum to 64657051c3. CORE-13841 CORE-18577
2022-11-14 21:56:01 +03:00
Katayama Hirofumi MZ 2628309baf [IMM32_APITEST] Follow-up of #4876 (7355810)
CORE-11700
2022-11-14 22:02:17 +09:00
Katayama Hirofumi MZ 73558102e7
[IMM32_APITEST] Add ImmEnumInputContext testcase (#4876)
Verify the IMM implementation. CORE-11700
2022-11-14 18:01:42 +09:00
Hermès Bélusca-Maïto 2dddbd5c54
[SMSS] Fix three SmpLoadSubSystem bugs related to the SB_CREATE_SESSION callback.
This fixes starting the Windows 2000 POSIX subsystem in ReactOS.

- The CreateSession pointer was initialized against the SbApiMsg variable, but
  it was the other SbApiMsg2 that was being initialized and sent through LPC.

- Do not overwrite the MuSessionId (Terminal Services session ID) variable with
  the generated environment subsystem session ID from SmpAllocateSessionId().

- Actually initialize the SbApiMsg ApiNumber for the CreateSession LPC call.

(dll\win32\kernel32\client\proc.c:3690) Retrying with: POSIX /P C:\ReactOS\system32\posix\ls.exe /C ls
Breakpoint 1 hit
csrsrv!CsrSbApiRequestThread+0x64:
001b:1000ac34 837dfc00        cmp     dword ptr [ebp-4],0
kd> ??ReceiveMsg
struct _SB_API_MSG
   +0x000 h                : _PORT_MESSAGE
   +0x018 ConnectionInfo   : _SB_CONNECTION_INFO
   +0x018 ApiNumber        : 0xcccccccc (No matching name)
   +0x01c ReturnValue      : 0n0
   +0x020 u                : <unnamed-tag>
kd> p
...
(base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with  Status c0000002 for sessionid 2
...
<Retrying>
...
(base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with  Status c0000002 for sessionid 3

All those bugs could have been avoided *IF*, rather than (badly) duplicating
its code, the existing SmpSbCreateSession() function had been used instead.

- "Not sure these field mean what I think they do -- but clear them" ... ◔_◔
  Those fields are related to the debug client interface (DbgUi) and session
  in case the subsystem being started is going to be debugged. These have
  nothing to do with the MuSessionId. Clarify this in the SB_CREATE_SESSION_MSG
  structure and in the SmpSbCreateSession() function.
2022-11-14 00:10:35 +01:00
Hermès Bélusca-Maïto f43ce46566
[SMSS] Improve comments/code/some DPRINTs. Reorganize smss.h header. 2022-11-14 00:10:35 +01:00
Hermès Bélusca-Maïto 06a0451415
[SMSS][CSRSRV] Undefine CreateProcess symbol. Name the union inside SB_API_MSG.
Undefine CreateProcess because it can be #define'd (to CreateProcessA/W)
if winbase.h is included prior (as it is in SMSS).
2022-11-14 00:10:32 +01:00
Hermès Bélusca-Maïto 9c8a8cf2aa
[CSRSRV][NTOS:PS] Misc typos fixes. 2022-11-14 00:10:30 +01:00
Joachim Henze 1dd9d2ef37
[NTUSER][USER32] Classic Theme: disabled "checked" checkboxes should be grey (#4874)
Classic Theme: disabled "checked" checkboxes should be grey CORE-18609
and not black, like they erroneously were.
This patch does not seem to have any impact on how they are rendered
for themed ros.

Ftr: We experimented also with COLOR_GRAYTEXT instead of COLOR_BTNSHADOW
but that did result in incorrect drawing of disabled "checked" checkboxes for
the 'High Contrast' Color Schemes.
2022-11-14 00:01:29 +01:00
Joachim Henze 45e79c3f23 [MSPAINT] Update de-DE.rc CORE-12356
An addendum to 0.4.14-dev-843-g	15bc263b07
2022-11-13 22:41:05 +01:00
Katayama Hirofumi MZ 3d298831db [IMM32] Get gHighestUserAddress in ImmInitializeGlobals
CORE-11700
2022-11-13 20:04:34 +09:00
Stanislav Motylkov 51f78918da
[USER32] Rewrite CharPrev(Ex)A functions and fix tests (#4860)
Fixes 48 failing tests of user32:CharFuncs.
Only 12 minor failing tests are left!

Thanks to Simone Mario Lombardo for the problem analysis!

CORE-18415 CORE-18452
2022-11-13 13:22:26 +03:00
Katayama Hirofumi MZ 6b53f6d824 [USER32] Follow-up of e1f8b32; Delete unnecessary empty line
CORE-11700
2022-11-13 11:50:54 +09:00
Katayama Hirofumi MZ e1f8b32c3d [INCLUDE][USER32] Add WM_FINALDESTROY and improve ImeWndProcA/W
CORE-11700
2022-11-13 09:59:17 +09:00
Katayama Hirofumi MZ c7e8b544bc [USER32] Fix ImeWndProc_common comment
CORE-11700
2022-11-13 08:49:38 +09:00
Hermès Bélusca-Maïto 9bb5627df6
[SETUP][INF] Use the standard "Helv" -> "MS Sans Serif" substitution... (#4864)
... and let the latter one substitute to whatever we want.
Hindi however had "Helv" -> "Tahoma", but "MS Sans Serif" -> "FreeSans".
Now its "Helv" will go to "FreeSans".
2022-11-13 00:26:13 +01:00
Hermès Bélusca-Maïto 34c0bd0d5a
[SETUP] muifonts.h Formatting only. 2022-11-13 00:25:53 +01:00
Marcin Jabłoński 6a3a79bb72
[DISKPART] Fix help for multi-word command crashing. (#4873)
* [DISKPART] Fix help for multi-word command crashing.

When the HELP command is executed for a multi-word command,
for example "HELP CREATE PARTITION PRIMARY", diskpart crashes.
This happens because before the desired form of the command
is encountered, its single word form is found - since the first word
of the command matches the one HELP is looking for, it tries to
compare the second word of the input command with the second
(nonexistent) word of the encountered single word command,
which is NULL. This results in diskpart crashing.
The fix makes HELP check if the to-be-compared word is not NULL,
before calling wcsicmp.
2022-11-12 13:02:33 +01:00
Joachim Henze c47758b102
[SETUP][INF][MEDIA] Get rid of the last Ubuntu references CORE-18607 (#4871)
An addendum to 0.4.14-dev-20-g 2f4fb903b4
because since then we don't have the Ubuntu font anymore.

The substitutes are also not needed any longer.
We can use Tahoma here without causing any change in the current rendering,
because for all languages the former
Ubuntu substitutions did point either to Tahoma,
or to the same thing, that Tahoma atm points to
(for those language that do require additional glyphs).

This way we do not only get the substitutions closer to 2k3sp2, but will also
simplify our maintenance and testing, because the same font is guaranteed to be used then
for all themes: Classic, Blackshade and Lautus: The font which has the needed glyphs for
that specific language.

E.g.
"FreeSans" for Hindi,
"Tahoma" for most Western languages, and
"Droid Sans Fallback" for Chinese and Japanese language.

Things are cleaner and simpler this way.
2022-11-12 12:44:54 +01:00
Katayama Hirofumi MZ 0bc6bd6480
[NTGDI][NTUSER][INCLUDE] Add 'See also:' comments for structures (#4872)
Add 'See also' URLs to some undocumented structures.
2022-11-12 20:27:50 +09:00
Katayama Hirofumi MZ f73a4d6bab [IMM32] ImmDllInitialize's first argument is an HINSTANCE
CORE-11700
2022-11-12 20:25:29 +09:00
Joachim Henze a33fe38418
[SHELL32] Show 'comment' column for folders, make it rightmost CORE-18615 (#4868)
In explorer filebrowser 'details' view
the column 'comments' had invalid length of zero, and therefore
was hidden under the 'attributes' column.

I guess even after this patch, it will not display any
sane contents in there yet.
Therefore I chose a small width of 10 only, to reduce the chance for
it to trigger an undesired horizontal scrollbar.

As far as I see we don't support manual showing and hiding of additional columns yet.
By default my Windows does not show this column. But when activated manually, it is always
shown on the right hand side of the 'attributes' column.
2022-11-11 18:25:50 +01:00
Hervé Poussineau d117765e71 [BOCHSMP] Move related registry entries to bochsmp directory 2022-11-11 15:14:13 +01:00
Katayama Hirofumi MZ 11a71418d5
[SHELL32] Implement IsLFNDriveA/W and improve PathResolve (#4866)
- Fix IsLFNDriveA and IsLFNDriveW functions.
- Add IsRemovableDrive helper function.
- Fix PathQualifyExW by using IsLFNDriveW.
CORE-11335
2022-11-10 23:18:04 +09:00
Katayama Hirofumi MZ 40863aebc4 [NTUSER] Add 'Win:' comments around IntDefWindowProc 2022-11-10 15:59:52 +09:00
Katayama Hirofumi MZ 0484beb04b
[NTUSER] Don't redraw scrollbar if it is hidden (#4849)
Fix redrawing bug on Command Prompt. CORE-18593
2022-11-10 13:12:20 +09:00
Piotr Hetnarowicz 3fc6d90c58
[SYSSETUP] Update Polish (pl-PL) translation (#4859)
Reviewed-by: Adam Stachowicz <saibamenppl@gmail.com>
2022-11-10 02:10:19 +03:00
Piotr Hetnarowicz 2a400b29c0
[INPUT] Update Polish (pl-PL) translation (#4858)
Reviewed-by: Adam Stachowicz <saibamenppl@gmail.com>
2022-11-10 02:08:40 +03:00
Simone Mario Lombardo 6755921560
[DDRAW] Sync the fix for swap_interval from Wine (#4831)
Sync the barebone fix from Wine (wine-7.19-557-g13cc08e32d6):
https://source.winehq.org/git/wine.git/?a=search&h=HEAD&st=grep&s=ddraw_surface_update_frontbuffer%28
and
13cc08e32d:/dlls/ddraw/surface.c

- Added "swap_interval" argument to ddraw_surface_update_frontbuffer()
- Added ddraw_swap_interval_from_flags() function for dispatching
  the integer type of required swap interval
- Updated ddraw_surface_update_frontbuffer() function for managing the
  swap interval between backbuffer and frontbuffer (and relative flipping)
- Updated the ddraw_surface7_Flip() function for relaying the swap interval
  to ddraw_surface_update_frontbuffer() function.
- Added 0 value (as Wine) when the swap interval is not required

This fixes empty white screen issue on rendering because of lacking
swap interval for the software / games that use ddraw.

CORE-18547
2022-11-09 20:44:30 +03:00
Hermès Bélusca-Maïto f1908c8959
[SMSS] Fix build. 2022-11-09 00:05:13 +01:00