reactos.git
5 hours ago[TASKMGR] Favor _countof(), no functional change intended (#5757) master
Joachim Henze [Tue, 3 Oct 2023 19:00:10 +0000 (21:00 +0200)]
[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.

7 hours ago[NTOS:KE/x64] Implement detection of more KF_* feature flags
Timo Kreuzer [Sun, 27 Aug 2023 12:07:30 +0000 (15:07 +0300)]
[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

7 hours ago[NTOS:KE/x64] Use structures for CPUID
Timo Kreuzer [Sun, 27 Aug 2023 09:08:37 +0000 (12:08 +0300)]
[NTOS:KE/x64] Use structures for CPUID

7 hours ago[SDK] Add CPUID and MSR definitions for x86/x64
Timo Kreuzer [Sun, 27 Aug 2023 08:18:40 +0000 (11:18 +0300)]
[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

7 hours ago[NTOS:KE/x64] Improve CPU feature detection
Timo Kreuzer [Sat, 26 Aug 2023 13:15:38 +0000 (16:15 +0300)]
[NTOS:KE/x64] Improve CPU feature detection

- Use 64 bit feature flags (with a hack in the PRCB)
- Improve setting up SharedUserData->ProcessorFeatures

7 hours ago[NDK] Update kernel feature bits constants
Timo Kreuzer [Sat, 26 Aug 2023 09:10:04 +0000 (12:10 +0300)]
[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

7 hours ago[XDK] Add missing PF_* processor feature definitions
Timo Kreuzer [Sat, 13 May 2023 14:03:04 +0000 (17:03 +0300)]
[XDK] Add missing PF_* processor feature definitions

15 hours ago[NTOS:CM] Use COMPUTE_HASH_CHAR to compute the conv hash key
George Bișoc [Tue, 3 Oct 2023 09:01:21 +0000 (11:01 +0200)]
[NTOS:CM] Use COMPUTE_HASH_CHAR to compute the conv hash key

We have a dedicated macro definition for that so just use it.

15 hours agoGetDetailsOf does not support column flags (#5755)
Whindmar Saksit [Tue, 3 Oct 2023 08:43:44 +0000 (10:43 +0200)]
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.

20 hours ago[TASKMGR] de-DE.rc Update part 3
Joachim Henze [Tue, 3 Oct 2023 04:31:04 +0000 (06:31 +0200)]
[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!

22 hours ago[TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
Joachim Henze [Tue, 3 Oct 2023 01:50:41 +0000 (03:50 +0200)]
[TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG

This is an addendum to 0.4.15-dev-413-g ed7196d9645f66b49db434c509c2b7e18817dcca

binary size shrinks slightly although that dlg was unused:
taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg  715.264 -> 708.608

23 hours ago[TASKMGR] de-DE.rc Update
Joachim Henze [Tue, 3 Oct 2023 00:47:10 +0000 (02:47 +0200)]
[TASKMGR] de-DE.rc Update

GRAPH == 'Anzeige'. Addendum to last commit

24 hours ago[TASKMGR] de-DE German Update & bug-fixes
Joachim Henze [Tue, 3 Oct 2023 00:05:28 +0000 (02:05 +0200)]
[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"

26 hours ago[EXPLORER][COMCTL32] Fix balloon tooltips and system pager alerts (#5559)
Carl J. Bialorucki [Thu, 10 Aug 2023 15:21:03 +0000 (09:21 -0600)]
[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

26 hours ago[REACTOS] Revert badly formatted commits
Stanislav Motylkov [Mon, 2 Oct 2023 22:00:07 +0000 (01:00 +0300)]
[REACTOS] Revert badly formatted commits

This reverts commits ab1868c7bf7f700f9363a5553cb07d73b9ea962b and 1aa76275ac7aac74ef3b4d9a05e55ef9fcf7fd7b.

27 hours ago[BROWSEUI] More settings and window refresh (#5584)
Carl J. Bialorucki [Mon, 2 Oct 2023 20:43:00 +0000 (14:43 -0600)]
[BROWSEUI] More settings and window refresh (#5584)

Adds the option to set the address edit box to use the display name or the full path. Also refreshes the window title and edit box in all open explorer windows when changing these settings using the folder options dialog.

## PROPOSED CHANGES ##
- Create a new CabinetStateSettings type that inherits from the CABINETSTATE type. This allows us to add additional cabinet state settings not exposed in the CABINETSTATE type as well as adding a Load() method to easily populate the cabinet state settings.

- Add a global cabinet state settings object. While most settings in browseui are stored independently in each shellbrowser window, cabinet state settings are global and apply to every shellbrowser window. This can be confirmed on Windows Server 2003 and Windows 7.

- When receiving the WM_SETTINGCHANGE window message from the folder options dialog, refresh the title of the window and the text in the address edit box. This is the same behavior as Windows Server 2003 and Windows 7.
Add a DWORD registry value to HKCU\...\Explorer\CabinetState\FullPathAddress to allow users to toggle this setting on or off in our folder options.

CORE-9277

27 hours agoFix balloon tooltip shape
Carl J. Bialorucki [Thu, 10 Aug 2023 15:21:03 +0000 (09:21 -0600)]
Fix balloon tooltip shape

27 hours agoSet maximum balloon width for notification area
Carl J. Bialorucki [Thu, 10 Aug 2023 15:21:03 +0000 (09:21 -0600)]
Set maximum balloon width for notification area

2 days ago[CALC] Use pragma once for calc.h (#5754)
Sarthak Roy [Sun, 1 Oct 2023 21:58:32 +0000 (03:28 +0530)]
[CALC] Use pragma once for calc.h (#5754)

It's simpler and only needs to be included once at the beginning of the
header file. It generates an unique identifier for the file automatically,
so maintainers wouldn't need to choose unique names for the macros.
It will be helpful if any future refactoring takes place.

Signed-off-by: Sarthak Roy <sarthakroy2002@gmail.com>
2 days ago[NTDLL_WINETEST] Enable registry tests for KeyCachedInformation back 5088/head
George Bișoc [Thu, 16 Feb 2023 20:44:37 +0000 (21:44 +0100)]
[NTDLL_WINETEST] Enable registry tests for KeyCachedInformation back

2 days ago[NTOS:CM][DOCUMENTATION] Provide documentation for newly added functions
George Bișoc [Sat, 26 Aug 2023 20:37:53 +0000 (22:37 +0200)]
[NTOS:CM][DOCUMENTATION] Provide documentation for newly added functions

2 days ago[NTOS:CM] Implement cache lookup and cleanup subkey information for cache consistency
George Bișoc [Thu, 16 Feb 2023 20:42:26 +0000 (21:42 +0100)]
[NTOS:CM] Implement cache lookup and cleanup subkey information for cache consistency

During an open or create procedure of a registry key, the registry parser grabs
a key control block (KCB) from the parser object and uses its information to do the
necessary work in order to obtain a pointer to the newly created or opened registry key.

However, the registry parsers faces several issues. First, we don't do subkey cache cleaning
information against gathered KCBs so whenever we do a registry parse we end up with KCBs
that have cache inconsistencies. Moreover we don't do any locking of whatever KCB we
are grabing during a parse procedure.

=== PROPOSED CHANGES ===

* Implement CmpComputeHashValue and CmpLookInCache functions. With CmpComputeHashValue we can
compute the convkey hashes of each subkey in the path name of a key so we can lock them
with CmpBuildAndLockKcbArray. CmpLookInCache is a function that searches for the suitable
KCB in the cache. The factors that determine if a KCB is "suitable" are:

-- the currently found KCB in the hash list has the same levels as that of the
given KCB from the parse object;

-- The key names from the computed hash values match with the block name of
the KCB;

-- The currently found KCB is not deleted.

The KCB will be changed if the key path name points to a partial match name in
the cache. The KCB from the parse object will be used if we have a full match
of remaining levels.

* Add missing CMP_LOCK_HASHES_FOR_KCB flags on CmpCreateKeyControlBlock calls
that create KCBs during a parse procedure. Such lock has to be preserved until
we're done with the registry parsing.

* On CmpDoCreateChild, preserve the exclusive lock of the KCB when we are
enlisting the key body.

* On CmpDoCreate, make sure that the passed parent KCB is locked exclusively and
lock the hiver flusher as we don't want the flusher to kick in during a key
creation on the given hive. Cleanup the subkey info when we're creating a key
object. Also implement missing cleanup path codes. Furthermore, avoid key
object creation if the parent KCB is protected with a read-only switch.

* Soft rewrite the CmpDoOpen function, namely how we manage a direct open vs
create KCB on open scenario. When a KCB is found in cache avoid touching
the key node. If the symbolic link has been resolved (aka found) then lock
exclusively the symbolic KCB. Otherwise just give the cached KCB to the caller.

If it were for the caller to request a KCB creation, we must check the passed
KCB from the parser object is locked exclusively, unlike on the case above
the caller doesn't want to create a KCB because there's already one in the cache.
We don't want anybody to touch our KCB while we are still toying with it during
its birth. Furthermore, enlist the key body but mind the kind of lock it's been
used.

* On CmpCreateLinkNode, avoid creating a key object if the parent KCB is protected
with a read-only switch. In addition, add missing hive flusher locks for both
the target hive and its child. Cleanup the subkey information of the KCB when
creating a link node, this ensures our cached KCB data remains consistent.

* Do a direct open on CmpParseKey if no remaining subkey levels have been found
during hash computation and cache lookup, in this case the given KCB is the
block that points to the exact key. This happens when for example someone tried
to call RegOpenKeyExW but submitting NULL to the lpSubKey argument parameter.

CORE-10581
ROSTESTS-198

2 days ago[NTOS:CM] Do not call CmpSecurityMethod when assigning a security descriptor
George Bișoc [Fri, 24 Feb 2023 13:06:22 +0000 (14:06 +0100)]
[NTOS:CM] Do not call CmpSecurityMethod when assigning a security descriptor

CmpSecurityMethod is a method used by the Object Manager and called by this
subsystem whenever a security operation has to be done against a key object.

As CmpSecurityMethod is a specific OB construct we should not make any direct
call attempts to CmpSecurityMethod, only OB is responsible for that. This fixes
a deadlock where CmpSecurityMethod acquires a push lock for exclusive access
even though such lock is already acquired by the same calling thread in
CmpDoCreateChild.

2 days ago[NTOS:CM] Do not acquire a KCB lock twice when deleting a key object
George Bișoc [Fri, 3 Mar 2023 20:21:05 +0000 (21:21 +0100)]
[NTOS:CM] Do not acquire a KCB lock twice when deleting a key object

This prevents a deadlock in DelistKeyBodyFromKCB when we delete a key
object because of an access check failure during a open procedure of a
registry key, as we are already holding a lock against the target KCB of
the key body.

2 days ago[NTOS:CM] Do not acquire the lock twice when the Object Manager calls CmpSecurityMethod
George Bișoc [Sat, 25 Feb 2023 22:33:19 +0000 (23:33 +0100)]
[NTOS:CM] Do not acquire the lock twice when the Object Manager calls CmpSecurityMethod

Whenever a security request is invoked into a key object, such as when requesting
information from its security descriptor, the Object Manager will execute
the CmpSecurityMethod method to do the job.

The problem is that CmpSecurityMethod is not aware if the key control block
of the key body already has a lock acquired which means the function will attempt
to acquire a lock again, leading to a deadlock. This happens if the same
calling thread locks the KCB but it also wants to acquire security information
with ObCheckObjectAccess in CmpDoOpen.

Windows has a hack in CmpSecurityMethod where the passed KCB pointer is ORed
with a bitfield mask to avoid locking in all cases. This is ugly because it negates
every thread to acquire a lock if at least one has it.

2 days ago[NTOS:CM] Implement locking/unlocking of KCBs in an array
George Bișoc [Thu, 16 Feb 2023 20:21:31 +0000 (21:21 +0100)]
[NTOS:CM] Implement locking/unlocking of KCBs in an array

The CmpUnLockKcbArray, CmpLockKcbArray and CmpBuildAndLockKcbArray routines
help us to lock KCBs within array so that information remains consistent when
we are doing a cache lookup during a parse procedure of the registry database.

2 days ago[NTOS:CM] Add KCB array lock function prototypes & Other Stuff
George Bișoc [Thu, 16 Feb 2023 19:25:10 +0000 (20:25 +0100)]
[NTOS:CM] Add KCB array lock function prototypes & Other Stuff

Implement CmpBuildAndLockKcbArray and CmpUnLockKcbArray prototypes, we'll gonna need these
to do the locking/unlocking of KCBs stacked up in an array. In addition implement some CM
constructs specifically for cache lookup implementation (more at documentation remarks).

=== DOCUMENTATION REMARKS ===

CMP_SUBKEY_LEVELS_DEPTH_LIMIT -- This is the limit of up to 32 subkey levels
that the registry can permit. This is used in CmpComputeHashValue to ensure
that we don't compute more than the limit of subkeys we're allowed to.

CMP_KCBS_IN_ARRAY_LIMIT -- This is equal to CMP_SUBKEY_LEVELS_DEPTH_LIMIT
plus the addition by 2. This construct is used as a limit of KCB elements
the array can hold. 2 serves as an additional space for the array (one for
the root object and another one as extra space so we don't blow up the stack
array).

CMP_LOCK_KCB_ARRAY_EXCLUSIVE & CMP_LOCK_KCB_ARRAY_SHARED -- These flags are used exclusively
for CmpBuildAndLockKcbArray and CmpLockKcbArray. Their meaning are obvious.

CM_HASH_CACHE_STACK -- A structure used to store the hashes of KCBs for locking. It is named
"stack" because the way we store the hashes of KCBs is within an auxilliary "outer stack array".

2 days ago[NTOS:CM] Implement the shared lock macro for use
George Bișoc [Thu, 16 Feb 2023 19:16:53 +0000 (20:16 +0100)]
[NTOS:CM] Implement the shared lock macro for use

CmpAcquireKcbLockSharedByKey can come in handy for use to lock KCBs by their convkey with a shared lock, specifically we would need this for cache lookup stuff.

2 days ago[NTOS:CM] Implement COMPUTE_HASH_CHAR macro definition
George Bișoc [Mon, 28 Aug 2023 17:37:00 +0000 (19:37 +0200)]
[NTOS:CM] Implement COMPUTE_HASH_CHAR macro definition

Wrap the hash computation formula in a macro so that we don't have to copy
the logic over the places again and again.

2 days ago[NTOS:CM] Add surrounding parentheses to GET_HASH_INDEX definition
George Bișoc [Wed, 1 Mar 2023 18:38:32 +0000 (19:38 +0100)]
[NTOS:CM] Add surrounding parentheses to GET_HASH_INDEX definition

2 days ago[WINSPOOL] Add a number of missing NULL checks.
Timo Kreuzer [Sat, 30 Sep 2023 16:17:33 +0000 (19:17 +0300)]
[WINSPOOL] Add a number of missing NULL checks.

2 days ago[WINSPOOL] Properly copy the DEVMODE in IntFixUpDevModeNames
Timo Kreuzer [Tue, 19 Sep 2023 13:33:35 +0000 (16:33 +0300)]
[WINSPOOL] Properly copy the DEVMODE in IntFixUpDevModeNames

Otherwise the size isn't set up correctly, leading to a crash.
Fixes crash in comdl32_winetest printdlg.

3 days ago[NTOS:MM] Fix missing \n in unimplemented codepath DPRINT
Joachim Henze [Sat, 30 Sep 2023 17:06:30 +0000 (19:06 +0200)]
[NTOS:MM] Fix missing \n in unimplemented codepath DPRINT

We can hit that unimplemented code-path-line in NtQuerySection()
when browsing youtube.com with Chromium 49.

5 days ago[MSPAINT] Larger/smaller Rubber/AirBrush on Ctrl+Plus/Minus (#5740)
Katayama Hirofumi MZ [Thu, 28 Sep 2023 12:54:32 +0000 (21:54 +0900)]
[MSPAINT] Larger/smaller Rubber/AirBrush on Ctrl+Plus/Minus (#5740)

- Enable changing rubber/airbrush thickness by Ctrl+Plus / Ctrl+Minus
  key combination in TOOL_AIRBRUSH and TOOL_RUBBER.
CORE-19094

5 days ago[MSPAINT] Larger/smaller brush nib on Ctrl+Plus/Minus (#5739)
Katayama Hirofumi MZ [Thu, 28 Sep 2023 12:30:34 +0000 (21:30 +0900)]
[MSPAINT] Larger/smaller brush nib on Ctrl+Plus/Minus (#5739)

- Introduce the concept of "brush width" to the
  tools model.
- Enable changing the brush width by Ctrl+Plus/Minus
  key combination in TOOL_BRUSH.
- Re-define brush styles.
CORE-19094

5 days ago[NTOS:CM] Simplify CmpDelayAllocBucketLock code a bit (#5729)
Serge Gautherie [Thu, 28 Sep 2023 09:39:13 +0000 (11:39 +0200)]
[NTOS:CM] Simplify CmpDelayAllocBucketLock code a bit (#5729)

- Remove duplicate CmpDelayAllocBucketLock definition.
- Remove an else.

5 days ago[MSPAINT] Larger/smaller pen nib on Ctrl+Plus/Minus (#5738)
Katayama Hirofumi MZ [Thu, 28 Sep 2023 07:32:36 +0000 (16:32 +0900)]
[MSPAINT] Larger/smaller pen nib on Ctrl+Plus/Minus (#5738)

- Introduce the concept of pen width (not line width) to the tools model.
- Enable changing pen/line width by Ctrl+Plus/Minus key combination in TOOL_PEN,
  TOOL_LINE, TOOL_BEZIER, TOOL_RECT, TOOL_SHAPE, TOO_ELLIPSE, and
  TOOL_RRECT tools.
CORE-19094

6 days ago[MSPAINT] "Selection Clone" and "Selection Brush" (#5734)
Katayama Hirofumi MZ [Wed, 27 Sep 2023 22:34:25 +0000 (07:34 +0900)]
[MSPAINT] "Selection Clone" and "Selection Brush" (#5734)

- Stamp the image of the selection when the user clicks on
  the selection while holding down the Ctrl key.
- Draw the image of the selection continuously when the user
  starts dragging the selection while holding down the Shift key.
CORE-19094

6 days ago[NTOS/Mm] Fix SWAPENTRY bit-check in MmCreatePageFileMapping
Timo Kreuzer [Wed, 4 Jan 2023 21:17:57 +0000 (23:17 +0200)]
[NTOS/Mm] Fix SWAPENTRY bit-check in MmCreatePageFileMapping

Test for the highest bit, not for bit 3 / 7.

6 days ago[SHELL32] *.rc: AGAIN! Use 1996 as birth year in IDD_ABOUT for consistency
Joachim Henze [Wed, 27 Sep 2023 20:23:31 +0000 (22:23 +0200)]
[SHELL32] *.rc: AGAIN! Use 1996 as birth year in IDD_ABOUT for consistency

We do use the birth year 1996 instead of 1998
within our msgina pictures already,
and also within the [SDK] for autogenerated file-info.

Since SHELL32 IDD_ABOUT is used by many applications it makes sense to harmonize with that.

Was done already during 0.4.15-dev for SHELL32, but we have to do it again,
since some recent translation PRs to match the en-US.rc again.

6 days ago[MAZESCR] Avoid (DLGPROC) cast, fix a typo (#5694)
Joachim Henze [Wed, 27 Sep 2023 17:37:44 +0000 (19:37 +0200)]
[MAZESCR] Avoid (DLGPROC) cast, fix a typo (#5694)

May help a bit with x64.

Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 days ago[CMICONTROL] Fix MSVC 14.2 dbg x64 warning C4267 (#5696)
Joachim Henze [Wed, 27 Sep 2023 17:34:32 +0000 (19:34 +0200)]
[CMICONTROL] Fix MSVC 14.2 dbg x64 warning C4267 (#5696)

Can be observed on the buildbots:
2023-09-17T14:19:34.2051345Z [10663/14808] Building CXX object drivers\wdm\audio\drivers\CMIDriver\cmicontrol\CMakeFiles\cmicontrol.dir\main.cpp.obj
2023-09-17T14:19:34.2052611Z D:\a\reactos\reactos\src\drivers\wdm\audio\drivers\CMIDriver\cmicontrol\main.cpp(818): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data

6 days ago[NTOS:MM] Fix 'eanbled' typo in a comment (#5728)
Serge Gautherie [Wed, 27 Sep 2023 17:31:42 +0000 (19:31 +0200)]
[NTOS:MM] Fix 'eanbled' typo in a comment (#5728)

7 days ago[NTOS] Implement support for opting out of NX policy
Timo Kreuzer [Sun, 1 Jan 2023 17:11:26 +0000 (18:11 +0100)]
[NTOS] Implement support for opting out of NX policy

Fixes crash in ntdll_winetest info on x64.

7 days ago[CRT/x64] Fix a bug in __C_specific_handler
Timo Kreuzer [Sat, 14 Mar 2020 22:28:47 +0000 (23:28 +0100)]
[CRT/x64] Fix a bug in __C_specific_handler

Fixes crash of compiler_apitest pseh

7 days ago[LSASRV] Fix usage of self-relative security descriptor in LsarQuerySecurityObject
Timo Kreuzer [Sat, 23 Sep 2023 14:43:14 +0000 (17:43 +0300)]
[LSASRV] Fix usage of self-relative security descriptor in LsarQuerySecurityObject

7 days ago[SAMSRV] Fix usage of self-relative security descriptor in SamrQuerySecurityObject
Timo Kreuzer [Wed, 20 Sep 2023 08:48:49 +0000 (11:48 +0300)]
[SAMSRV] Fix usage of self-relative security descriptor in SamrQuerySecurityObject

Fixes crash of netapi32_winetest access

7 days ago[RTL] Improve usage of absolte vs self-relative security descriptors
Timo Kreuzer [Sat, 23 Sep 2023 14:49:27 +0000 (17:49 +0300)]
[RTL] Improve usage of absolte vs self-relative security descriptors

- RtlpQuerySecurityDescriptor: Change argument type of first parameter from PISECURITY_DESCRIPTOR to PSECURITY_DESCRIPTOR, since it handles both absolute and self-relative SDs.
- RtlMakeSelfRelativeSD: rename first parameter from AbsoluteSD to SecurityDescriptor, since it handles both absolute and self-relative SDs.
- SepGetGroupFromDescriptor/SepGetOwnerFromDescriptor/SepGetDaclFromDescriptor/SepGetSaclFromDescriptor: Change parameter type from PVOID to PSECURITY_DESCRIPTOR for clarity.

7 days ago[MSPAINT] Restrict drawing direction on Shift key (#5726)
Katayama Hirofumi MZ [Tue, 26 Sep 2023 13:47:23 +0000 (22:47 +0900)]
[MSPAINT] Restrict drawing direction on Shift key (#5726)

- While holding down the Shift key, drawing lines with the
  pen/brush is limited to either of 8 directions (horizontal/vertical/diagonal).
- s/abs/labs/
CORE-19094

8 days ago[SHELL32][SDK] Implement SHTestTokenPrivilegeW (#5725)
Katayama Hirofumi MZ [Mon, 25 Sep 2023 22:36:07 +0000 (07:36 +0900)]
[SHELL32][SDK] Implement SHTestTokenPrivilegeW (#5725)

and modify shell32.spec.

9 days ago[SHELL32] Fix for shlexec.cpp regressions (#5282)
Doug Lyons [Sun, 24 Sep 2023 20:35:28 +0000 (15:35 -0500)]
[SHELL32] Fix for shlexec.cpp regressions (#5282)

fixes CORE-18967 'Taskbar toolbar - Right click > Open folder fails'
by restoring the code-path we removed with the guilty
0.4.15-dev-3847-g /9b716539182864bc077e362febcda74da50287ed

and add test_sei_lpIDList to shell32:ShellExecuteEx apitest test to protect
that functionality on future attempts to simplify.

10 days ago[SHELL32][SDK] Implement SHInvokePrivilegedFunctionW (#5718)
Katayama Hirofumi MZ [Sat, 23 Sep 2023 22:11:38 +0000 (07:11 +0900)]
[SHELL32][SDK] Implement SHInvokePrivilegedFunctionW (#5718)

Add it to <undocshell.h>. Modify shell32.spec.

10 days ago[NTOS:CM] Fix lock leak
Timo Kreuzer [Wed, 20 Sep 2023 20:21:10 +0000 (23:21 +0300)]
[NTOS:CM] Fix lock leak

Triggered by low available pool memory during kmtest ExPools.

10 days ago[THEMES] Optimize png for Lautus style (#5712) 5712/head
Andrew Dent [Wed, 20 Sep 2023 21:56:06 +0000 (22:56 +0100)]
[THEMES] Optimize png for Lautus style (#5712)

Lossless optimization of new png Start button in Lautus style, original by @Splitwirez (ed134bf2, #5540).
Slimmed 464 bytes, ~20% saving. This png is encoded as a grayscale+alpha, so should be tested.

10 days ago[RPCRT4] Fix x64 assembly code
Timo Kreuzer [Sun, 10 Sep 2023 11:35:20 +0000 (14:35 +0300)]
[RPCRT4] Fix x64 assembly code

movaps is a 128 bit aligned move, we need a 64 bit unaligned move, so use movsd.
Fixes a crash in oleaut32_winetest tmarshal.
Also add a comment about the use of movd instead of movq.

11 days ago[MSPAINT] Introduce Ctrl+Plus / Ctrl+Minus (#5717)
Katayama Hirofumi MZ [Sat, 23 Sep 2023 00:26:11 +0000 (09:26 +0900)]
[MSPAINT] Introduce Ctrl+Plus / Ctrl+Minus (#5717)

- Add Ctrl+Plus and Ctrl+Minus accelerators.
- Add IDM_CTRL_PLUS and IDM_CTRL_MINUS
  commands.
- Stretch the selection area on IDM_CTRL_PLUS
  and IDM_CTRL_MINUS actions.
CORE-19094

11 days ago[MSPAINT] Don't show error message twice (#5715)
Katayama Hirofumi MZ [Fri, 22 Sep 2023 01:48:13 +0000 (10:48 +0900)]
[MSPAINT] Don't show error message twice (#5715)

- Reduce display of error message on IDM_EDITCOPYTO and IDM_EDITPASTEFROM.
- Introduce LockBitmap/UnlockBitmap mechanism for ImageModel and SelectionModel.
CORE-19181, CORE-19182

12 days ago[MSPAINT] Don't copy bits on resizing (#5716)
Katayama Hirofumi MZ [Thu, 21 Sep 2023 22:35:03 +0000 (07:35 +0900)]
[MSPAINT] Don't copy bits on resizing (#5716)

- Fix the graphical glitches on resizing and moving toolbars.
- Add SWP_NOCOPYBITS flag on positioning controls on resizing of main window.
CORE-19137

12 days ago[WIN32K] Prevent dereferencing NULL pointer
Timo Kreuzer [Fri, 18 Aug 2023 05:35:59 +0000 (08:35 +0300)]
[WIN32K] Prevent dereferencing NULL pointer

Initialize a window's ThreadListEntry as an empty list on creation and only remove the window from the list on destruction, when the entry is not an empty list. Previously the window creation could fail before the list entry was initialized and the window would get destroyed after that, resulting in a NULL pointer dereference.

12 days ago[KERNEL32] Fix RaiseException to correctly copy the passed in parameters as ULONG_PTR
Timo Kreuzer [Mon, 18 Sep 2023 23:56:07 +0000 (02:56 +0300)]
[KERNEL32] Fix RaiseException to correctly copy the passed in parameters as ULONG_PTR

Fixes C++ exception handling on x64.

12 days ago[SHELL32][SDK] Implement SHOpenEffectiveToken and SHGetUserSessionId (#5713)
Katayama Hirofumi MZ [Thu, 21 Sep 2023 13:44:20 +0000 (22:44 +0900)]
[SHELL32][SDK] Implement SHOpenEffectiveToken and SHGetUserSessionId (#5713)

- Implement SHOpenEffectiveToken and
  SHGetUserSessionId functions.
- Add them to <undocshell.h>.

12 days ago[NTOS:EX] Initialize ExpResourceTimeoutCount also via the "Session Manager/ResourceTi...
Hermès Bélusca-Maïto [Sun, 7 Nov 2021 00:17:32 +0000 (01:17 +0100)]
[NTOS:EX] Initialize ExpResourceTimeoutCount also via the "Session Manager/ResourceTimeoutCount" registry value (#4089)

For more details, see
http://systemmanager.ru/win2k_regestry.en/29859.htm
https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/102985#ResourceTimeoutCount_REG_DWORD

12 days ago[RTL] Satisfy the RtlpTimeoutDisable condition when waiting for critical sections...
Hermès Bélusca-Maïto [Sat, 6 Nov 2021 18:40:40 +0000 (19:40 +0100)]
[RTL] Satisfy the RtlpTimeoutDisable condition when waiting for critical sections (#4089)

12 days ago[NTDLL][RTL] Move RtlpTimeoutDisable definition to the RTL (#4089)
Hermès Bélusca-Maïto [Sat, 6 Nov 2021 17:12:53 +0000 (18:12 +0100)]
[NTDLL][RTL] Move RtlpTimeoutDisable definition to the RTL (#4089)

12 days ago[NTDLL:LDR] Fix process LoadConfig CS timeout conversion from ms to 100ns units ...
Hermès Bélusca-Maïto [Sat, 6 Nov 2021 17:43:35 +0000 (18:43 +0100)]
[NTDLL:LDR] Fix process LoadConfig CS timeout conversion from ms to 100ns units (#4089)

For more details, see
https://forums.codeguru.com/showthread.php?370731-EnterCriticalSection-locking&p=1302399#post1302399

12 days ago[NTOS:EX] Minor header formatting.
Hermès Bélusca-Maïto [Sun, 7 Nov 2021 03:21:40 +0000 (04:21 +0100)]
[NTOS:EX] Minor header formatting.

12 days ago[NTDLL][RTL] Fix english typo in (internal) function name.
Hermès Bélusca-Maïto [Sat, 6 Nov 2021 17:52:27 +0000 (18:52 +0100)]
[NTDLL][RTL] Fix english typo in (internal) function name.

12 days ago[DXGTHK] Export DriverEntry (#5607)
Oleg Dubinskiy [Thu, 21 Sep 2023 11:25:21 +0000 (13:25 +0200)]
[DXGTHK] Export DriverEntry (#5607)

Export driver entry point function DriverEntry from our dxgthk.sys,
following Windows behaviur. It is exported on XP SP3 and Server 2003.

12 days ago[SHELL32] SHChangeRegistrationReceive just returns FALSE
Katayama Hirofumi MZ [Thu, 21 Sep 2023 03:09:28 +0000 (12:09 +0900)]
[SHELL32] SHChangeRegistrationReceive just returns FALSE

13 days ago[SHELL32][SDK] Implement SHGetShellStyleHInstance (#5707)
Katayama Hirofumi MZ [Thu, 21 Sep 2023 00:22:33 +0000 (09:22 +0900)]
[SHELL32][SDK] Implement SHGetShellStyleHInstance (#5707)

Co-authored-by: Oleg Dubinskiy <oleg.dubinskij30@gmail.com>
This PR supersedes PR #3851.
- Implement SHGetShellStyleHInstance function.
- Add SHGetShellStyleHInstance prototype to <shlobj.h>.
CORE-17707

13 days ago[SHELL32][SHELL32_APITEST][SDK] Implement Int64ToString (#5706)
Katayama Hirofumi MZ [Thu, 21 Sep 2023 00:14:40 +0000 (09:14 +0900)]
[SHELL32][SHELL32_APITEST][SDK] Implement Int64ToString (#5706)

- Implement Int64ToString and LargeIntegerToString functions.
- Add Int64ToString and LargeIntegerToString prototypes to <shellundoc.h>.
- Add Int64ToString testcase.
- I found a bug in GetNumberFormat.LeadingZero.

http://undoc.airesoft.co.uk/shell32.dll/Int64ToString.php
http://undoc.airesoft.co.uk/shell32.dll/LargeIntegerToString.php

13 days ago[BOOTDATA] Add TEMP folder to livecd image (#5683)
Julio Carchi [Wed, 20 Sep 2023 18:57:04 +0000 (13:57 -0500)]
[BOOTDATA] Add TEMP folder to livecd image (#5683)

Create the folder TEMP in X:\reactos so now we can match current livecd
environment variables TMP and TEMP
can be seen as a part of solving CORE-13041

The use-case for that is:
copying the livecd folder structure directly to writable media as USB sticks or memory cards,
will work then out-of-the-box without any other change.

13 days ago[SDK:RTL] RtlpCallQueryRegistryRoutine(): Correctly set SpareData and SpareLength...
Jose Carlos Jesus [Wed, 20 Sep 2023 16:06:06 +0000 (12:06 -0400)]
[SDK:RTL] RtlpCallQueryRegistryRoutine(): Correctly set SpareData and SpareLength (#5466)

SpareData and SpareLength need to be calculated correctly, as they are used
later in that function as well.
This allows to not overwrite Source UString when writing to Destination UString.

Fixes the problem described in the following JIRA issue, where services could
not start when installing ReactOS in a very-long-named directory.

CORE-18988

13 days ago[ATL][ATL_APITEST] Independent ReactOS ATL (RATL) support (#5657)
Katayama Hirofumi MZ [Wed, 20 Sep 2023 03:02:33 +0000 (12:02 +0900)]
[ATL][ATL_APITEST] Independent ReactOS ATL (RATL) support (#5657)

This is an attempt to make ReactOS ATL (RATL) independent.
https://github.com/katahiromz/RATL
CORE-19153

2 weeks ago[DDK] wsk header: Add WSKAPI to exported functions. (#5687)
Johannes Thoma [Tue, 19 Sep 2023 15:28:19 +0000 (17:28 +0200)]
[DDK] wsk header: Add WSKAPI to exported functions. (#5687)

Names need decoration (stdcall) in order to be linked.

When using the wsk.h header functions exported therein should
be WSKAPI (which enforces the stdcall calling convention). Linking
would later fail because stdcall functions are named differently in
the object code.

2 weeks ago[ATL] CImage: Follow-up to #5702 (5da3ed6)
Katayama Hirofumi MZ [Tue, 19 Sep 2023 15:04:45 +0000 (00:04 +0900)]
[ATL] CImage: Follow-up to #5702 (5da3ed6)

Fix the return value of CImage::Detach. CORE-19008

2 weeks ago[ATL] Fix CImage members (#5702)
Katayama Hirofumi MZ [Tue, 19 Sep 2023 13:19:03 +0000 (22:19 +0900)]
[ATL] Fix CImage members (#5702)

- Delete m_ds and m_bm members from CImage.
- Add m_nWidth, m_nHeight, m_nPitch, m_nBPP,
  and m_pBits members.
CORE-19008

2 weeks ago[COMDLG32] Implement CDM_SETDEFEXT (#5704)
Katayama Hirofumi MZ [Tue, 19 Sep 2023 13:17:48 +0000 (22:17 +0900)]
[COMDLG32] Implement CDM_SETDEFEXT (#5704)

- CDM_SETDEFEXT message handling was a
  missing feature of COMDLG32.
- Make info->defext dynamic allocation.
- On CDM_SETDEFEXT handling, replace
  info->defext data.
CORE-15020

2 weeks ago[ATL] Default value of dwInitParam is zero instead of NULL (#5703)
Katayama Hirofumi MZ [Tue, 19 Sep 2023 08:28:33 +0000 (17:28 +0900)]
[ATL] Default value of dwInitParam is zero instead of NULL (#5703)

Fix warnings when dwInitParam was omitted at CDialogImpl::Create and/or CDialogImpl::DoModal.

2 weeks ago[SHLWAPI][SHLWAPI_APITEST] Fix SHGetPerScreenResName (#5701)
Katayama Hirofumi MZ [Tue, 19 Sep 2023 02:02:59 +0000 (11:02 +0900)]
[SHLWAPI][SHLWAPI_APITEST] Fix SHGetPerScreenResName (#5701)

Use HORZRES and VERTRES instead of SM_CXFULLSCREEN and SM_CYFULLSCREEN.
CORE-9283

2 weeks ago[ATL_APITEST] atlconv: Disable corner case test of CWAEX
Katayama Hirofumi MZ [Tue, 19 Sep 2023 01:45:46 +0000 (10:45 +0900)]
[ATL_APITEST] atlconv: Disable corner case test of CWAEX

2 weeks ago[WINESYNC][SDK][DWMAPI] Import DWMAPI from WINE 8-14 (#5594)
Justin Miller [Mon, 18 Sep 2023 14:30:44 +0000 (07:30 -0700)]
[WINESYNC][SDK][DWMAPI] Import DWMAPI from WINE 8-14 (#5594)

2 weeks ago[KBDLAYOUT] Avoid (DLGPROC) cast (#5698)
Joachim Henze [Mon, 18 Sep 2023 11:48:33 +0000 (13:48 +0200)]
[KBDLAYOUT] Avoid (DLGPROC) cast (#5698)

- Avoid DLGPROC-cast
- Bring header-section closer to our coding guidelines
- Strip inconsistent empty-lines
- Strip useless return at the end of void func

Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
2 weeks ago[SHDOCVW][SHDOCVW_APITEST] Implement MRU List for Shell Bag, Part 6 (#5699)
Katayama Hirofumi MZ [Mon, 18 Sep 2023 11:13:29 +0000 (20:13 +0900)]
[SHDOCVW][SHDOCVW_APITEST] Implement MRU List for Shell Bag, Part 6 (#5699)

Follow-up to #5691. Strengthen shdocvw_apitest
testcase. Fix CLSID_MruPidlList class.
CORE-9283

2 weeks ago[IMAGELISTVIEWER] Avoid (DLGPROC) cast (#5697)
Joachim Henze [Mon, 18 Sep 2023 10:22:59 +0000 (12:22 +0200)]
[IMAGELISTVIEWER] Avoid (DLGPROC) cast (#5697)

2 weeks ago[TEMPLATES] Avoid (DLGPROC) casts
Joachim Henze [Sun, 17 Sep 2023 18:50:04 +0000 (20:50 +0200)]
[TEMPLATES] Avoid (DLGPROC) casts

The type-system is supposed to be our friend, not our enemy.
I pushed this without PR, because the buildbots don't
build the templates by default. That requires
configure -DENABLE_ROSAPPS=1 -DENABLE_ROSAPPS_TEMPLATES=1
So no gain in running them. Greta Thunberg will appreciate the saved CPU-cycles to fight global warming.

I verified it locally to compile without warnings on GCC8.4.0dbg x86
and it follows the same pattern as
0.4.15-dev-6626-g 806da4421c13becf47735ad33f18dafd542497df
which passed all the bots successfully. Also the x64 ones.

2 weeks ago[CMICONTROL] Avoid (DLGPROC) cast (#5693)
Joachim Henze [Sun, 17 Sep 2023 17:47:23 +0000 (19:47 +0200)]
[CMICONTROL] Avoid (DLGPROC) cast (#5693)

Yes, might slightly improve with x64,
but that wasn't even my main motivation.
(DLGPROC)-casts are nonsense even for x86 actually.

2 weeks ago[SHDOCVW] Implement MRU List for Shell Bag, Part 5 (#5691)
Katayama Hirofumi MZ [Sun, 17 Sep 2023 10:52:50 +0000 (19:52 +0900)]
[SHDOCVW] Implement MRU List for Shell Bag, Part 5 (#5691)

Follow-up to #5686.
Implement CSafeMutex and CMruPidlList classes.
CORE-9283

2 weeks ago[WIN32K] Do not try to free a unicode string that is an int-resource
Timo Kreuzer [Sat, 9 Sep 2023 07:41:27 +0000 (10:41 +0300)]
[WIN32K] Do not try to free a unicode string that is an int-resource

2 weeks ago[NTOSKRNL/x64] Fix a bug in KeSwitchKernelStack
Timo Kreuzer [Tue, 15 Aug 2023 19:51:05 +0000 (22:51 +0300)]
[NTOSKRNL/x64] Fix a bug in KeSwitchKernelStack

Don't safe anything in the callee's home space, because the callee can overwrite it. Use the functions home space instead.

2 weeks ago[CRT] Import parameter check for fclose from wine
Timo Kreuzer [Sat, 16 Sep 2023 15:49:51 +0000 (18:49 +0300)]
[CRT] Import parameter check for fclose from wine

Fixes advpack_apitest:DelNode crash.

2 weeks ago[SHDOCVW] Implement MRU List for Shell Bag, Part 4 (#5686)
Katayama Hirofumi MZ [Thu, 14 Sep 2023 22:50:20 +0000 (07:50 +0900)]
[SHDOCVW] Implement MRU List for Shell Bag, Part 4 (#5686)

Follow-up to #5646. Implement CMruNode class. CORE-9283

2 weeks ago[KERNEL32][KERNEL32_APITEST] Implement user-mode UEFI / Firmware API (#5149)
Ratin Gao [Thu, 14 Sep 2023 19:14:07 +0000 (03:14 +0800)]
[KERNEL32][KERNEL32_APITEST] Implement user-mode UEFI / Firmware API (#5149)

- Implement firmware environment variable read/write APIs
- Add, fix and improve related definitions and declarations
- Add kernel32:UEFIFirmware apitest

CORE-11954

2 weeks agoRevert "[DDRAW] Sync the fix for swap_interval from Wine (#4831)" (#5690)
Justin Miller [Thu, 14 Sep 2023 12:16:42 +0000 (05:16 -0700)]
Revert "[DDRAW] Sync the fix for swap_interval from Wine (#4831)" (#5690)

This reverts commit 67559215608eaf7338cbc7002ba3b74bf972a3a4.

2 weeks ago[SHELL32] Check m_ListView on some methods (#5684)
Katayama Hirofumi MZ [Wed, 13 Sep 2023 13:41:00 +0000 (22:41 +0900)]
[SHELL32] Check m_ListView on some methods (#5684)

- comdlg32:filedlg could encounter an assertion error in CWindow::SendMessage.
- Assert the existence of the listview control m_ListView in the CDefView::LV_... function.
- Actually check the existence of m_ListView outside the CDefView::LV_... function.
ROSTESTS-388

3 weeks ago[NTUSER] Error of co_UserCreateWindowEx should display class name (#5682)
Katayama Hirofumi MZ [Mon, 11 Sep 2023 21:16:05 +0000 (06:16 +0900)]
[NTUSER] Error of co_UserCreateWindowEx should display class name (#5682)

The error messsage of co_UserCreateWindowEx
was unfriendly to the debugger.
Show the window class name by using "%wZ" in
co_UserCreateWindowEx.

3 weeks ago[SHDOCVW][SHDOCVW_APITEST] Implement MRU List for Shell Bag, Part 3 (#5646)
Katayama Hirofumi MZ [Mon, 11 Sep 2023 21:01:09 +0000 (06:01 +0900)]
[SHDOCVW][SHDOCVW_APITEST] Implement MRU List for Shell Bag, Part 3 (#5646)

Follow-up to #5634.
- Implement CMruBase::_UseEmptySlot.
- Implement CMruLongList and CMruShortList.
- Add CMruClassFactory class and modify
  DllGetClassObject function by using it.
- Add shdocvw_apitest.exe.
CORE-9283

3 weeks ago[NTGDI] GetPixel's return top byte is zero if valid (#5677)
Katayama Hirofumi MZ [Mon, 11 Sep 2023 20:56:36 +0000 (05:56 +0900)]
[NTGDI] GetPixel's return top byte is zero if valid (#5677)

According to the results of CImage testcase,
the top byte of the GetPixel() return value is
zero if the return is a valid color.
Do bitwise-AND operation if the color value is valid.
CORE-19008

3 weeks ago[MSPAINT][SDK] Add <ui/CWaitCursor.h> (#5680)
Katayama Hirofumi MZ [Mon, 11 Sep 2023 20:39:08 +0000 (05:39 +0900)]
[MSPAINT][SDK] Add <ui/CWaitCursor.h> (#5680)

CORE-19094

3 weeks ago[USER32] Pure Whitespace sync from comctl32/combo.c, no functional change
Joachim Henze [Sun, 10 Sep 2023 21:36:21 +0000 (23:36 +0200)]
[USER32] Pure Whitespace sync from comctl32/combo.c, no functional change

This will make future syncs between those files much easier,
and fixes tons of mixed tab-space-indentation.

Please no whitespace nitpicks when reviewing this commit, it is a SYNC!