Commit graph

84133 commits

Author SHA1 Message Date
Justin Miller 1b0b4ff729 [SDK][HAL] ARM64 diverges from a few inline functions compared to amd64 2023-10-12 18:19:48 -07:00
Justin Miller 79dc2bcb5b [SDK] Add ARM64 entry to ioacccess.h 2023-10-12 18:19:47 -07:00
Justin Miller e3f50091d7 [HACK] Disable github build actions for architecutres other then ARM(s) 2023-10-12 18:19:47 -07:00
Katayama Hirofumi MZ 1183e797b4
[MSPAINT] Reset scroll position in some situations (#5789)
In some situations, the scroll position should be reset.
- Add CCanvasWindow::resetScrollPos method.
- Reset the scroll position on loading a file.
- Reset the scroll position on mirroring/rotating
  the image.
CORE-19094
2023-10-12 22:59:17 +09:00
Katayama Hirofumi MZ 9a51c8e6c6
[MSPAINT][NOTEPAD][REGEDIT] Don't use CRTDBG for these apps (#5788)
Don't include <crtdbg.h>.
Don't use _CrtSetDbgFlag.
2023-10-12 22:53:02 +09:00
Katayama Hirofumi MZ 70d5c864bc [MSPAINT] Do type-cast (float) for xDpi and yDpi
CORE-19094
2023-10-12 19:43:29 +09:00
Katayama Hirofumi MZ 409df2355e [MSPAINT] Do type-cast (BYTE) for lfItalic and lfUnderline
CORE-19094
2023-10-12 19:38:41 +09:00
Katayama Hirofumi MZ 4306e261ee [MSPAINT] Do type-cast (BOOL) for TB_ISBUTTONCHECKED return
CORE-19094
2023-10-12 19:31:22 +09:00
Katayama Hirofumi MZ bc28675a44 [MSPAINT] s/WINBOOL/BOOL/
CORE-19094
2023-10-12 19:13:20 +09:00
Justin Miller ff3dadf89d
[FREELDR] Enable UEFI boot for x86 and amd64 (#5267)
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>

- Allow to boot NT kernel on UEFI systems with our 2 primary supported architectures
- Implement remaining code needed to pass execution to x86 and amd64 kernels

CORE-11954
2023-10-11 12:45:08 -07:00
Oleg Dubinskiy a6b281c228
[KS] KsRead/WriteFile: finish IRP initialization and properly setup I/O stack location for it (#5784)
- Initialize the rest of IRP data which is not initialized by IoBuildSynchronousFsdRequest.
- Setup an IO_STACK_LOCATION structure for the IRP before calling the driver's read/write routine.
- Do this for both KsReadFile and KsWriteFile functions in our Kernel Streaming driver (ks.sys).
This fixes several problems when calling these functions from outside, so now they are working correctly, as expected.
Discovered during my audio investigations.
CORE-19232
2023-10-10 13:30:00 -07:00
Alexey Strukov 8451230753
[DEVMGR] Allow to copy text from Details page of device properties (#5775)
In driver properties, in details tab, add a "Copy" popup menu for listview.
This will allow to copy driver's information to buffer.
2023-10-10 21:22:54 +02:00
Katayama Hirofumi MZ 62eeb158a5
[MSPAINT] Improve Zoom tool (#5781)
- Delete CCanvasWindow::drawZoomFrame.
- Invalidate the canvas on mouse move when
  the active tool is Zoom tool.
- Add ZoomTool::OnDrawOverlayOnCanvas to
  draw the zoom rectangle without flickering.
- Improve the zoom trackbar position.
- Display the zoom rate on changing the value
  of the zoom trackbar.
- Reverse the direction of the zoom trackbar.
- Don't draw the focus rectangle.
CORE-19215, CORE-19216
2023-10-10 10:59:29 +09:00
Katayama Hirofumi MZ 0c164f081a
[MSPAINT] Check out of image in updating status bar (#5779)
Check out of the image by using ::PtInRect and CCanvasWindow::GetImageRect.
If out, then don't show the status bar text.
CORE-19219
2023-10-09 08:39:31 +09:00
Katayama Hirofumi MZ 611d89eb8b
[MSPAINT] Add border width to tool box (#5780)
Make tool box pixel-perfect. Add two border widths to the tool box.
CORE-19217
2023-10-09 08:37:31 +09:00
Timo Kreuzer 63aef3e1fc [T2EMBED] Improve spec file
- Only export stdcall annotated functions on x86
- Turn annotated stubs / forwarders into normal exports
- Note: MSVC removes decorated exports / forwarders, as soon as the undecorated version is exported, even when _declspec(dllexport) is used, no idea how to fix that.
2023-10-09 02:34:30 +03:00
Katayama Hirofumi MZ 8d8f4d328c
[MSPAINT] Zoom tool shouldn't use undo buffer (#5778)
Remove PushImageForUndo call in Zoom tool. CORE-19214
2023-10-09 08:07:02 +09:00
Hermès Bélusca-Maïto 11b706429c
[WSHTCPIP] Remove unneeded headers + Fix bugs.
- Mismatch NTSTATUS/DWORD for win32 errors;
- Close handle returned from openTcpFile() with closeTcpFile().
2023-10-08 17:11:26 +02:00
Hermès Bélusca-Maïto 9021a14f4a
[NDK] Fix weird "ntstatus.s" statement (#5771)
Spotted by Serge Gautherie.
2023-10-08 17:11:25 +02:00
Joachim Henze 42c93e3cbb
[TASKMGR] *.rc: Fix accelerator collisions &Priority <-> &Properties (#5758)
We had collisions in many languages.
For most languages (which are derived from en-US) we should use
&Priority
P&roperties

We introduced the collisions during 0.4.15-dev'ing when
MENUITEM ID_PROCESS_PAGE_PROPERTIES
and
MENUITEM ID_PROCESS_PAGE_OPENFILELOCATION
were added.


We verified Win7-en and Win2k3-en to behave as proposed in this PR (R for properties, P for priority).
But *french* Windows (I believe Hermes picture was from WinVista-fr or Win7-fr or Win10-fr maybe) does it differently.

the existing de-DE also has been double-checked to exactly match MS with the accelerators in that menu.
2023-10-07 23:03:47 +00:00
Hermès Bélusca-Maïto ce08851758
[DESK] Use MultiByteToWideChar instead of the private pSetupMultiByteToUnicode function (#5765)
This avoids having desk.cpl depend on a private function that may change
or disappear, and increase the probability of being able to use that CPL
across different Windows versions.

(Note: this pSetupMultiByteToUnicode was one of those whose name changed
between Windows 2000 and XP+)
2023-10-07 22:17:58 +02:00
Hermès Bélusca-Maïto e4608f7450
[DESK][SHELLBTRFS] Fix typo in WIN32_NO_STATUS 2023-10-07 22:15:12 +02:00
Hermès Bélusca-Maïto d0b43a399f
[NETID] Simplify IsUserAdmin() helper implementation (#5763)
Addendum to commit 8c4b0c914.

Base ourselves on pSetupIsUserAdmin() and other similar functions in our
codebase. Note that what we are actually interested here, is whether the
current thread runs with Administrator privileges.

(As noticed by contributor 'whindsaks', "Not only is this code simpler,
it now will correctly handle deny-only SIDs in the token!")
2023-10-07 21:52:36 +02:00
Timo Kreuzer e685b25e35 [NTOS:MM/x64] Temporarily release AddressCreationLock in MmCreateVirtualMappingUnsafeEx
This is a hack, because the kernel mode path can incur a recursive page fault with the AddressCreationLock acquired, which would lead to a recursive acquisition, once we do proper locking in MmAccessFault.
To properly fix this the PDE must be made valid, similar to the user mode path, but that is not that simple...
2023-10-07 10:58:30 +03:00
Oleg Dubinskiy d96b3cd45c
[KS] Fix bug in KsStreamIo (#4663)
Properly set output buffer length in IO Stack Location of the current IRP, since it is passed to KsProbeStreamIrp when calling KsStreamIo, so it fails if the length isn't set properly.

Don't set an input buffer length and the buffer itself, since it isn't passed anywhere, so setting it makes no sense. Moreover, MSDN says that for IOCTL_KS_READ/WRITE_STREAM, only output buffer (and its length) is needed to be set, but not an input one. So it indeed is more correct.

It fixes buffer overflow in KsProbeStreamIrp when attempting to perform the streaming via KsStreamIo. I discovered this bug during my audio refactoring from PR #4660.
2023-10-06 12:36:09 +02:00
Hermès Bélusca-Maïto 2a5fd78f1b
[APPHELP_APITEST] Fix build, addendum to commit a8755711b 2023-10-05 21:32:38 +02:00
Hermès Bélusca-Maïto a8755711b9
[APPHELP_APITEST] Deduplicate the IsUserAdmin() helper. 2023-10-05 20:58:57 +02:00
Hermès Bélusca-Maïto f1cff6ef27
[DESK] Remove deprecated code.
This mostly reverts commit 221f21c62 (r29328), that was a hack for
building with MSVC. We can nowadays correctly link with the shell32
SHCreatePropSheetExtArrayEx() export.
2023-10-05 20:58:28 +02:00
Katayama Hirofumi MZ 1a90009bb9
[MSPAINT] Update scroll info on loading file (#5761)
The scroll info was not updated when the file is loading.
- Rename CCanvasWindow::Update as CCanvasWindow::updateScrollInfo.
- Update scroll info on ImageModel::NotifyImageChanged.
- Improve ImageModel::ClearHistory.
CORE-19094
2023-10-05 20:01:41 +09:00
Katayama Hirofumi MZ 3579ea7888
[MSPAINT] Fix assertion failure on text tool (#5762)
Kill the assertion failure on choosing text tool.
Check whether textEditWindow is not null by using IsWindowVisible.
CORE-19094
2023-10-05 19:51:36 +09:00
George Bișoc d72025649b
[NTOS:SE] Mute the access denied DPRINTs
They can be spammy. Also clarify these debug prints, because some people
think that "failed to grant access rights" means there's something wrong
in the core access check functions.
2023-10-04 18:04:30 +02:00
George Bișoc 09bfd96f3b
[NTOS:SE] HACK: Temporarily add the Local group SID to the system token
Temporarily add the local group to the system token so that Virtualbox
GA services can properly set up network drives for shared folders.

What happens is that a security descriptor has a DACL with only one ACE
that grants access to Local SID (presumably coming from Vbox?)
but the client token is that of the service which is a SYSTEM token.
Perhaps we are not impersonating the right user or whatever else.

This is only a temporary placebo, until a proper solution is found.

CORE-18250
2023-10-04 18:04:30 +02:00
George Bișoc fefb1b7745
[NTDLL_APITEST] Write NtAccessCheck testcase that tests for empty generic mapping scenario
See b79aadd50bb7d5d6f08532284941c0334514c477 for further information.
2023-10-04 18:04:29 +02:00
George Bișoc 4b4638dc55
[NTOS:SE] HACK: Temporarily grant access to the client if empty generic mapping was passed
Certain apps such as AIM installer passes an empty generic mapping (this can
be understood with their generic masks set to 0) and our code tries to map
the access right from an ACE with the mapping provided by AccessCheck.

This can lead to a bug where we would not be able to decode the generic right
from an ACE as we need a proper generic mapping in order to do so. A mask
right that is not decoded it cannot be used to mask out the remaining rights,
further resulting into a denied access right.

What Windows does instead is they are mapping the ACE's rights in another place,
presumably when setting security data to an object, and they are using the
generic mapping passed by the kernel.

What we can do for the time being is to temporarily grant access to the client,
but only if they are an administrator.

CORE-18576
2023-10-04 18:04:29 +02:00
George Bișoc 95c104f29a
[TCPIP] Setup a security descriptor for the IP and TCP device objects
Grant access to such objects to system, admins and network services.
2023-10-04 18:04:17 +02:00
Ratin Gao be5c889cdf [NTDLL:LDR] SAL improvements and fixes
- Convert some notations to SAL2
- "Name" parameter in LdrGetProcedureAddress/LdrpGetProcedureAddress should be optional
- "DllCharacteristics" parameter in LdrGetDllHandle should be optional
2023-10-04 12:26:18 +03:00
Joachim Henze 46b4b5581d
[TASKMGR] Favor _countof(), no functional change intended (#5757)
Taskmgr used a mixture: Sometimes _countof(), sometimes ARRAYSIZE()
and sometimes it calculated the count plain by sizeof(var)/sizeof(TYPE).
Harmonize everywhere to _countof() as it is the shortest solution.

Fix some formatting sins, like placing comments before else-statement.
Shorten the length of some very long line
intentionally *without introducing additional linebreaks* !

Shorten vertical length of some functions to increase their chance to
fit on the screen without scrolling.

Fix wrong indentation level in TaskManagerWndProc().

*.rc: Remove superfluous and redundant comment in all langs

No functional change intended.
2023-10-03 21:00:10 +02:00
Timo Kreuzer 410b1030c0 [NTOS:KE/x64] Implement detection of more KF_* feature flags
- Detect KF_SSSE3, KF_SSE4_1, KF_SSE4_2, KF_RDRAND, KF_BRANCH, KF_SLAT, KF_GENUINE_INTEL, KF_AUTHENTICAMD, KF_ACNT2, KF_SMEP, KF_SMAP, KF_RDWRFSGSBASE, KF_XSAVEOPT, KF_XSAVES, KF_HUGEPAGE, KF_RDTSCP
2023-10-03 19:45:44 +03:00
Timo Kreuzer 1a7ab2fe68 [NTOS:KE/x64] Use structures for CPUID 2023-10-03 19:45:44 +03:00
Timo Kreuzer 6048ebeff9 [SDK] Add CPUID and MSR definitions for x86/x64
- Import definitions from edk2 (see https://github.com/tianocore/edk2/tree/master/MdePkg/Include/Register)
- Add additional unions as well as AMD SVM CPUID
2023-10-03 19:45:44 +03:00
Timo Kreuzer 70f6ed8ee3 [NTOS:KE/x64] Improve CPU feature detection
- Use 64 bit feature flags (with a hack in the PRCB)
- Improve setting up SharedUserData->ProcessorFeatures
2023-10-03 19:45:44 +03:00
Timo Kreuzer 47c1dcd023 [NDK] Update kernel feature bits constants
- Move them into architecture specific headers.
- Add missing constants based on https://www.geoffchappell.com/studies/windows/km/ntoskrnl/structs/kprcb/featurebits.htm
- Yes, they are 64 bits
2023-10-03 19:45:44 +03:00
Timo Kreuzer b66441d581 [XDK] Add missing PF_* processor feature definitions 2023-10-03 19:45:44 +03:00
George Bișoc 50f367fa58
[NTOS:CM] Use COMPUTE_HASH_CHAR to compute the conv hash key
We have a dedicated macro definition for that so just use it.
2023-10-03 11:01:21 +02:00
Whindmar Saksit 34066e475a
GetDetailsOf does not support column flags (#5755)
GetDetailsOf does not support the column flags used by CompareIDs.
As a side effect, also fixes LPARAM to UINT truncation on 64-bit.
2023-10-03 10:43:44 +02:00
Joachim Henze 6528ab8fcb [TASKMGR] de-DE.rc Update part 3
I spotted yet another flip:
translation of IDS_TAB_PFDELTA and IDS_TAB_VMSIZE were flipped.

I spotted that by toggling all columns off entirely
in the View-Options dialog where the columns can be selected
and then added only one column at a time. I did that for all options.

I do recommend translators of other langs to do the same test,
I was shocked about the amount of bugs I spotted for german.
And it is very subtle / easy to miss, if you enable/disable multiple columns
together!

Let's call it a day now!
2023-10-03 06:31:04 +02:00
Joachim Henze 65ce20896a [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
This is an addendum to 0.4.15-dev-413-g ed7196d964

binary size shrinks slightly although that dlg was unused:
taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg  715.264 -> 708.608
2023-10-03 03:50:41 +02:00
Joachim Henze 142c35fcce [TASKMGR] de-DE.rc Update
GRAPH == 'Anzeige'. Addendum to last commit
2023-10-03 02:47:10 +02:00
Joachim Henze e15d68ba5d [TASKMGR] de-DE German Update & bug-fixes
This fixes several issues:
- add a few missing translations, e.g. ID_PROCESS_PAGE_PROPERTIES & ID_PROCESS_PAGE_OPENFILELOCATION
- IDS_TAB_PEAKMEMUSAGE translation was flipped with IDS_TAB_MEMDELTA
- IDC_MEM_USAGE_FRAME had text truncation, fix that by structurally switching to "Speicher"
- waste less space for the listview headers in the Processes tab so user can display more columns conveniently without the headers unnecessarily being crippled to "..."
- Sync some controls sizes back to en-US in the performance tab
- Translation for ID_VIEW_CPUHISTORY_ONEGRAPHALL and ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU was swapped accidentally
- Strip comment lines in the end, which were outdated anyway
- avoid monsters that not even a german person can read like "Auslagerungsdateiauslastungs-Verlaufsanzeige" which is like "Donaudampfschifffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft"
2023-10-03 02:05:28 +02:00
Carl J. Bialorucki 3e46a8673d [EXPLORER][COMCTL32] Fix balloon tooltips and system pager alerts (#5559)
- [EXPLORER] Set maximum balloon width for notification area
- [COMCTL32] Fix balloon tooltip shape

- Limit balloon tooltips from extending past the edges of the monitor, not the edges of the work area.
- Instead of simply repositioning the main rectangle when the balloon is too far towards one edge of the screen,
  try flipping the balloon the other way. This is the same behavior as Windows Server 2003.
- Tweak some values used to draw the balloon tooltips to more closely follow the Windows balloon tooltip style.
- Removing trailing whitespace.
- While the new changes are guarded, consider cancelling our Wine sync for common controls.
  Our common controls are responsible for many graphical issues and lack of features throughout ReactOS.

CORE-19109
2023-10-03 01:08:45 +03:00