reactos.git
2 years ago[NTVDM] Retrieve the full directory of the current running NTVDM instance, to be...
Hermès Bélusca-Maïto [Sat, 27 Nov 2021 20:03:55 +0000 (21:03 +0100)]
[NTVDM] Retrieve the full directory of the current running NTVDM instance, to be used as a base path for opening other NTVDM system files.

2 years ago[NTVDM] disk.c: Simplify some code; unmount only present disks during cleanup (avoids...
Hermès Bélusca-Maïto [Sat, 27 Nov 2021 00:36:56 +0000 (01:36 +0100)]
[NTVDM] disk.c: Simplify some code; unmount only present disks during cleanup (avoids useless debug-print errors).

2 years ago[NTVDM] Sort out some global/emulator header info, and NDK headers inclusions.
Hermès Bélusca-Maïto [Thu, 25 Nov 2021 21:39:56 +0000 (22:39 +0100)]
[NTVDM] Sort out some global/emulator header info, and NDK headers inclusions.

2 years ago[NTVDM] Silence noisy DPRINTs when starting processes; they can be re-enabled by...
Hermès Bélusca-Maïto [Thu, 25 Nov 2021 20:12:48 +0000 (21:12 +0100)]
[NTVDM] Silence noisy DPRINTs when starting processes; they can be re-enabled by recompiling in "advanced debugging" mode.

2 years ago[NTVDM] In non-STANDALONE builds, check whether we are started as a VDM and bail...
Hermès Bélusca-Maïto [Sat, 27 Nov 2021 00:06:21 +0000 (01:06 +0100)]
[NTVDM] In non-STANDALONE builds, check whether we are started as a VDM and bail out if not.

2 years ago[KERNEL32] Don't hardcode some types in sizeofs, and some flag values.
Hermès Bélusca-Maïto [Sat, 27 Nov 2021 00:19:46 +0000 (01:19 +0100)]
[KERNEL32] Don't hardcode some types in sizeofs, and some flag values.

2 years ago[User32|API_TEST] Add Get Window Ptr Test
James Tabor [Sat, 27 Nov 2021 20:47:11 +0000 (14:47 -0600)]
[User32|API_TEST] Add Get Window Ptr Test

Adding test to verify results from a foreign window process.
See CORE-17856.

2 years ago[User32] Add Back Break with Error Message
James Tabor [Sat, 27 Nov 2021 17:35:42 +0000 (11:35 -0600)]
[User32] Add Back Break with Error Message

Add back missing break. See CORE-17856.

2 years ago[FREELDR] Fix release builds for PC-98 and Xbox platforms
Stanislav Motylkov [Sat, 27 Nov 2021 15:00:06 +0000 (18:00 +0300)]
[FREELDR] Fix release builds for PC-98 and Xbox platforms

Fix error C4013: 'DebugDisableScreenPort' undefined; assuming extern returning int

Addendum to 98c17d31. CORE-16216

2 years ago[NTVDM] Use strsafe functions for concantenation of strings in otvdm code. (#4124)
Doug Lyons [Thu, 25 Nov 2021 20:06:05 +0000 (14:06 -0600)]
[NTVDM] Use strsafe functions for concantenation of strings in otvdm code. (#4124)

2 years ago[NTOS:LPC] NtReplyWaitReceivePortEx returns the correct TotalLength for connect messages
Eric Kohl [Wed, 24 Nov 2021 17:58:51 +0000 (18:58 +0100)]
[NTOS:LPC] NtReplyWaitReceivePortEx returns the correct TotalLength for connect messages

This fixes the NtAcceptConnectPort apitest.

2 years ago[User32] Fix Copy Paste
James Tabor [Wed, 24 Nov 2021 15:36:50 +0000 (09:36 -0600)]
[User32] Fix Copy Paste

Pointed out by otya. See CORE-17856.

2 years ago[NTOS:IO] Fail, if io completion port and an apc routine are used at the same time
Eric Kohl [Wed, 24 Nov 2021 12:34:26 +0000 (13:34 +0100)]
[NTOS:IO] Fail, if io completion port and an apc routine are used at the same time

Add checks to NtNotifyChangeDirectoryFile, NtLockFile, NtReadFile and NtWriteFile.
This fixes two ntdll tests.

2 years ago[SYSSETUP][USETUP] [NLS] Update pt-PT translation (#4120)
Jose Carlos Jesus [Wed, 24 Nov 2021 00:57:11 +0000 (00:57 +0000)]
[SYSSETUP][USETUP] [NLS] Update pt-PT translation (#4120)

- NLS: Change weekdays name to capital letter.
- USETUP: Fix typos to pt-PT translation.

- SYSSETUP: Update pt-PT translation.
  + Sync IDS_USER_ADMINISTRATOR_NAME and IDS_ADMINISTRATOR_NAME (in samsrv).

2 years ago[NTVDM] Add otya128's WineVDM integration code into ReactOS (#4113)
Doug Lyons [Tue, 23 Nov 2021 22:50:05 +0000 (16:50 -0600)]
[NTVDM] Add otya128's WineVDM integration code into ReactOS (#4113)

This is an interim solution until a more integrated solution with NTVDM is developed.
CORE-17852

2 years ago[WIN32SS:NTUSER] Fix window state after restoring snapped window (#4119)
Denis Malikov [Tue, 23 Nov 2021 22:34:03 +0000 (05:34 +0700)]
[WIN32SS:NTUSER] Fix window state after restoring snapped window (#4119)

InternalPos.NormalRect is a key data for detecting whether a window was snapped.
Keeping it after restore affecting next snap actions.

CORE-16477

2 years ago[NTVDM] Log the command line used when starting NTVDM.
Hermès Bélusca-Maïto [Mon, 22 Nov 2021 02:08:30 +0000 (03:08 +0100)]
[NTVDM] Log the command line used when starting NTVDM.

2 years ago[WIN32K] Fix 'use after free' in NtGdiStretchDIBitsInternal (#4122)
Doug Lyons [Mon, 22 Nov 2021 01:57:36 +0000 (19:57 -0600)]
[WIN32K] Fix 'use after free' in NtGdiStretchDIBitsInternal (#4122)

CORE-17861

2 years ago[SMSS] Use NULL for NULL pointers.
Hermès Bélusca-Maïto [Sun, 21 Nov 2021 23:15:53 +0000 (00:15 +0100)]
[SMSS] Use NULL for NULL pointers.

2 years ago[CSRSRV] Update the status.h file with updated information.
Hermès Bélusca-Maïto [Sun, 21 Nov 2021 23:07:48 +0000 (00:07 +0100)]
[CSRSRV] Update the status.h file with updated information.

2 years ago[NTDLL:CSR][CSRSRV] Start to deprecate CSR functions removed on Windows 2003.
Hermès Bélusca-Maïto [Sun, 21 Nov 2021 22:46:11 +0000 (23:46 +0100)]
[NTDLL:CSR][CSRSRV] Start to deprecate CSR functions removed on Windows 2003.

The server-side CsrSrvIdentifyAlertableThread and CsrSrvSetPriorityClass
functions are completely removed in Win2k3+, and are since stubbed by
CsrSrvUnusedFunction instead. They however were present up to Windows XP,
albeit with an extremely minimal implementation.

The corresponding client-side CsrIdentifyAlertableThread and CsrSetPriorityClass
now become just stubs that either trivially succeed or fail, respectively.

See https://www.geoffchappell.com/studies/windows/win32/csrsrv/api/srvinit/apidispatch.htm
for more information.

- Fix typo "al*T*ertable" --> "alertable".
- Remove ROS-specific CSRSS_IDENTIFY_ALERTABLE_THREAD that was
  deprecated since ages (at least before 2005)!

2 years ago[NTDLL_APITEST] Test that NtQueryInformationProcess(ProcessWx86Information) can work...
Hermès Bélusca-Maïto [Sat, 20 Nov 2021 00:48:09 +0000 (01:48 +0100)]
[NTDLL_APITEST] Test that NtQueryInformationProcess(ProcessWx86Information) can work without a ReturnLength pointer.

2 years ago[NTOS:SE] Don't assert on levels that don't allow impersonation.
Thomas Faber [Sun, 21 Nov 2021 22:18:25 +0000 (17:18 -0500)]
[NTOS:SE] Don't assert on levels that don't allow impersonation.

2 years ago[NTOS:EX] Fix version specific return value for NtSetSystemInformation:SystemFlagsInf...
Eric Kohl [Sun, 21 Nov 2021 20:41:31 +0000 (21:41 +0100)]
[NTOS:EX] Fix version specific return value for NtSetSystemInformation:SystemFlagsInformation

2 years ago[RICHED20] select_style(): Check font_cache too
Serge Gautherie [Fri, 5 Nov 2021 17:24:21 +0000 (18:24 +0100)]
[RICHED20] select_style(): Check font_cache too

Already upstreamed as wine-6.21-347-g177f808.

CORE-17843

2 years ago[NTOS:SE] Fix always-true assert in SeTokenCanImpersonate.
Thomas Faber [Sun, 21 Nov 2021 14:34:07 +0000 (09:34 -0500)]
[NTOS:SE] Fix always-true assert in SeTokenCanImpersonate.

Courtesy of VS analysis warning C6289:
Incorrect operator:  mutual exclusion over || is always a non-zero constant.  Did you intend to use && instead?

2 years ago[REACTOS] Fix traces with missing arguments.
Thomas Faber [Sun, 21 Nov 2021 17:37:04 +0000 (12:37 -0500)]
[REACTOS] Fix traces with missing arguments.

Courtesy of VS Code Analysis warning C6064:
Missing integer argument to 'DbgPrint' that corresponds to conversion specifier 'N'.

2 years ago[NTOS] Fix broken SAL annotations on MmDereferenceSegmentWithLock.
Thomas Faber [Sun, 31 Oct 2021 21:02:38 +0000 (17:02 -0400)]
[NTOS] Fix broken SAL annotations on MmDereferenceSegmentWithLock.

2 years ago[NTOS:IO] Use a guarded region in IopQueueIrpToThread. 4106/head
Thomas Faber [Thu, 28 Oct 2021 14:59:20 +0000 (10:59 -0400)]
[NTOS:IO] Use a guarded region in IopQueueIrpToThread.

We're protecting against IopCompleteRequest, which is a special
kernel APC. So this is a little bit faster than raising the IRQL.

2 years ago[CONFIGURE] Add support for 'Visual Studio 2022, v17.x'
Serge Gautherie [Fri, 5 Nov 2021 17:24:21 +0000 (18:24 +0100)]
[CONFIGURE] Add support for 'Visual Studio 2022, v17.x'

CORE-17733

2 years ago[USER32] GetQueueStatus() should not return 0 when passing QS_ALLINPUT flag that...
Julio Carchi [Fri, 19 Nov 2021 23:45:35 +0000 (18:45 -0500)]
[USER32] GetQueueStatus() should not return 0 when passing QS_ALLINPUT flag that includes QS_RAWINPUT (#4115)

GTK applications call GetQueueStatus(QS_ALLINPUT), where QS_ALLINPUT
specifies the QS_RAWINPUT flag as well, when these are compiled for
Windows XP+, and they expect the call to succeed on this platform.

On one side, ReactOS does not currently support this flag at all, but
since it claims to be XP/2003-compatible, applications may implicitly
expect the flag to be supported by GetQueueStatus() and the function
*NOT* failing when this flag is set.
(Later GTK apps don't care and just call GetQueueStatus(QS_ALLINPUT)
that includes QS_RAWINPUT, and therefore would fail as well on e.g.
Windows 2000...)

Otherwise, an observable effect is that some versions of libgdk-win32-2.0.0.dll
enter into an infinite loop when calling GetQueueStatus(QS_ALLINPUT),
since this call always failed on ReactOS.

On the other side, however, we should honour our winetests that handle
the presence of the QS_RAWINPUT flag and behave differently accordingly.
But since we do not support QS_RAWINPUT yet, we should keep their old
behaviour where QS_RAWINPUT is unused.

Thus, in order to accomodate both sides, we don't fail the GetQueueStatus()
call, but just set the ERROR_INVALID_FLAGS last error and continue it.

This fixes CORE-15686, CORE-17551 and probably CORE-11850.
Fixes also all user32:TrackMouseEvent tests.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2 years ago[WINSPOOL] QS_SENDMESSAGE|QS_ALLEVENTS == QS_ALLINPUT, so use the latter instead.
Hermès Bélusca-Maïto [Fri, 19 Nov 2021 20:13:26 +0000 (21:13 +0100)]
[WINSPOOL] QS_SENDMESSAGE|QS_ALLEVENTS == QS_ALLINPUT, so use the latter instead.

2 years ago[PSDK] Sort out the QS_*** definitions. Add the Win7+ QS_TOUCH and QS_POINTER.
Hermès Bélusca-Maïto [Fri, 19 Nov 2021 17:23:35 +0000 (18:23 +0100)]
[PSDK] Sort out the QS_*** definitions. Add the Win7+ QS_TOUCH and QS_POINTER.

In particular, define the compound QS_MOUSE, QS_INPUT, QS_ALLEVENTS
and QS_ALLINPUT flags based on the other elementary QS_*** flags,
instead of having magic values for these.

2 years ago[PSDK] Unduplicate QS_RAWINPUT (#4116)
Serge Gautherie [Fri, 19 Nov 2021 16:56:44 +0000 (17:56 +0100)]
[PSDK] Unduplicate QS_RAWINPUT (#4116)

Addendum to a7bf412a (r38925).

2 years ago[CODEOWNERS] Add myself as maintainer for Security Manager
George Bișoc [Fri, 19 Nov 2021 11:01:19 +0000 (12:01 +0100)]
[CODEOWNERS] Add myself as maintainer for Security Manager

From now on I'll take care of this subsystem of the kernel.

2 years ago[FREELDR] Add RegCloseKey() and use it where registry keys need to be closed.
Hermès Bélusca-Maïto [Fri, 19 Nov 2021 02:55:15 +0000 (03:55 +0100)]
[FREELDR] Add RegCloseKey() and use it where registry keys need to be closed.

Actually, RegCloseKey() is here a dummy macro that just "returns"
success. Indeed, the internal implementation of RegOpenKey() doesn't
really allocate internal structures: it just returns a "pointer" to
already existing allocated data. Therefore nothing needs to be closed/freed
later on.

2 years ago[FREELDR] Switch to RtlZeroMemory() from memset().
Hermès Bélusca-Maïto [Fri, 19 Nov 2021 01:22:00 +0000 (02:22 +0100)]
[FREELDR] Switch to RtlZeroMemory() from memset().

2 years ago[FREELDR] Don't hardcode buffer size.
Hermès Bélusca-Maïto [Fri, 19 Nov 2021 01:14:11 +0000 (02:14 +0100)]
[FREELDR] Don't hardcode buffer size.

2 years ago[FDEBUG] Switch to ZeroMemory() from memset().
Hermès Bélusca-Maïto [Fri, 19 Nov 2021 01:12:23 +0000 (02:12 +0100)]
[FDEBUG] Switch to ZeroMemory() from memset().

2 years ago[FREELDR] Diverse improvements and fixes for CORE-12802. (#3466)
Serge Gautherie [Wed, 9 Sep 2020 01:46:56 +0000 (03:46 +0200)]
[FREELDR] Diverse improvements and fixes for CORE-12802. (#3466)

- Move a few lines around.
- Switch to RtlZeroMemory() from memset().
- Make while() more explicit.

For CORE-12802:
- Add/Fix FrLdrHeapAlloc() failure handling and related.
  Especially, add/fix FrLdrHeapFree() calls.

- Add/Improve ERR() to some FrLdrHeapAlloc() failure cases.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2 years ago[CRT] stdio/file.c: Import 3 Wine one-liner fixes (#4101)
Serge Gautherie [Thu, 18 Nov 2021 22:23:12 +0000 (23:23 +0100)]
[CRT] stdio/file.c: Import 3 Wine one-liner fixes (#4101)

* [FORMATTING][CRT] stdio/file.c: Reduce diff with Wine.

* [CRT] _wfreopen(): Fix TRACE() format modifier
Import wine-1.4-rc3 f8b29a0 by Eric Pouech.

* [CRT] msvcrt_init_io(): Ignore inherited FDs with invalid handles
Import wine-6.2-32-g611742d by Paul Gofman,
except test part, which shall be WineSync separately.

* [CRT] _dup2(): Fix clearing NOINHERIT flag
Import wine-6.20-44-g1420d28 by Piotr Caban.

2 years ago[SHELL32] Control panel context menu semantic bugfix (#4078)
Scott Maday [Thu, 18 Nov 2021 21:41:53 +0000 (15:41 -0600)]
[SHELL32] Control panel context menu semantic bugfix (#4078)

2 years ago[NTOS:EX] Clarify the situation with the SystemPathInformation class. (#4065) 4065/head
Hermès Bélusca-Maïto [Sun, 24 Oct 2021 16:57:52 +0000 (18:57 +0200)]
[NTOS:EX] Clarify the situation with the SystemPathInformation class. (#4065)

Since NT 3.51, this information class is trivially implemented.
The path to the NT directory is now stored in KUSER_SHARED_DATA
as the NtSystemRoot member.
Windows Checked builds show the following message and break to
the debugger before failing the function as not implemented:

EX: SystemPathInformation now available via SharedUserData

See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/query.htm
and https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/api/ntexapi_x/kuser_shared_data/index.htm
for more information.

2 years ago[NTOS:EX] NtQuerySystemInformation: Use same parameter names as documentation. FStatu... 4064/head
Hermès Bélusca-Maïto [Sun, 24 Oct 2021 16:36:47 +0000 (18:36 +0200)]
[NTOS:EX] NtQuerySystemInformation: Use same parameter names as documentation. FStatus --> Status. (#4064)

2 years ago[NDK][NTOS:EX] Add/fix SAL annotations for Nt/ZwSetSystemInformation + last parameter...
Hermès Bélusca-Maïto [Sun, 24 Oct 2021 15:49:56 +0000 (17:49 +0200)]
[NDK][NTOS:EX] Add/fix SAL annotations for Nt/ZwSetSystemInformation + last parameter type. (#4064)

2 years ago[NDK][NTOS:EX] Minor formatting.
Hermès Bélusca-Maïto [Sun, 24 Oct 2021 15:43:47 +0000 (17:43 +0200)]
[NDK][NTOS:EX] Minor formatting.

2 years ago[BOOTDATA] Update some time zones for East Europe (#4029)
Chan Chilung [Thu, 18 Nov 2021 10:26:06 +0000 (18:26 +0800)]
[BOOTDATA] Update some time zones for East Europe (#4029)

- Remove Minsk from GMT+02:00 (is now GMT+03:00)
- Change description for all GMT+02:00 time zones
- Add Turkey time GMT+03:00

CORE-12025

2 years ago[SHELL32] Drop a shortcut of the drive (#4072)
Katayama Hirofumi MZ [Thu, 18 Nov 2021 08:11:24 +0000 (17:11 +0900)]
[SHELL32] Drop a shortcut of the drive (#4072)

- If the Right-dropped item was a drive, then get the display name of the drive and use it.
- Use FAILED_UNEXPECTEDLY instead of FAILED macro.
- Accept ::{GUID}.
CORE-17813

2 years ago[GITHUB] Applications, CPL, and rosapps modules are building for ARM now
Stanislav Motylkov [Wed, 17 Nov 2021 12:12:17 +0000 (15:12 +0300)]
[GITHUB] Applications, CPL, and rosapps modules are building for ARM now

Also add debug and release builds. Addendum to c1538a82 and 1f44552d.

CORE-17517 CORE-17604

2 years ago[HHPCOMP] Check return value when calling chdir (#4073)
Sergey Valentei [Mon, 25 Oct 2021 09:12:37 +0000 (12:12 +0300)]
[HHPCOMP] Check return value when calling chdir (#4073)

Signed-off-by: Sergey Valentei <ihsinme@gmail.com>
2 years ago[CRT] Add setjmp for the arm64 architecture (#4088)
Justin Miller [Wed, 17 Nov 2021 11:24:07 +0000 (03:24 -0800)]
[CRT] Add setjmp for the arm64 architecture (#4088)

CORE-17622 CORE-17518

2 years ago[SDK][CMAKE] config.cmake: Add ARM64 compiler options (#4050) 4050/head
Konrad Dybcio [Wed, 20 Oct 2021 10:19:27 +0000 (12:19 +0200)]
[SDK][CMAKE] config.cmake: Add ARM64 compiler options (#4050)

Add generic compiler options for ARM64.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
2 years ago[THEMES][LUNAR] Fix line endings problem
Stanislav Motylkov [Wed, 17 Nov 2021 11:12:02 +0000 (14:12 +0300)]
[THEMES][LUNAR] Fix line endings problem

2 years ago[THEMES][LUNAR] Add Russian translation (#4100)
Nikki Next [Wed, 17 Nov 2021 10:58:56 +0000 (15:58 +0500)]
[THEMES][LUNAR] Add Russian translation (#4100)

2 years ago[ISAPNP] Add support for NEC PC-98 series
Dmitry Borisov [Tue, 9 Nov 2021 17:01:14 +0000 (23:01 +0600)]
[ISAPNP] Add support for NEC PC-98 series

2 years ago[NTOS:SE] Validate the SID lengths when capturing them 4097/head
George Bișoc [Tue, 9 Nov 2021 20:34:36 +0000 (21:34 +0100)]
[NTOS:SE] Validate the SID lengths when capturing them

SIDs are variadic by nature which means their lengths can vary in a given amount of time and certain factors that allow for this happen. This also especially can lead to issues when capturing SIDs and attributes because SeCaptureSidAndAttributesArray might end up overwriting the buffer during the time it's been called.

Therefore when we're copying the SIDs, validate their lengths. In addition to that, update the documentation header accordingly and add some debug prints in code.

2 years ago[DBGHELP] Fix default search path handling. CORE-17073
Thomas Faber [Tue, 16 Nov 2021 01:11:42 +0000 (20:11 -0500)]
[DBGHELP] Fix default search path handling. CORE-17073

* Allow NULL search path in SymSetSearchPath
* Use . instead of concrete current directory
* Use _NT_ALT_SYMBOL_PATH variable
* Add some tests

2 years ago[FONTEXT] Fix font installation 3846/head
Mark Jansen [Sat, 24 Jul 2021 23:11:01 +0000 (01:11 +0200)]
[FONTEXT] Fix font installation

2 years ago[FONTEXT] Simplify HIDA usage
Mark Jansen [Sat, 24 Jul 2021 23:10:51 +0000 (01:10 +0200)]
[FONTEXT] Simplify HIDA usage

2 years ago[SHELL32] Simplify HIDA usage
Mark Jansen [Sat, 24 Jul 2021 23:10:24 +0000 (01:10 +0200)]
[SHELL32] Simplify HIDA usage

2 years ago[SENDMAIL] Simplify HIDA usage
Mark Jansen [Sat, 24 Jul 2021 23:09:59 +0000 (01:09 +0200)]
[SENDMAIL] Simplify HIDA usage

2 years ago[MYDOCS] Simplify HIDA usage
Mark Jansen [Sat, 24 Jul 2021 23:08:35 +0000 (01:08 +0200)]
[MYDOCS] Simplify HIDA usage

2 years ago[SHELL32][SHELL32_APITEST] Add SHGetAttributesFromDataObject
Mark Jansen [Fri, 23 Jul 2021 18:34:02 +0000 (20:34 +0200)]
[SHELL32][SHELL32_APITEST] Add SHGetAttributesFromDataObject

2 years ago[DRWTSN32] Implement arm context reading
Mark Jansen [Sat, 5 Jun 2021 20:13:22 +0000 (22:13 +0200)]
[DRWTSN32] Implement arm context reading

CORE-17605 CORE-17604

2 years ago[WIN32K] Fix a weird control character in dibobj.c CreateDIBPalette() CORE-17848
Joachim Henze [Mon, 15 Nov 2021 02:04:37 +0000 (03:04 +0100)]
[WIN32K] Fix a weird control character in dibobj.c CreateDIBPalette() CORE-17848

2 years ago[RICHED20_WINETEST] Re-enable crashing test. CORE-16799
Thomas Faber [Sat, 16 Oct 2021 02:21:57 +0000 (22:21 -0400)]
[RICHED20_WINETEST] Re-enable crashing test. CORE-16799

2 years ago[SETUP] Register riched20.dll's type library during setup. CORE-16799
Thomas Faber [Mon, 15 Nov 2021 01:20:29 +0000 (20:20 -0500)]
[SETUP] Register riched20.dll's type library during setup. CORE-16799

This is a bit of a hack -- I'm not sure how Windows deals with this.

2 years ago[RICHED20] Decorate thiscall functions as such. ROSTESTS-375 CORE-17021
Thomas Faber [Sat, 13 Nov 2021 04:25:53 +0000 (23:25 -0500)]
[RICHED20] Decorate thiscall functions as such. ROSTESTS-375 CORE-17021

2 years ago[NTOS:PS] Fix copypasta in NtQueryInformationJobObject. CID 1441354 4090/head
Thomas Faber [Sat, 30 Oct 2021 23:43:27 +0000 (19:43 -0400)]
[NTOS:PS] Fix copypasta in NtQueryInformationJobObject. CID 1441354

2 years ago[NTOS:IO] Correctly deal with exceptions when handling FileFsDriverPathInformation...
Thomas Faber [Thu, 28 Oct 2021 15:23:02 +0000 (11:23 -0400)]
[NTOS:IO] Correctly deal with exceptions when handling FileFsDriverPathInformation. CID 1476847

2 years ago[NTOS:IO] Don't call IopCompleteRequest with uninitialized context values. CID 716761
Thomas Faber [Thu, 28 Oct 2021 15:17:03 +0000 (11:17 -0400)]
[NTOS:IO] Don't call IopCompleteRequest with uninitialized context values. CID 716761

NormalContext and NormalRoutine are just for good measure, but
SystemArgument2 is actually used by the function.
And yes, this appears to be a bug in Win 2003.

2 years ago[NTOS:EX] Assert some AcquireResource return values. CID 1321882
Thomas Faber [Thu, 28 Oct 2021 13:48:48 +0000 (09:48 -0400)]
[NTOS:EX] Assert some AcquireResource return values. CID 1321882

2 years ago[NTOS:EX] Correctly handle OOM in NtFindAtom. CID 1237072
Thomas Faber [Thu, 28 Oct 2021 02:51:15 +0000 (22:51 -0400)]
[NTOS:EX] Correctly handle OOM in NtFindAtom. CID 1237072

2 years ago[BOOTDATA] Include VMXNET3 driver in optional.
Thomas Faber [Sat, 13 Nov 2021 16:07:03 +0000 (11:07 -0500)]
[BOOTDATA] Include VMXNET3 driver in optional.

2 years ago[CRT] Do Not lock ioinfo when spawning functions (#4099) CORE-15176
Doug Lyons [Thu, 11 Nov 2021 17:30:43 +0000 (11:30 -0600)]
[CRT] Do Not lock ioinfo when spawning functions (#4099) CORE-15176

This fixes CORE-15176 'Gimp 2.6.11 hangs when opening a file'.
It regressed by 0.4.9-dev-446-g bffd8201d0a822365e1950c558aaf33c26f20002

I do intend to port this fix back.

2 years ago[COMCTL32] Fix crash on SB_GETPARTS
Mark Jansen [Mon, 1 Nov 2021 21:46:12 +0000 (22:46 +0100)]
[COMCTL32] Fix crash on SB_GETPARTS

wParam (num_parts) is allowed to be bigger than the actual amount of parts
CORE-17842

2 years ago[ADVAPI32] Properly implement CreateRestrictedToken 4062/head
George Bișoc [Sat, 23 Oct 2021 11:55:02 +0000 (13:55 +0200)]
[ADVAPI32] Properly implement CreateRestrictedToken

Instead of duplicating the token and masquerade it as if the token was filtered (which is a big hack), properly implement CreateRestrictedToken function by calling NtFilterToken which it'll create a restricted token for us.

2 years ago[KMTESTS:SE] Implement SeFilterToken testcase 4056/head
George Bișoc [Tue, 19 Oct 2021 09:39:06 +0000 (11:39 +0200)]
[KMTESTS:SE] Implement SeFilterToken testcase

2 years ago[NTDLL_APITEST] Implement NtFilterToken testcase
George Bișoc [Tue, 19 Oct 2021 09:36:02 +0000 (11:36 +0200)]
[NTDLL_APITEST] Implement NtFilterToken testcase

2 years ago[NTOS:SE] Implement token filtering
George Bișoc [Tue, 19 Oct 2021 09:30:23 +0000 (11:30 +0200)]
[NTOS:SE] Implement token filtering

This implements the support of token filtering within the kernel, where the kernel can create restricted tokens of regular ones on demand by the caller. The implementation can be accessed thorough a NT syscall, NtFilterToken, and a kernel mode routine, SeFilterToken.

2 years ago[SDK][NDK][XDK] Add the privilege flags needed for token filtering
George Bișoc [Tue, 19 Oct 2021 09:22:12 +0000 (11:22 +0200)]
[SDK][NDK][XDK] Add the privilege flags needed for token filtering

These are needed for CreateRestrictedToken, NtFilterToken and SeFilterToken respectively. See the link down below for more information.
https://docs.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-createrestrictedtoken

2 years ago[SDK][NDK] Declare the NtFilterToken syscall prototype
George Bișoc [Tue, 19 Oct 2021 09:20:59 +0000 (11:20 +0200)]
[SDK][NDK] Declare the NtFilterToken syscall prototype

2 years ago[HALX86] Implement HalBuildScatterGatherList
Hervé Poussineau [Sun, 7 Nov 2021 11:18:04 +0000 (12:18 +0100)]
[HALX86] Implement HalBuildScatterGatherList

Make HalGetScatterGatherList a wrapper around it.

2 years ago[HALX86] Partly implement HalCalculateScatterGatherListSize
Hervé Poussineau [Sun, 7 Nov 2021 11:17:53 +0000 (12:17 +0100)]
[HALX86] Partly implement HalCalculateScatterGatherListSize

2 years ago[NTOS:SE] Partially revert 0129de2
George Bișoc [Fri, 5 Nov 2021 09:13:45 +0000 (10:13 +0100)]
[NTOS:SE] Partially revert 0129de2

The continue statements do not server any useful purpose in these loops so they're basically pointless. These have been introduced by mistake so my bad.

2 years ago[NTOS:MM] MI_IS_*(): Improve documentation
Serge Gautherie [Wed, 9 Sep 2020 01:46:56 +0000 (03:46 +0200)]
[NTOS:MM] MI_IS_*(): Improve documentation

Intel 64 and IA-32 Architectures Software Developer’s Manual
version 075 (June 2021)

2 years ago[NTOS:KE] KiTrap0EHandler(): Use MI_IS_WRITE_ACCESS()
Serge Gautherie [Wed, 9 Sep 2020 01:46:56 +0000 (03:46 +0200)]
[NTOS:KE] KiTrap0EHandler(): Use MI_IS_WRITE_ACCESS()

2 years ago[NTOS:SE] Mark the token as no longer belonging to admin group upon effective duplication 4081/head
George Bișoc [Mon, 1 Nov 2021 19:35:21 +0000 (20:35 +0100)]
[NTOS:SE] Mark the token as no longer belonging to admin group upon effective duplication

A scenario where it happens that an access token belongs to an administrators group but it's disabled (that is, SeAliasAdminsSid has no attributes or it doesn't have SE_GROUP_ENABLED turn ON), the function removes this group from the token but still has TOKEN_HAS_ADMIN_GROUP flag which can lead to erratic behavior across the kernel and security modules -- implying that the token still belongs to administrators group.

This is an oversight from my part.

2 years ago[SHELL32] Enable OpenWith to handle "NoOpenWith" and "NoStartPage" registry keys...
Doug Lyons [Wed, 3 Nov 2021 00:16:47 +0000 (19:16 -0500)]
[SHELL32] Enable OpenWith to handle "NoOpenWith" and "NoStartPage" registry keys (#4043)

- Add registry handling of two keys to COpenWithMenu.cpp
- Add code to stop OpenWith from using registry entries that should be excluded
- Stop logspam when right-click menu testing for OpenWith is done

CORE-17816

2 years ago[NTOS:IO] Create non volatile registry keys for root devices (as for other devices)
Hervé Poussineau [Sun, 31 Oct 2021 22:24:32 +0000 (23:24 +0100)]
[NTOS:IO] Create non volatile registry keys for root devices (as for other devices)

2 years ago[NTOS:IO] Do not crash when calling IopLegacyResourceAllocation with NULL ResourceReq...
Hervé Poussineau [Sat, 30 Oct 2021 09:10:08 +0000 (11:10 +0200)]
[NTOS:IO] Do not crash when calling IopLegacyResourceAllocation with NULL ResourceRequirements

2 years ago[HALX86] Stub-implement scatter/gather DMA operations
Hervé Poussineau [Mon, 1 Nov 2021 12:00:06 +0000 (13:00 +0100)]
[HALX86] Stub-implement scatter/gather DMA operations

These are required when we ask for a DMA_ADAPTER version 2.

2 years ago[WIN32SS][NTUSER] Implement NtUserDestroyInputContext (#4063)
Katayama Hirofumi MZ [Mon, 1 Nov 2021 06:20:42 +0000 (15:20 +0900)]
[WIN32SS][NTUSER] Implement NtUserDestroyInputContext (#4063)

CORE-11700

2 years ago[ATL][ATL_APITEST] Add test for CPath +small fixes 4030/head
Mark Jansen [Wed, 13 Oct 2021 17:33:23 +0000 (19:33 +0200)]
[ATL][ATL_APITEST] Add test for CPath +small fixes

2 years ago[PARTMGR] Mark partitions as removable if device is removable
Hervé Poussineau [Sat, 30 Oct 2021 06:44:26 +0000 (08:44 +0200)]
[PARTMGR] Mark partitions as removable if device is removable

CORE-17392

2 years ago[WIN32K] Fix uninitialized bResult in IntExtTextOutW.
Thomas Faber [Sat, 16 Oct 2021 02:35:32 +0000 (22:35 -0400)]
[WIN32K] Fix uninitialized bResult in IntExtTextOutW.

Powered by clang-cl.

2 years ago[WIN32K] Mark default as unreachable.
Thomas Faber [Sat, 16 Oct 2021 02:31:38 +0000 (22:31 -0400)]
[WIN32K] Mark default as unreachable.

Powered by clang-cl.

2 years ago[WIN32K] Remove unnecessary if in NtUserGetGUIThreadInfo.
Thomas Faber [Sat, 16 Oct 2021 02:30:34 +0000 (22:30 -0400)]
[WIN32K] Remove unnecessary if in NtUserGetGUIThreadInfo.

This condition is already checked above.
Powered by clang-cl.

2 years ago[WIN32K] Fix uninitialized hNewMenu use in MENU_DoNextMenu.
Thomas Faber [Sat, 16 Oct 2021 02:30:04 +0000 (22:30 -0400)]
[WIN32K] Fix uninitialized hNewMenu use in MENU_DoNextMenu.

See also: Wine's implementation.
Powered by clang-cl.

2 years ago[NETSTAT] Fix coverity #1477187 "Double free" (#4069) 4069/head
Efe Itietie [Mon, 25 Oct 2021 18:08:03 +0000 (11:08 -0700)]
[NETSTAT] Fix coverity #1477187 "Double free" (#4069)

Within the current ShowTcpTable function logic, tcpTable would be freed twice.
The bug was introduced in b695971c.

Remove the second tcpTable free and fix coverity #1477187. CORE-17831