Commit Graph

85409 Commits

Author SHA1 Message Date
Andrei Miloiu 0cfc9aba05
[STOBJECT] Update Romanian (ro-RO) translation (#6695) 2024-04-07 20:40:38 +02:00
Andrei Miloiu 608ed5619f
[SHLWAPI] Update Romanian (ro-RO) translation (#6702) 2024-04-07 20:36:23 +02:00
Andrei Miloiu 3e4d8e6f6c
[UMANDLG] Update Romanian (ro-RO) translation (#6699) 2024-04-07 20:34:38 +02:00
Katayama Hirofumi MZ 5eea72f61b
[SHELL32] Use Uppercase in SHELL32_GUIDToStringA/W (#6719)
Improve consistency.
JIRA issue: CORE-19495
Reduced 4 failures in shell32:SHParseDisplayName.
2024-04-07 20:34:50 +09:00
Timo Kreuzer 713a360c74 [NTOS:KE/x64] Remove pointless loop in KiInitiateUserApc
Only one user APC can be delivered here. The next one can only be delivered, when KiUserApcDispatcher returns to the previous context with NtContinue.
2024-04-07 09:14:26 +02:00
Timo Kreuzer 7589238b68 [NTOS:KE/x64] Fix user APC delivery on syscall exit
We need to save the missing registers in the trap frame before calling KiInitiateUserApc, because they will be used to create the CONTEXT that is saved on the user mode stack, where KiUserApcDispatcher returns back to using NtContinue. This fixes remaining failures in kernel32_apitest QueueUserAPC.
2024-04-07 09:14:26 +02:00
Timo Kreuzer c4498d751d [KERNEL32_APITEST] Add test for multiple queued user APCs 2024-04-07 09:14:26 +02:00
Timo Kreuzer 85fc290bb7 [KERNEL32_APITEST] Use InterlockedIncrement for proper synchronization 2024-04-07 09:14:26 +02:00
Timo Kreuzer 43b181309e [NTOS:KE] Fix calculation of timer expiration
Both due-times and interrupt time are unsigned, but were treated as signed in KiInsertTimerTable, which led to very long (e.g. INFINITE) waits being interpreted as having a negative due-time and being completed instantly.
Mostly fixes kernel32_apitest QueueUserAPC
2024-04-07 09:14:26 +02:00
Timo Kreuzer 34576c7015 [NTOS:KE/x64] Implement KiUserCallbackExit
This is used in KiUserModeCallout instead of KiServiceExit2. The latter is broken, leaks non-volatile registers and will need to be modified to handle an exception frame, which we don't need/have here. It will also use sysret instead of iret and is generally simpler/faster.
Eventually it would be desirable to skip the entire trap frame setup and do everything in KiCallUserMode. This requires some cleanup and special handling for user APC delivery.
2024-04-07 09:13:58 +02:00
Whindmar Saksit 9238a1762f
[SHELL32] Copy as path shell extension (#6701)
* Added Copy as path menu extension

---------

Co-authored-by: Thamatip Chitpong <weedgamer131@gmail.com>
2024-04-06 14:01:32 -07:00
Oleg Dubinskiy 91be8bf0a1
[MSVCRT20][MSVCRT40] Fix heap initialization (#6713) CORE-19505
Fixes CORE-19505 'game "Hover!" from rapps does not start anymore'
It failed showing a msgbox
"There was an error allocating memory in Hover!"

the regression was introduced by
0.4.15-dev-5602-g c47506a5f4

Add missing heap initialization in DllMain entrypoints of msvcrt20.dll and msvcrt40.dll,
similarly to as it is done in msvcrt.dll (CRT).
The msvcrt.dll (CRT) initialization code was updated properly
during the last winesync, accordingly to the new changes,
but msvcrt20.dll/msvcrt40.dll one was not. So update it too.
This fixes the crash of HOVER 1.0 game from Rapps when
it tries to allocate a dynamical memory from the
unitialized heap via malloc() function exported from our msvcrt20.dll.
2024-04-06 17:46:11 +02:00
Timo Kreuzer ea28951607 [UMKM_APITEST] Add a test for syscall handling
This is intentionally not part of ntdll_apitest, because that links to advapi32, which links to rpcrt4, which (wrongly!) links to ws2_32, which (wrongly!) links to user32, which breaks the test.
2024-04-06 08:14:52 +02:00
Doug Lyons a771729e69
[COMCTL32] Fix Status Bar Updating (#6696)
This fixes CORE-19497 'Regression, part of the statusbar with the sizegrip is not redrawn properly'

The regression was introduced / unhidden by 0.4.15-dev-5617-g 7866eb2886

Author of the patch: JIRA-user: I_Kill_Bugs
turned into PR by @Doug-Lyons
Thank you both!

KVM: https://reactos.org/testman/compare.php?ids=94433,94435
VBox: Builder Broken atm unfortunately
2024-04-05 23:30:09 +02:00
Timo Kreuzer b6987d1463 [RTL/x64] Remove an ASSERT in RtlpTryToUnwindEpilog
This can fail on optimized builds, where functions can end after a noreturn function call without an epilog / ret, but with an int 3. We simply fail gracefully, which is the right thing to do.
2024-04-05 18:18:45 +02:00
Whindmar Saksit 8841e3d7ba
[SHELL32] Handle the Progman Folder options message and tab switching support (#5574)
* Handle the "OnShowOptionsDlg" message
* Support switching tabs
* Update dll/win32/shell32/dialogs/folder_options.cpp
* Update dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
* ShowFolderOptionsDialog workaround
* Added Vista pages, define for magic message

---------

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Thamatip Chitpong <weedgamer131@gmail.com>
2024-04-04 18:53:57 -07:00
Timo Kreuzer 5b82ada2ed [NTOS:Ke/x64] Improve KiDispatchExceptionToUser
Return back to the caller instead of exiting through KiServiceExit2, which is broken and needs to be changed to allow restoring of an exception frame.
2024-04-04 18:41:39 +02:00
Timo Kreuzer 24b4026ce8 [NTOS:KE/x64][SDK] Add HANDLE_USER_APCS asm macro
This also fixes delivering APCs from the system call handler, which previously would have clobbered rax. Also don't use the thread's TrapFrame member, which is not always set, when returning.
2024-04-01 20:15:49 +02:00
Timo Kreuzer 88e24bc463 [NTOS:KE/x64][SDK] Add some trap handling support asm macros 2024-04-01 20:15:49 +02:00
Thamatip Chitpong 5329e475db [NTOS:MM] MiDeleteVirtualAddresses: Update PrototypePte before exiting loop, when deleting PDE
Fix BSoD 0x1A introduced by commit c7e09061ca
CORE-18190
CORE-18818
CORE-19253
2024-04-02 00:14:57 +07:00
Thamatip Chitpong 588449c364 [NTOS:MM] Revert commit 0c612980ac
This revert commit 0c612980ac
2024-04-02 00:14:57 +07:00
Serge Gautherie 6dcf70f398
[DOC] 3rd Party Files.txt: Update/Complete 'CardLib' (#6688)
As mentioned in e.g. base/applications/games/solitaire/ReadMe.txt ,
CardLib is indeed freeware, in public domain.
2024-04-01 18:29:29 +02:00
Dmitry Borisov 5070e8960a
[ACPI] Fix object evaluation (#6302)
CORE-17256

- Implement support for complex input buffers.
  This will enable the IDE driver with some hack
  to execute the _STM (channel timing settings) control method.
- Fix a memory leak.
- Fix returned status code.
- Correctly calculate the output buffer size.
- Improve buffer validation.
- Implement support for async control requests.
- Implement local reference conversion.
- Implement support for subpackage argument conversion.
- Place some code into INIT section.
2024-04-01 18:21:35 +02:00
Timo Kreuzer 1538712c0b [NTOS:KE/x64] Move setting the thread's trap frame to KiSystemCallEntry64
This is needed, because KiSystemCallHandler can be called multiple times for the same syscall entry, which would mess up the linkage. This replaces a previous hack and makes things cleaner.
2024-03-31 12:12:48 +02:00
Gleb Surikov fc6bf61e4c
[NTOS:CM] Avoid unnecessary ObDereferenceObject when handling an ObInsertObject failure (#6673)
In case of failure, ObInsertObject itself dereferences the object, so calling ObDereferenceObject one more time in the failure handler is redundant.

- Remove ObDereferenceObject call from CmpCreateRegistryRoot in case ObInsertObject fails.
- Add missing RootKey dereference if CmpCreateRegistryRoot failed to get the key cell (KeyCell).

CORE-17904
2024-03-30 22:10:17 +03:00
Ratin Gao 1cf8759d69
[KERNEL32][KERNEL32_VISTA][KERNEL32_APITEST] Implement and export NT6+ firmware API (#6580)
- Implement `GetFirmwareType` and improve existing API test for it
- Move (Get/Set)FirmwareEnvironmentVariableEx(A/W) to kernel32_vista_static and export them when NT version >= 6.2

Addendum to 4c8a2a8815. CORE-11954
2024-03-30 15:46:34 +03:00
Serge Gautherie a68406bccf
[DOC] 3rd Party Files.txt: Add 'AMD LibM for Windows' (#5945)
Addendum to 4afb647 (0.4.15-dev-5466).
2024-03-30 03:57:24 +01:00
Timo Kreuzer 43fc73207d [FREELDR/x64] Set up CR0/CR4 for SSE instructions
Newer GCC starts emitting SSE/SSE2 instructions, which would cause a triple fault, during early boot, if not enabled.
2024-03-29 19:39:01 +01:00
Thamatip Chitpong 8ba6c66890 [MSCONFIG] Update title for en-US and th-TH 2024-03-29 09:35:44 +07:00
Katayama Hirofumi MZ 84f15b15fb
[SHELL32][SHELL32_APITEST] FindExecutable: Add PRF_FIRSTDIRDEF flag (#6681)
Follow-up to #6635. The directory search without this flag didn't work.
JIRA issue: CORE-19493
- Add PRF_FIRSTDIRDEF flag for PathResolveW call.
- Delete needless macro definitions in PathQualifyExW.
- Remove an assertion in IsLFNDriveW.
- Fix shell32_apitest:FindExecutable testcase.
2024-03-29 11:15:38 +09:00
Timo Kreuzer 5442f87080 [NTOS:KE/x64] Improve KiSystemCallHandler code a bit
- Use an index for the table instead of ugly pointer offset
- Invert the check for GUI calls
- Fail with proper status code on invalid win32k syscall ids
2024-03-28 22:26:42 +01:00
Timo Kreuzer 2ed8541dc8 [NTOS:KE/x64] Remove duplicated REX prefix from sysretq 2024-03-28 21:37:25 +01:00
Joachim Henze 558ab78fc5
[SHELL32] *.rc: Strip all unneeded WS_DISABLED in dlg style (#6675)
This is not intended to fix any specific bug. It is just meant for cleanup.
No noticable change in behavior at runtime.
Some rcs had 7 of those, some only 6. So this will also slightly improve sync between the rcs.
2024-03-27 23:37:41 +01:00
Doug Lyons 0c612980ac
[NTOS:MM] Fix ntoskrnl/mm/ARM3/virtual.c causing BSOD 0x1a introduced by commit https://github.com/reactos/reactos/commit/c7e09061ca (#6633) 2024-03-27 23:50:45 +02:00
Adam Słaboń fec827eeef
[FREELDR][NTOS:MM] Add security cookie generation to FreeLoader (#6270)
* [NTOS:MM] Misc improvements for cookie generation code

- Improve support for 64 bit images
- Improve LdrpFetchAddressOfSecurityCookie code

* [FREELDR] Add security cookie generation to FreeLoader

CORE-17808
2024-03-27 23:33:06 +02:00
Timo Kreuzer 36fa628605 [NTOS:KE/x64] Loop in KiInitiateUserApc
This is required since while interrupts are enabled, another user APC could get queued and we want to guarantee that those are all delivered before returning to user mode.
2024-03-27 22:11:07 +01:00
Joachim Henze e3bfcdf9e2
[SHELL32] pl-PL.rc: Fix IDD_FILE_PROPERTIES & IDD_FOLDER_PROPERTIES (#6678)
- This removes an ancient polish-only workaround/extrawurst of 0.4.13-dev-1171-g c81af08 which made the dialog bigger than allowed in y, and which reduced its usability on small monitor resolution.
- Sync the dialogs dimensions back to en-US and all other localizations. Notice also that both dialogs have the same height again afterwards.
- Maximizes the available space for the dynamic parts of the dialog on the right side. Historically even 160 turned out to be too short for that, e.g. EDITTEXT 14009, the dynamic part of "Lokalizacja:". and also EDITTEXT 14007, the dynamic part of "Program:". Therefore we used 170 everywhere for those widths in all other languages. But due to the polish workaround it was crippled to 155 here. Not good!
- Notice also how now the leftmost checkboxes position of the Attributes is perfectly aligned with the other dynamic content of that column above after the fix. This will be important in the future when we will restore the vertical layout of Attribute-checkboxes in both dlgs (Plik vs. checkbox, and Katalog vs. checkbox) to match 2k3sp2
---------
Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
2024-03-27 21:08:17 +01:00
Gleb Surikov a9d9f0de86
[CONFIGURE] Add support for MSVC Toolset 19.4x (#6677)
The MSVC toolset will increment its minor version number from 19.39 (VS 2022 v17.9) to 19.40 (VS 2022 v17.10). The MSVC toolset will be version 19.40.33521.0 in the preview 1 release. For more details, see the MSVC Toolset Minor Version Number 14.40 in VS 2022 v17.10 blog post: https://aka.ms/msvc-ver14.40
2024-03-27 21:04:18 +03:00
Katayama Hirofumi MZ 72a27e6d45
[SHELL32] CQueryAssociation: Add slash check (#6676)
Follow-up to #6656. I had forgotten to check the slash.
JIRA issue: CORE-19493
Add StrChrW(pszAssoc, L'\\') check before PathFindExtensionW call.
2024-03-27 17:36:48 +09:00
Katayama Hirofumi MZ f9a5585870
[SHELL32] Improve FindExecutableW (#6635)
Follow-up to #6656. An approach to
implement ShellExecuteEx correctly.
JIRA issue: CORE-19493
- Rewrite code by using AssocQueryStringW
  and PathResolveW functions.
2024-03-27 17:04:49 +09:00
Joachim Henze 00c4b3d99f
[SHELL32] *.rc: Anonymize the "LIST2" control in IDD_AUTOPLAY1 (#6672)
same as it is already the case in IDD_MIXED_CONTENT1, just 10 lines below it.
The controls name is not referenced from code. Will save a few bytes in the binary and shortens the rc-line.
2024-03-26 23:39:46 +01:00
Joachim Henze ee0329e0e2
[SHELL32] *.rc: accelerator fixes, FIXMEs, drive-properties bg-BG and fr-FR (#6591)
* en-US.rc: create the TODO-list for the required menu-accel-changes

* some accelerator fixes, and add many FIXMEs for stuff that still needs to be improved

* beg the translators to shorten the "On Disk:" string in IDD_FILE_PROPERTIES and IDD_FOLDER_PROPERTIES

* strip superfluous spaces at some strings end and ':' within groupboxes, MS never does that

* bg-BG.rc & fr-FR.rc: Fix text-truncation, It got worse by 0.4.15-dev-5993-g a5bff2457a (#5239) A suggestion of Stasm, personally I dislike moving/resizing controls to dimenstions != en-US

* zh-CN.rc: China is the new land of capitalism, so CAPITALIZE the S. Grab another &W used in en-US/zh-TW

* he-IL.rc: strip a useless comment which just does repeat the string 1:1

* zh-TW: This taiwanese question-mark here is wrong, because the question spans over multiple controls, and the last one already ends with such a question mark.

* pt-PT.rc: Name the attributes-column 'Atributos', as that is the same name that is used in the file-properties-dlg

* sk-SK.rc: strip a comment that does not exist in any other lang

* Fix some lines which had 2 accelerators each, e.g. de-DE.
 IDD_FOLDER_OPTIONS_GENERAL has 100% correct german accelerators now (checked against german XPSP3).

* es-ES.rc: remove a stone-age-workaround, and use the height from en-US again here. The text fits the single line fine now.

* no-NO.rc: Fix a regression of 0.4.9-dev-794-g bf88116252 which added the 70 to the 3 PUSHBUTTONS for all languages, but for no-NO.rc the third button was forgotten

* pt-PT.rc: Fix 2 wrong accelerators. They have been added by a pt-PT.rc translator, but Windows doesn't have them. Windows uses ENTER and ESCAPE just here. And other translators are aware of that. The thing that actually SHOULD have an accelerator in that dialog is the LTEXT "Abrir", but ironically that one was forgotten / intentionally removed by the pt-PT.rc translator upon translation. A pity!

* pt-PT.rc: pt-PT.rc was crippled regarding accelerators, mostly during 0.4.14-dev'ing. Wisdom of the elders was trampled down here.

* pt-PT.rc: fix unintended "::"

* tr-TR.rc: During 0.4.15-dev'ing a lot of accelerators and capitalization were changed in this file, and during that the IDS_* accelerators at the bottom in that file in the
/* context menus */
section were changed, but the reminder-menu-layouts IDM_* and FCIDM_SHVIEW_* were forgotten to be kept in sync.
That is such a common pitfall. Happened to all of us more than one time already.
Sync the capitalization for that file at least. While knowing that there is still a lot of async left for other files.

* tr-TR.rc: Point with 2 FIXMEs to some accelerator-issues that only somebody with a real turkish Windows will be able to fix properly. Actually most likely at least 6 lines in this file are involved into that collision. Try to mention them within the comment at least.
IDM_COPY
IDM_CREATELINK
IDM_DELETE
and
IDS_COPY
IDS_CREATELINK
IDS_DELETE
This bug does only affect master, and no older releases in this form.

* en-US.rc: And finally add a big fat TODO comment for my future self, regarding dlg redesign where attrubutes will need to be laid out vertically in IDD_FILE_PROPERTIES and IDD_FOLDER_PROPERTIES
2024-03-26 17:07:33 +01:00
Maj Soklič f92972efca
[NOTEPAD] Update Slovenian (sl-SI) translation (#6599)
Reviewed-by: Rok Mandeljc <rok.mandeljc@gmail.com>
Reviewed-by: Jaka Kranjc <smgl@lynxlynx.info>
2024-03-25 20:02:15 +03:00
Katayama Hirofumi MZ 6ac153632f
[SHELL32] IQueryAssociations: Fix path and length (#6656)
Implementing correct FindExecutable...
JIRA issue: CORE-19493
- If there were filename extension, then skip to the extension
  by using PathFindExtensionW.
- Use "open" verb if there is no default action if possible.
- Set outlen at CQueryAssociations::ReturnString.
2024-03-25 07:35:15 +09:00
Whindmar Saksit a83e40f6d1
[SHELL32] Fix FS folder assoc array class order (#6047)
Fixes the reg class key order for FS items. The existing code was close,
but for some reason used `//` as the path separator for SystemFileAssociations!

- Fixed SystemFileAssociations.

- Swapped the order of `*` and `AllFilesystemObjects`. This is the documented
  order and can also be observed in Process Monitor.
  https://learn.microsoft.com/en-us/windows/win32/shell/fa-associationarray#about-association-arrays

- Removed `(..., L"%s//%s", extension, wszClass)`, this does not seem to be
  a valid thing (`.TestAAExtWeird` in my tests).

- Adds the `Unknown` class when appropriate. Not adding the `openas` verb
  to `Unknown` rgs registration now to mimic Windows, because ROS
  `CDefaultContextMenu` lacks verb de-duplication and the menu would end up
  with two "Open With" entries. This just uses `(cidl == 1)` to simulate
  Windows, while Windows on NT6 uses `MultiSelectModel=Single`, a NT6 feature
  not implemented in ROS.

- The class order for folders was wrong and is still "wrong" in this PR,
  but I chose to use the Windows menu display order until the exact mechanics
  required in `CDefaultContextMenu` can be understood.

- Extracts the extension from ANSI PIDLs.
2024-03-24 21:37:59 +01:00
Whindmar Saksit f6cf6954eb
[SHLEXTDBG] Added IQueryAssociations, SHGetFileInfo and ShellExecute actions (#6030)
Added multiple new actions, most of them will use the system default implementation but can be forced to use a specific CLSID or IShellFolder implementation.

-  /shgfi (SHGetFileInfo)
-  /assocq (IQueryAssociations)
-  /shellexec (ShellExecuteEx on pidl)
-  /dumpmenu (Dumps the HMENU of a IContextMenu with its menu ids and verbs)

Added /explorerinstance as a new wait mode and made it the default. All the other wait modes are hacks that just works around bugs in ROS.
2024-03-24 21:27:04 +01:00
George Bișoc 7dd8a30cf9
[NTOS:CM] Remove orphaned KCBs of keys during normal hive unload
A hive whose KCBs have a reference count of 0, meaning nobody is using these keys anymore, will not get removed from the cache table.
As a result during a normal hive unloading operation you will get orphaned KCBs which results in an unload failure.

This is wrong, because this is what a normal hive unloading is supposed to do. What it cannot do of course is that it cannot
scramble the references of opened keys by the users who use the Registry, as it is the job of force unloading mechanism to do that.

Also remove a misleading debug print. Force unloading works as intended by scrambling the references of keys and marking the KCB for deletion,
which is what how a force unload works. Namely Windows does exactly that.

CORE-10705
2024-03-24 19:03:47 +01:00
George Bișoc f1d2a44859
[NTOS:CM] Lock the cached KCB before removing it from cache entries
- Annotate the CmpEnumerateOpenSubKeys function with SAL2
- When removing an orphaned cached KCB, ensure that it is locked before clearing it from cache table entries
2024-03-24 19:03:43 +01:00
Whindmar Saksit 2449ed5d85
[ADVAPI32] Handle HKCR in RegDeleteValueA+W and RegDeleteKeyValueW (#6033)
- HKCR delete handling; delete the value in HKCU if it exists there, otherwise delete it in HKLM.
- Changed RegDeleteKeyValueW to just use the regular Reg functions to get HKCR handling for free.
2024-03-24 18:28:26 +01:00
Whindmar Saksit 373816c729
[SHELL32] Support IDropTarget handler in IContextMenu static verbs (#5860)
This adds support for the `DropHandler` subkey in static verbs. `IDropTarget` is called when the verb is invoked. The advantage of this is that no library needs to be loaded until the verb is actually invoked unlike `IContextMenu` shell extensions that have to be loaded during menu creation.

This method is preferred for verb implementations that must work on Windows XP, see
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/dd940354%28v%3Dvs.85%29?redirectedfrom=MSDN#description
2024-03-24 18:23:07 +01:00