Mingw-w64 commit id 850703ae46e1971c5789fa1bdd802fb9692c41c9 by Daniel Starke via Mingw-w64-public <mingw-w64-public@lists.sourceforge.net>
headers: Change _S_IFBLK from 0x3000 to 0x6000
The _S_IFBLK macro, used to identify block special files in file systems, is
being updated from 0x3000 to 0x6000. This change aligns mingw-w64 with the more
commonly used value across Unix-like systems and other C libraries.
The old value of 0x3000 may have caused compatibility issues when working with
code that assumes the standard 0x6000 value for S_IFBLK.
This update improves cross-platform compatibility and consistency with other
systems, making it easier to write portable code that deals with file type
identification. It also reduces potential confusion and errors that might arise
from the non-standard value.
One of these is for example python. This is only an example. It does not change
the fact that python should be more careful about actual value implementation.
Note that the current value implies character device + FIFO instead of
character device + directory.
Link: f819900245/Python/fileutils.c (L1197)
Link: 81e4f8d68c/include/uapi/linux/stat.h (L13)
Signed-off-by: Daniel Starke <daniel-email@gmx.net>
Signed-off-by: LIU Hao <lh_mouse@126.com>
- [KMTEST:IOFILESYSTEM] Add support for NTFS
- [KMTEST:IODEVICEOBJECT] Work around a Windows 7 bug, account for struct size changes on x64, accept Vista+ behavior
- [KMTEST:EXPOOLS] Accept pool being promoted to NonPaged on Vista+, accept 2GB allocation on x64, guard an undocumented behavior
- [KMTEST:CMSECURITY] Add tests for Vista-Win8.1
- Move BIOS-specific `EXTENDED_GEOMETRY` structure to pcdisk.c
- Zero out the transfer buffer for INT 13h, function 48h before
invocation. This ensures that any random data is removed and
that some broken BIOSes behave better.
- Use a more suitable type for the pointer to the transfer buffer,
so that we can use more human-manageable member names in TRACEs
instead of magic buffer offsets.
Which is also an addendum to commit b3f11cfb38 (r17484).
The Enhanced Disk Drive Specification tells us that if the (far) pointer
to the Device Parameter Table Extension is set to FFFF:FFFF, the pointer
is invalid.
However there are some BIOSes, incl UEFI ones when running in Legacy
mode (e.g. GIGABYTE UEFI DualBIOS), that set this pointer to 0000:0000
instead, which is also an invalid value.
[COM_APITEST]
- Add NTDDI version gating to classes and interfaces in tests
- Remove rigid offset tests. Instead, offsets to known interfaces can be logged by defining LOG_COM_INTERFACE_OFFSETS.
- Replace the noreg member of the known interfaces array with a function pointer that can be used to determine if a com test should be globally registered depending on the current NTDDI version. I could probably replace this with a min and max registered NTDDI value, but I thought this was confusing for interfaces that are never globally registered.
[INCLUDE/REACTOS]
- Rename the existing interface definition for IShellBrowserService to IShellBrowserService_XP at {1307EE17-EA83-49EB-96B2-3A28E2D7048A}. This only exists on XP and Server 2003, no earlier or later versions.
- Rename IID_IShellBrowserServce to IID_IShellBrowserService since this definition is correct for Windows 7+ at {DFBC7E30-F9E5-455F-88F8-FA98C1E494CA}
- Add an interface definition for IShellBrowserService4 at {F5A24314-5B8B-44FA-BC2E-31285544B520}. This definition for IShellBrowserService exists for Vista only and no other version.
[PSDK]
- Add a define for NTDDI_WIN7SP1. While this isn't defined in the public Windows headers, it clearly exists in private headers because it is referenced in the public WinBase.h header.
CORE-20336
Move some code in win32ss/gdi/ntgdi/dibobj.c into win32ss/gdi/gdi32/objects/bitmap.c.
Condition "YSrc = 0;" on "if (Height + YDest + 1 < ScanLines)" which fixes some gdi32:bitmap regressions.
- [INCLUDE/WINE] Add synced Wine headers for the iphlpapi winetest to use. This helps us slowly decouple our headers and wine's headers.
- [PSDK] Add definitions we are missing for other winetest syncs.
- [WINETESTS][APITESTS] Fix breaking changes, remove duplicate definitions for debugstr_guid.
- Add a tristate option to accept either true or false for the bStdOutput and bStdError tests
- Use this new option on the four tests that are inconsistent.
CORE-19104
- Use `NtPowerInformation()` and the `IS_PWR_*` macros instead.
- Fancy shutdown dialog:
* Enable or disable the hibernate/sleep buttons depending on
the previously-determined available shutdown options.
* Don't invoke `ExitWindowsEx()` or `SetSuspendState()` directly
within Msgina, but return a suitable `WLX_SAS_ACTION_SHUTDOWN_*`
value, like what's done by the classic dialog. The power action
proper is then performed by the caller of the shutdown dialog:
either Shell32 or Winlogon.
CORE-19104
This fixes failure to create or open the `PowerProfileRegistrySemaphore`,
when it has been first created by a Process1 using powrprof from a "User1",
and while this process stays running, the semaphore is attempted to be
re-created (or opened) by another Process2 using powrprof from a different
"User2".
For example, this happens when "User1" is either the LocalSystem account
with the Process1 being Winlogon.exe (via the msgina.dll -> powrprof.dll
dependency), or, "Administrator" with the explorer.exe process when opening
the "Shutdown" dialog (via the shell32.dll -> runtime-loading of msgina.dll
-> powrprof.dll dependency),
AND,
"User2" being a non-administrator user and Process2 being explorer.exe,
again when opening the "Shutdown" dialog. In this situation, msgina.dll
fails to be loaded, because powrprof.dll fails in its `DllMain()` routine
-- see log excerpt below --, and the shell falls back to a minimal shutdown
confirmation dialog.
```
err:(dll\win32\powrprof\powrprof.c:1420) Couldn't create Semaphore: 5
(dll\ntdll\ldr\ldrinit.c:879) LDR: DLL_PROCESS_ATTACH for dll "powrprof.dll" (InitRoutine: 7ADC6DB0) failed
(dll\win32\kernel32\client\loader.c:386) LoadLibraryExW(msgina.dll) failing with status c0000142
err:(dll\win32\powrprof\powrprof.c:1420) Couldn't create Semaphore: 5
(dll\ntdll\ldr\ldrinit.c:879) LDR: DLL_PROCESS_ATTACH for dll "powrprof.dll" (InitRoutine: 7ADC6DB0) failed
(dll\win32\kernel32\client\loader.c:386) LoadLibraryExW(msgina.dll) failing with status c0000142
(dll\ntdll\ldr\ldrutils.c:2340) Image explorer.exe has no exports, but were trying to get procedure (null). BaseAddress asked 0x00400000, got entry BA 0x00400000
err:(win32ss\user\user32\windows\messagebox.c:1048) MessageBox: L"Do you want to shutdown?"
```
- Reimplement `RtlUnhandledExceptionFilter()` by just calling
`RtlUnhandledExceptionFilter2()`.
- Return an adequate exception filter value `EXCEPTION_CONTINUE_SEARCH`
from `RtlUnhandledExceptionFilter2()`, instead of some random error.
If `ExceptionCode` is `STATUS_POSSIBLE_DEADLOCK` however, return
`EXCEPTION_CONTINUE_EXECUTION` instead, as shown by a test from Whindmar Saksit.
- The second parameter of `RtlUnhandledExceptionFilter2()` is not
a flag, but a pointer to string `PCSTR` !
See https://skanthak.hier-im-netz.de/download/NTDLL.H
who is the only one online who has the correct definition,
whose usage I've double-checked on Win7 ntdll.dll.
This is used in the `<function_name>` slot in the displayed
debugger message:
```
*** An Access Violation occurred in <program_command_line>:<function_name>
The instruction at <address> tried to write to a NULL pointer
```
For example, see: https://community.osr.com/t/access-violation/33435
- Validate the opened `WinSta0_DesktopSwitch` handle;
- Don't pass the `ahEvents` array containing a NULL pointer to
`MsgWaitForMultipleObjects()`, but provide the correct number
of non-NULL handles, otherwise the function fails and the code
ends up busy-looping.
- Validate the `MsgWaitForMultipleObjects()` result: bail out if
`WAIT_FAILED` is returned.
- Validate the event index passed to `CRegWatcher::InitEvent()`
and `CRegWatcher::OnEvent()`.
- Rename `WATCHENTRY_MAX` to `WI_REGEVTS_MAX` and add it in the
`WATCH_INDEX` enumeration.
- Fix some code comments.
- Don't hardcode buffer sizes.
- `ShowWindow()` 2nd parameter is an `SW_*` flag, not `TRUE`/`FALSE`.
- The "FIXME: Add battery page" comment is outdated since commit 4bdbb3092c
- Use standard `IDC_STATIC` instead of `-1` for resource control IDs.
- `AUTOCHECKBOX` already contains `WS_TABSTOP`, no need to add it explicitly.
- Reformat file headers.
Add Wow64PrepareForException handler, which is well documented as a hook for KiUserExceptionDispatcher (see e.g. https://github.com/brew02/KiUserExceptionDispatcherHook) and used by ntdll_winetest.
This also reloads rcx and rdx for the call to RtlDispatchException from the stack instead of relying on the registers to be set up by the kernel, which again is a feature used by ntdll_winetest, which calls this function from a hook with zeroed registers.
Add useful macros, similar to the powrprof.dll `IsPwr*()` functions,
but that are suitable when one has a `SYSTEM_POWER_CAPABILITIES`
structure initialized from `NtPowerInformation(SystemPowerCapabilities)`.
- `IS_PWR_SUSPEND_ALLOWED()`, equivalent to `IsPwrSuspendAllowed()`,
indicating whether any of the S1, S2, S3 sleep states are supported.
- `IS_PWR_HIBERNATE_ALLOWED()`, equivalent to `IsPwrHibernateAllowed()`,
indicating whether the S4 sleep state is supported and the
hibernation file is present.
- `IS_PWR_POWEROFF_ALLOWED()`, equivalent to `IsPwrShutdownAllowed()`,
indicating whether the S5 "soft-off" state is supported.
CORE-20343
The 3-second timeout FIXME (instead of waiting indefinitely), made in the
COMPBATT worker thread for the `IOCTL_BATTERY_QUERY_STATUS` case, was done
because _*our*_ BATTC handler expects the batteries to always support the
BTP (Battery Trip Point) feature for signaling a change of battery status,
but in the cases where it isn't supported, any waits it tried for the
battery to notify about a status change would never happen.
Furthermore, following commit 3a6e0d4b65, the `SetStatusNotify()` call
(_which always fails if the battery doesn't support the BTP feature_)
would now always exit the `IOCTL_BATTERY_QUERY_STATUS` handling without
any waiting nor battery polling [^1], and this would cause the COMPBATT
worker thread to busy-poll again forever.
The timeout FIXME is now moved to BATTC, instead of COMPBATT, since the
actual fixes should be in BATTC. In particular, it should queue all the
query IOCTLs and then serve them, either using the StatusNotify (BTP)
functionality if the battery supports it, or if not, do a very-slow
battery polling.
I've also increased the timeout a little bit more (5 seconds and not 3).
[^1]: Per the ACPI specification, it is expected that the operating system
performs battery polling if the battery doesn't support BTP, see:
https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/10_Power_Source_and_Power_Meter_Devices/Power_Source_and_Power_Meter_Devices.html#btp-battery-trip-point
Previously the function waited for the conditions *after* querying the status, and then returned the old status. Also, if querying failed, it waited and when the wait timed out it returned STATUS_SUCCESS without returning any data. If the call to SetStatusNotify failed and there was no timeout, it would wait forever.
This is all fixed now.
This is useful for numerical values that are documented as being stored
in string format as `REG_SZ` in the registry; the reason being that they
are still read or written via `GetProfileIntW()`/`WriteProfileStringW()`
by Windows' Winlogon, and these functions store `REG_SZ` values because
of the INI <-> Registry mapping mechanism.
This is more explicit than defining it for all wine tests and it directly shows us which tests need to be synced to get rid of the hack.
Addendum to 381e224 (PR #7576)
Addendum to commit 1499e7ef53.
Poor thing was crying that it was ignoring trigraph `??)`, even
though this whole thing was inside an `#if 0`-commented block...
Use something else instead.
```
msgina/shutdown.c: In function 'ShutdownDialog':
msgina/shutdown.c:1217:56: error: trigraph ??) ignored, use -trigraphs to enable [-Werror=trigraphs]
pgContext->nShutdownAction = LoadShutdownSelState(???);
msgina/shutdown.c: At top level:
cc1: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror]
```
Otherwise, you wouldn't see anything at all when opening a .NET app, and
the only hint that a .NET runtime is needed would be to see the message
in the debug log, provided a debugger is connected to ReactOS ...
NOTE: `shell32!ShellMessageBoxA()` is used instead of
`user32!MessageBoxA`, because it turns out mscoree isn't importing
from user32 but from shell32 instead (as in Wine's), and I don't want
to modify the list of imported modules.
NOTE 2: This warning function has been gradually removed with Wine commits:
c99754ef156b889fe9185cd6db034926c9bd9f15
Now, a mere `ERR("Wine Mono is not installed\n");` is emitted.
- Disable "Log Off" from the Start Menu and the C-A-D Security dialog;
- Disable the "Lock Workstation" and "Change Password" buttons in the
Security dialog.
These are only "UI"-usability features to prevent the user from
logging off when running the LiveCD. (Logging off from the SYSTEM
account, and changing its password, don't make much sense.)
CORE-11397
- Respect system policies for showing or hiding:
* Security dialog "Lock Workstation", "Log Off", "Shut Down",
"Change Password", "Task Manager" buttons;
* "Log Off" entry in the Shutdown dialog;
- Disable the "Shut Down" Security dialog button, and the "Stand by",
"Shut down" entries in the Shutdown dialog, if the logged user
doesn't have the SeShutdownPrivilege.
- Add other missing `WLX_SHUTDOWN_STATE_*` shutdown flags that are
supported by Windows.
- Improve the retrieval of shutdown options to be displayed in the
"Shut Down" dialog. In particular, don't hardcode any sort of
defaults, but let them come from what the user can do (Is logoff
allowed? Does (s)he have the rights to shutdown/reboot? etc.).
If no shutdown options are available, then simply don't display
the dialog!
- Don't hardcode the default selected shutdown option. Either it comes
from the user's registry and is valid (i.e. corresponds to an existing
shutdown option in the dialog), otherwise, fall back to the first
option in the dialog.
In particular this means:
* when opening the "Shut Down" dialog from the C-A-D Security
dialog, by default we will select the "Log Off" option, or
whatever the user last selected;
* when opening the dialog from the "Turn Off" Start Menu item, default
to the "Shut down" option, or whatever the user last selected.
* when opening the dialog from the C-A-D "Log On" dialog (no user
is logged in), the "Shut down" option will also be selected, or
whatever the system operator last selected.
- For the shell-invokable `ShellShutdownDialog()` function, implement
support for using a custom display user name, or the one in the
`"Logon User Name"` registry value saved by `WlxActivateUserShell()`.
Plus, the 3rd parameter specifies the list of shutdown options to
*exclude* from the options list.
The Security dialog can be displayed only when a user is logged.
When this is so, the `pgContext->bAutoAdminLogon` has already been
reset to `FALSE`, see `gui.c!DoLogon()`. Thus there is really no
reason to disable the "Log Off" button in that case.
Addendum to commit c633b79451 (r61622)
- Add SAL annotations;
- Avoid using hardcoded buffer sizes in function calls.
- If the start-application (Userinit) launched successfully, store
in the logged-in user's Explorer key, value `"Logon User Name"`,
the user name that was entered verbatim in the "Log On" dialog
to log into the system. This value is used as a "convenience" to
display the `"Log Off <username>"` item in the explorer's Start menu
(see `explorer!util.cpp:GetCurrentLoggedOnUserName()`), and the
corresponding item in the "Shut Down" dialog.
- utils.c: Introduce the `RegOpenLoggedOnHKCU()` helper, for opening
the current logged-in user HKCU key.
NOTE: Regarding the `.Default` registry key, see:
https://devblogs.microsoft.com/oldnewthing/20070302-00/?p=27783
- Registry-value getters; string copy functions.
- ReadRegSzValue(): Use a meaningful error value
when the value type isn't the expected one.
- Rename `DuplicationString` -> `DuplicateString`
Like with all the other win32k NtUser* functions, acquire on entry and
release on exit the global lock, since the function is reading/writing
to global variables.
Also, set the last-error to ERROR_ACCESS_DENIED if the caller isn't the
registered logon process.
PSEH has 2 scopes: an outer scope, that starts with _SEH3_TRY and ends with _SEH3_END, and an inner scope that goes around the try block only. PSEH tracks try-levels by using an enum, which increments at every new TRY scrope, and which needs to be accessible in the outer scope for all registration and cleanup to work. But it should only increment when nested within the inner try scope, not from the except scope. This is fixed by adding an additional _SEH3$_InnerTryLevel, which increments only within the try block, but resets to the parent-value outside of it.
Should fix CORE-20316.
- WlxLogoff(): Zero out cached Winlogon buffer pointers and some more
user login info.
- WlxLoggedOutSAS(): Return the logged-in user token handle *ONLY* if
the user is actually logging into the system.
If (s)he doesn't log in, but instead cancels the Log-On dialog, or
chooses to Shutdown/Reboot the computer from that dialog, do *NOT*
return any previous logged-in user token handle.
For example, in the case of a previously failed logon attempt due
to a wrong or corrupted user profile, shutting down the computer
from the Log-On dialog would show the following errors in the debugger:
```
err:(.../winlogon/sas.c:757) ImpersonateLoggedOnUser() failed with error 6
err:(.../winlogon/sas.c:859) Shutdown thread returned failure
err:(.../winlogon/sas.c:1182) Failed to start the Shutdown thread, Status 0xc0000001
```
MSI, Inno and NSIS installers are automatically detected (also if they are nested by ExeInZip). Others can specify command line switches in the rapps-db package.
Commit 51ee32f5f8 moved the `WNetClearConnections()` in the main
Winlogon thread, where it now runs.
`WNetClearConnections()` calls a 3rd-party module (nfs41_np.dll)
that invokes `kernel32!OutputDebugStringA()`.
The SEH usage pattern in `OutputDebugStringA()`, when compiled with
GCC and PSEH, generates an erroneous chain of exception handlers, that,
when running in an execution environment like that of winlogon.exe,
triggers a crash. See CORE-20316 for more details and testing.
As a temporary measure, hackfix away the problem by surrounding the
`WNetClearConnections()` call in a `_SEH2_TRY/_SEH2_EXCEPT` block
(the net effect is to "add" the missing exception handler entry).
Hack for commit 51ee32f5f8
CORE-20307 CORE-20309 CORE-20316
The Win32 TryEnterCriticalSection(), which returns a 32-bit BOOL,
directly redirects to NTDLL!RtlTryEnterCriticalSection().
The latter should therefore return a 32-bit boolean as well:
use the LOGICAL type for this purpose. This change has been
validated with the System Informer phnt headers.
This mismatch was caught by Marcin Jabłoński (TheNNX).
The LOGICAL (32-bit boolean) type is already defined for kernel-mode
in the XDK/DDK ntdef.h header. Add the type in the NDK for usage in
user-mode NT code also.
The definition present in kmt_platform.h can now be removed, since
it can now use the one from the NDK.
Invoked by `RtlSetThreadIsCritical()` for returning the previous flag value,
and fixes the following error:
```
(ntoskrnl/ps/query.c:3155) Not implemented: 18
```
The implementation is "identical" to that of NtQueryInformationProcess()
`ProcessBreakOnTermination`, with the necessary adaptations, of course.
2nd parameter of FT_Library_SetLcdGeometry() is `FT_Vector sub[3]`,
as specified in the header, and not `FT_Vector* sub`
Fixes compilation error when compiling with i686-w64-mingw32-g++
version 13-win32:
```
sdk/.../freetype/src/base/ftlcdfil.c:361:42: error: argument 2 of type ‘FT_Vector *’ {aka ‘struct FT_Vector_ *’} declared as a pointer [-Werror=array-parameter=]
361 | FT_Vector* sub )
| ~~~~~~~~~~~~^~~
In file included from sdk/.../freetype/include/freetype/internal/ftobjs.h:32,
from sdk/.../freetype/src/base/ftadvanc.c:23,
from sdk/.../freetype/src/base/ftbase.c:22:
sdk/.../freetype/include/freetype/ftlcdfil.h:318:42: note: previously declared as an array ‘FT_Vector[3]’ {aka ‘struct FT_Vector_[3]’}
318 | FT_Vector sub[3] );
| ~~~~~~~~~~~~^~~~~~
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
```
- Add the context stack including the PUSHD and POPD commands.
- Add the required changes to the HELP command and command execution to support the context stack.
- Add support for sub helpers.
- Introduce GetNTDDIVersion() to get NTDDI version at runtime for apitests.
- Introduce GetMajorNTVersion() and GetMinorNTVersion() macros and use them for GetNTVersion()
- Introduce GENERATE_NTDDI() macro to construct NTDDI values from major, minor, service pack, and subversion values.
- Introduce NTDDI_MIN and NTDDI_MAX macros for tests that use NTDDI ranges.
Note: the build number in KUSER_SHARED_DATA is only populated on Windows 10 RTM and later. On older Windows versions, this field is reserved and is usually 0. For this reason, I chose not to expose it as a macro.
- Let it be `"NDIS"`, instead of variations of `"SIMN"`.
- Use matching `ExFreePoolWithTag()`.
- Remove a redundant `KeyInformation = NULL;`.
Addendum to commits e8861acfb2 (r12196) and 5658b2154c (r53045).
CORE-18791
- Remove unused idedma.def
Addendum to commit 1daf74908e (r29256).
- Convert a few files to UTF-8 from ANSI
Plus, 2 tiny formatting fixes.
- id_ata.cpp: Unmark a ReactOS own diff
Addendum to commit 7fdf078134.
- id_init.cpp: Mark a diff
Addendum to commit 09dde2cff9.
- Upgrade to v0.47b from v0.47a
CORE-17876
- The single default button in the "Shutdown Computer" and "GINA failed
to load" dialogs will be automatically focused by the dialog manager,
so there is no need to invoke `SetFocus()` in their `WM_INITDIALOG`
handler -- which also erroneously returned `TRUE`, thus ignoring any
focus set by the caller :D
- Use `DeleteMenu()` instead of `RemoveMenu()` so that it'll free any
memory resources.
Fix some erroneous `SetFocus()` invocations in dialog procedures:
- In `WM_INITDIALOG`, don't return `TRUE` if focus is changed to a
control, otherwise any focus set by the caller would be ignored;
- In other handlers, `SetFocus()` would generate an inconsistent
behaviour with the dialog push-buttons, as mentioned in:
https://devblogs.microsoft.com/oldnewthing/20040802-00/?p=38283
This allows pressing ENTER or ESC on the keyboard and have the correct
action done. The equivalent dialog in shell32.dll was already using that.
Simplify the associated code as well.
Also: remove the unused `", 400, 0, 1"` `FONT` resource specification info.
And add missing keyboard accelerators to the dialog buttons
(except for Hebrew where it's not clear what the preferred way
of specifying accelerators is).
Some partition entries (such as those added by the CreateInsertBlankRegion function) may not have their Volume member allocated. This fixes the USETUP crash when such partitions are handled.
- Both 3rd-party modules and GINA shutdown notifications should be
called just when shutdown is being started.
Addendum to commit d3b9c68d22 (r66252)
CORE-8322
- Factor the two `DisplayStatusMessage()` calls for shutdown vs. reboot.
- The `LogonHandler` notification should be invoked only once for a
given logon operation. It is invoked in `HandleLogon()` after access
to the window station (and desktop) is allowed for the user logging in.
And so, it must not be invoked elsewhere, when no user is logged in
(or a logon failure happened), like after a call to `WlxDisplaySASNotice()`...
- Invoke the `StartShellHandler` notification **before** starting the
shell, and the `PostShellHandler` notification **after** the shell
started.
- Invoke the `LogoffHandler` notification on the application desktop,
just after having terminated all the user's programs, and before
switching back to Winlogon's desktop.
- Add and show the 'Logging off' status message.
- When performing the following actions:
`WLX_SAS_ACTION_LOGOFF`, `WLX_SAS_ACTION_FORCE_LOGOFF`,
as well as:
`WLX_SAS_ACTION_SHUTDOWN`, `WLX_SAS_ACTION_SHUTDOWN_POWER_OFF`,
`WLX_SAS_ACTION_SHUTDOWN_REBOOT`,
ensure that Winlogon is in a correct LogonState for doing the logoff
sequence.
----
Test results for Winlogon notifications, after fix:
- `Asynchronous: FALSE, Impersonation: FALSE`
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventStartShell: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventPostShell: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLock: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventUnlock: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 6 failures), 0 skipped.
WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 5 failures), 0 skipped.
WLEventLogoff: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
- `Asynchronous: FALSE, Impersonation: TRUE`
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
WLEventStartShell: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
WLEventPostShell: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
WLEventLock: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
WLEventUnlock: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
WLEventStartScreenSaver: 34 tests executed (0 marked as todo, 3 failures), 0 skipped.
WLEventStopScreenSaver: 34 tests executed (0 marked as todo, 2 failures), 0 skipped.
WLEventLogoff: 34 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
Per-user network connections (to shared drives...) are restored at user
logon: `HandleLogon() -> RestoreAllConnections()`.
These connections should be closed only at user logoff, in `HandleLogoff()`,
instead of inside the common logoff/shutdown thread, which is also invoked
at... shutdown!
- Isolate the network connections closing inside a `CloseAllConnections()`
helper (which also performs the necessary user thread impersonation).
- Invoke this helper directly inside `HandleLogoff()`, and also re-enable
the `IDS_CLOSINGNETWORKCONNECTIONS` message display.
Test results:
- Test 1a: `Asynchronous: FALSE, Impersonation: FALSE`
BEFORE the fix:
OK, the thread isn't impersonated:
```
Thread Token : 0x00000000 - User: '(null)\(null)'
```
BUT these two WLX notify info fields aren't set when the user is logged in:
```
Info.UserName : '(null)'
Info.Domain : '(null)'
```
Results:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
WLEventStartShell: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventUnlock: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 2 skipped.
WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 7 failures), 2 skipped.
WLEventLogoff: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
- Test 1b: `Asynchronous: FALSE, Impersonation: FALSE`
AFTER the fix:
OK, the thread isn't impersonated:
```
Thread Token : 0x00000000 - User: '(null)\(null)'
```
OK, these two WLX notify info fields are now set when the user is logged in:
```
Info.UserName : 'Administrator'
Info.Domain : 'MYCOMPUTERNAME'
```
Results:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventStartShell: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 32 tests executed (0 marked as todo, 2 failures), 0 skipped.
WLEventUnlock: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 7 failures), 0 skipped.
WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 5 failures), 0 skipped.
WLEventLogoff: 32 tests executed (0 marked as todo, 2 failures), 0 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
Less failed tests and none skipped anymore.
- Test 2a: `Asynchronous: FALSE, Impersonation: TRUE`
BEFORE the fix:
OK, the thread impersonates the user when (s)he is logged in:
```
Thread Token : 0x00000360 - User: 'MYCOMPUTERNAME\Administrator'
```
BUT these two WLX notify info fields aren't set when the user is logged in:
```
Info.UserName : '(null)'
Info.Domain : '(null)'
```
Results:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
WLEventStartShell: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 31 tests executed (0 marked as todo, 6 failures), 2 skipped.
WLEventUnlock: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 6 failures), 2 skipped.
WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventLogoff: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
- Test 2b: `Asynchronous: FALSE, Impersonation: TRUE`
AFTER the fix:
OK, the thread impersonates the user when (s)he is logged in:
```
Thread Token : 0x00000360 - User: 'MYCOMPUTERNAME\Administrator'
```
OK, these two WLX notify info fields are now set when the user is logged in:
```
Info.UserName : 'Administrator'
Info.Domain : 'MYCOMPUTERNAME'
```
Results:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
WLEventStartShell: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 33 tests executed (0 marked as todo, 4 failures), 0 skipped.
WLEventUnlock: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
WLEventStartScreenSaver: 34 tests executed (0 marked as todo, 4 failures), 0 skipped.
WLEventStopScreenSaver: 34 tests executed (0 marked as todo, 2 failures), 0 skipped.
WLEventLogoff: 34 tests executed (0 marked as todo, 2 failures), 0 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
As well, less failed tests and none skipped anymore.
- As mentioned in the previous MSGINA commit aa67222595,
`lpProfilePath` specifies the path to a *roaming* user profile,
for example on a domain server, if any. It is then used to create
a local image (copy) of the profile on the local computer.
HOWEVER (ReactOS HACK):
We currently don't implement this in ReactOS; instead, we use it
directly as *the* user's profile path, without doing any copy...
- Yes, MS Windows allows `lpProfileInfo->lpProfilePath` to be NULL :)
The following members of the returned `WLX_PROFILE_V2_0` structure:
`pszProfile`, `pszPolicy`, `pszNetworkDefaultUserProfile`, and
`pszServerName`, have a specific meaning and are used when logging
to (NT4, Active Directory...) domains.
See the added code comments for details.
In particular, `pszProfile` specifies the path to a *roaming* user
profile[^1] on a domain server, if any. It **DOES NOT** specify the local
`"C:\Documents and Settings"` path (got via `GetProfilesDirectoryW()`).
Since we don't really support user login on domains, set these pointers to NULL.
----
Enabling UserEnv debug logging[^2] on Windows 2003, one can observe such
following traces, for a `TestUser` roaming user profile:
```
USERENV(148.14c) 20:24:59:821 LoadUserProfile: Entering, hToken = <0x8bc>, lpProfileInfo = 0x6e5d8
USERENV(148.14c) 20:24:59:875 LoadUserProfile: lpProfileInfo->dwFlags = <0x0>
USERENV(148.14c) 20:24:59:912 LoadUserProfile: lpProfileInfo->lpUserName = <TestUser>
USERENV(148.14c) 20:24:59:966 LoadUserProfile: lpProfileInfo->lpProfilePath = <C:\Documents and Settings\TestUser_Roaming>
USERENV(148.14c) 20:25:00:021 LoadUserProfile: lpProfileInfo->lpDefaultPath = <\\PC-H\netlogon\Default User>
USERENV(148.14c) 20:25:00:075 LoadUserProfile: NULL server name
...
USERENV(148.14c) 20:25:06:177 CopyProfileDirectoryEx: Found hive file NTUSER.DAT
USERENV(148.14c) 20:25:06:395 ReconcileFile: C:\Documents and Settings\TestUser_Roaming\NTUSER.DAT ==> C:\Documents and Settings\TestUser\NTUSER.DAT [OK]
...
```
The `lpProfilePath` specifies a roaming profile directory (`"TestUser_Roaming"`)
for a user named named `TestUser`, and UserEnv proceeds to image the roaming
profile into the directory (`"TestUser"`) in the local computer.
However, when the user has a local profile, the `lpProfilePath` is set to
NULL in this case, and one observes instead:
```
USERENV(148.14c) 20:21:22:644 LoadUserProfile: NULL central profile path
```
----
[^1]: The following links explain this, also demonstrating UserEnv debug logging:
- https://web.archive.org/web/20130319204738/http://blogs.technet.com/b/askds/archive/2008/11/11/understanding-how-to-read-a-userenv-log-part-2.aspx
- https://web.archive.org/web/20150405040409/http://blogs.technet.com/b/ad/archive/2007/08/20/tracking-user-environment-creation.aspx
[^2]: For more details, see:
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/221833
(archived from: http://support.microsoft.com/kb/221833)
UserEnv debug logging is achieved by adding a `REG_DWORD` value named
`UserEnvDebugLevel` in the following registry sub-key:
`HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon`
with a non-zero value.
To view the output in a debugger (e.g. WinDbg when kernel-debugging
Windows), set the value to `0x00020002`.
Also, capture in `CallNotificationDll()` the notify info structure template
before invoking each DLL handler: a malicious caller might modify its contents,
and so we need to re-initialize its contents for each call.
Test results:
- Test 1: `Asynchronous: FALSE, Impersonation: FALSE`
Before & After the fix, give the same results:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
WLEventStartShell: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventUnlock: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 2 skipped.
WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 7 failures), 2 skipped.
WLEventLogoff: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
* The current notification thread doesn't impersonate any user, the
dumped thread token shows:
`Thread Token : 0x00000000 - User: '(null)\(null)'`
(except for `WLEventStartScreenSaver` and `WLEventStopScreenSaver`
which currently in ReactOS, impersonate the logged user and shows e.g.,
`Thread Token : 0x00000250 - User: 'MYCOMPUTERNAME\Administrator' ).
- Test 2: `Asynchronous: FALSE, Impersonation: TRUE`
Before the fix:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 29 tests executed (0 marked as todo, 8 failures), 4 skipped.
WLEventStartShell: 29 tests executed (0 marked as todo, 8 failures), 4 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 29 tests executed (0 marked as todo, 9 failures), 4 skipped.
WLEventUnlock: 29 tests executed (0 marked as todo, 8 failures), 4 skipped.
WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 6 failures), 2 skipped.
WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventLogoff: 30 tests executed (0 marked as todo, 7 failures), 4 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
* There are more failures (and skipped tests), because in impersonation
mode, the tests expect that the current thread is impersonating the
logged-on user, and validate whether this impersonated user matches
what the WLX notification `Domain` and `UserName` information structure
members are. However, these two fields aren't set yet, and the thread
isn't impersonating any user yet.
* The dumped thread token shows the same information as in Test 1.
- Test 3: `Asynchronous: FALSE, Impersonation: TRUE`
After the fix:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
WLEventStartShell: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 31 tests executed (0 marked as todo, 6 failures), 2 skipped.
WLEventUnlock: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 6 failures), 2 skipped.
WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventLogoff: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
* There are now less skipped tests than in Test 2, as much as in Test 1.
* There are also less failed tests than in Test 2; however, there are
few more failed tests than in Test 1, but this is balanced by new
tests being executed.
The reason is that now, compared to Test 2 in impersonation mode, the
current thread is correctly impersonating the logged-on user, if any.
However, the WLX notification `Domain` and `UserName` information
structure members still aren't set yet, thus some of the tests fail.
* The dumped thread token for all notifications now show e.g.,
`Thread Token : 0x00000360 - User: 'MYCOMPUTERNAME\Administrator'`
(`WLEventStartup`, `WLEventShutdown` don't show any, since no user
is logged-in at these stages.)
And retrieve all its exported notification handlers.
This reverts parts of commit 5d4f69bf35.
Because notification DLLs can keep internal state between successive
notifications, they are kept loaded until Winlogon termination.
The SFC notification DLL is also loaded. Because sfc.dll redirects to
sfc_os.dll, the latter is then automatically loaded. This allows doing
what commit 88ee639b06 (r68615) was aiming at, in a less hackish manner.
CORE-9598
Test results:
- Before:
We observe the repeated loading/unloading of the DLL at each
notification call:
```
WLNOTIFY(ac.b0): Entering `DllMain`(hInst: 0x10000000, dwReason: 0x1, pReserved: 0x00000000)
...
WLNOTIFY(ac.b0): Entering `DllMain`(hInst: 0x10000000, dwReason: 0x0, pReserved: 0x00000000)
```
The global state of the notification DLL is lost between each
notification, and such testing errors happen:
```
modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:786: Test failed: **** WLEventLogon: ERROR: Wrong state NON-INITIALIZED, expected Startup or Logoff
err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1034) **** WLEventLogon: Changing state NON-INITIALIZED to Logon
```
The previous notification state is always reset to `NON-INITIALIZED` (its initial value).
Test results for all the notifications:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventStartShell: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventUnlock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 10 failures), 0 skipped.
WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 0 skipped.
WLEventLogoff: 30 tests executed (0 marked as todo, 5 failures), 2 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 5 failures), 0 skipped.
```
- After:
The DLL is loaded only once, at the first notification, then stays
loaded for the whole life of winlogon.exe:
```
WLNOTIFY(ac.b0): Entering `DllMain`(hInst: 0x10000000, dwReason: 0x1, pReserved: 0x00000000)
```
and the global state of the notification DLL is now kept between each
notification, there are no `ERROR: Wrong state NON-INITIALIZED, expected ...`
errors anymore.
Test results for all the notifications:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
WLEventStartShell: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
(NOTE: WLEventPostShell isn't yet implemented in ReactOS)
WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventUnlock: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 2 skipped.
WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 7 failures), 2 skipped.
WLEventLogoff: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
```
Split Windows Server 2003 and Windows Vista behaviour in two different cases and make them used separately: when ReactOS target version is NT 5.2, use the 1st case, otherwise use the 2nd one instead.
Also, handle NdisPhysicalMediumNative802_11 case only for NT 6.0 and newer, since that's actually supported starting from NDIS 6.0, according to MSDN:
https://learn.microsoft.com/en-us/windows-hardware/drivers/network/oid-gen-physical-medium
while for NDIS 5.1 and newer it's:
https://learn.microsoft.com/en-us/previous-versions/windows/hardware/network/ff560255(v=vs.85)
This fixes:
1. A critical regression with unavailable networking in ReactOS when 3rd-party NT5-compatible Ethernet/Wi-Fi drivers are used (both in VM and on real hardware) caused by commit 3842b59f75 from @EricKohl.
2. Failure to open Network Properties and Network Status from the Network tray icon (caused by the same commit too).
MSDN tells us this is done so for Windows XP and Server 2003 as well, and IF_TYPE_IEEE80211 is returned only in Windows Vista and newer, so the following Microsoft documentation is actually correct in this case:
https://learn.microsoft.com/en-us/windows/win32/api/iptypes/ns-iptypes-ip_adapter_info
(see the information about "IP_ADAPTER_INFO.Type" member below on that page)
!!!Please note that the behaviour of Vista+ case (e. g., when compiling ReactOS targeted as NT 6.0 and newer) remains unchanged after this fix (networking still may not work), so it still requires the proper support of 3rd-party NT6+ compatible network miniport drivers (by handling this case via the Vista/NDIS6-style way) for NT6 target!!!
CORE-20244
Expand the "DllName" notification DLL path string, independently of
whether it is REG_SZ or REG_EXPAND_SZ, before loading it, similarly
to Windows' winlogon.exe.
Validate also the type/size of the retrieved registry value.
Use a KSEMAPHORE instead of a NotificationEvent to signal availability. This is to prevent satisfying the wait for multiple waiters, when only a single entry is on the list.
Fixes crashes on SMP builds.
IpReleaseAddress: Use DhcpReleaseParameters instead of DhcpReleaseIpAddressLease.
IpRenewAddress: Use DhcpAcquireParameters instead of DhcpRenewIpAddressLease.
Historical note:
Investigation shows that this functionality, introduced between builds
1902 and 1906 of Windows NT 5.0 (future 2000) Beta 3, has always been
"nop-ed" and has remained this way till Windows Server 2003.
The value read from the "SafeMode" registry value is unconditionally
overridden afterwards, causing the notification DLLs to always be loaded.
In ReactOS, this functionality is restored, and only the notifications
tagged as such are loaded in SafeMode.
Furthermore:
Analysis of strings in Win2000 and WinXP/2003 winlogon.exe, show that
the "Safe" registry value doesn't exist for notifications; instead,
it is named "SafeMode".
The "Safe" value appears only for the SensLogn (SENS Winlogon Event) handler
registry entry. My hypothesis is that the value name is a typo for the
"SafeMode" value. It has been introduced in the `\Winlogon\Notify\SensLogn`
registry entry for SensLogn around Windows NT 5.0 build 1946.
Analysis of strings in Win2000 and WinXP/2003 winlogon.exe, show that
the "Enabled" registry value doesn't exist for notifications.
This value is actually only used by the ScCertProp (Smart Card Certificate
Propagation) notifications, in wlnotify.dll, to enable or disable certificate
progagation.[^1]
Note that whatever the "Enabled" registry value is, the notification DLL
is still loaded within winlogon.exe.
We however keep the `bEnabled` internal flag, so as to be able to disable
at runtime notifications that could not be delay-loaded, or that behave
erratically, etc.
[WLNOTIFY] Add a comment about the "Enabled" value in scard.c!SCardStartCertProp()
[^1]: For more information, see:
https://www.microfocus.com/documentation/securelogin/9.0/administration_guide/blm54qb.html?view=printhttps://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/925884
Fix the shell32 apitests so that they pass on Windows Server 2003 - Windows 10. Many of these fixes are for Vista+, but the most important fixes are for ShellExecCmdLine and FindExecutable which had issues closing windows after tests and deleting test files. Failing to delete these files breaks the other test (i.e. running ShellExecCmdLine would break FindExecutable and vis-versa.)
- Move sdk\include\reactos\wine to sdk\include\wine
- Reorder the directories in include_directories() to be closer to alphabetical. This should make it easier to determine what global include directories can be removed in the future.
Windows uses the keyboard layout IDs of the Ristome, Ergo and Neo layouts for the German(IBM), German Extended 1 and German Extended 2 keyboard layouts.
GCC and Clang need to mark functions that use SSE/AVX etc, either with a function attribute or a pragma around the function. strlen uses a template function that either uses SSE2 or AVX2. Previously the template was surrounded with pragmas to allow both SSE2 and AVX2, but that makes GCC assume that it can use AVX2 instructions even in the SSE2 version. To fix this the template instances are now build in individual compilation units for SSE2 and AVX, separate from the "dispatcher" function.
Now ucrtbase doesn't crash anymore on GCC build.
Another issue was the namespace around strnlen_mode, which has confused clang so much, that it forgot to instantiate the template code.
GCC was optimizing away the xor with __security_cookie when passing nullptr_t, because the return value was also nullptr_t, assuming it must be nullptr.
CORE-13532
* Fix macros VCMPCLR and VCMPCLRS to correctly select between gradient color or solid color triangles.
* Remove hack from commit 1c0aedc and replace it with 'if' test before STEPCOL in 'while' test.
* Other assorted fixes for FILLLIINE macro starting position to completely fill triangles.
* Remove warning/FIXME: about IntEngGradientFillTriangle being broken.
* Precede some 'while' loops by 'if' tests to exclude possible loops.
Introduce and use a minimal testing framework (minitest.h) based on
an updated version of `wine/test.h`.
Each notification handler becomes its own test. Useful macro and
function helpers have been introduced to simplify the code that is
duplicated for each handler.
See commit 38d07d3a24 (PR #8234) for the details of how to install
and use the notification dll.
These tests can exercise the notifications in the four cases, where
asynchronous events and user impersonation can be independently
enabled or disabled. To do this, the `Asynchronous` and `Impersonate`
registry `REG_DWORD` values, inside the `WLNotifyTests` subkey of:
`HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify`
must be set to their intended values[^1].
----
[^1]: https://learn.microsoft.com/en-us/windows/win32/secauthn/registry-entries
----
Current test results:
- When each notification is emitted, the DLL is loaded then unloaded:
```
err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1307)
WLNOTIFY(ac.b0): Entering `DllMain`(hInst: 0x10000000, dwReason: 0x1, pReserved: 0x00000000)
...
err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1307)
WLNOTIFY(ac.b0): Entering `DllMain`(hInst: 0x10000000, dwReason: 0x0, pReserved: 0x00000000)
```
This doesn't happen on Windows. And indeed, it should _not_ happen,
because otherwise the DLL would loose any of its internal global state
between consecutive notification calls. This currently happens in
ReactOS, where we can observe the following:
```
modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:788: Test failed: **** WLEventLogon: ERROR: Wrong state NON-INITIALIZED, expected Startup or Logoff
...
err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1036) **** WLEventLogon: Changing state NON-INITIALIZED to Logon
```
and similar for every other notification.
- Test results for each notification:
```
WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
WLEventLogon: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventStartShell: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
-- Note: missing WLEventPostShell --
WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventUnlock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 10 failures), 0 skipped.
WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 0 skipped.
WLEventLogoff: 30 tests executed (0 marked as todo, 5 failures), 2 skipped.
WLEventShutdown: 31 tests executed (0 marked as todo, 5 failures), 0 skipped.
```
- Add DeleteNotification() helper;
- Invoke it in failure path in AddNotificationDll(), and in
CleanupNotifications().
- Simplify iteration loops in CallNotificationDlls() and in
CleanupNotifications().
Side-note: When doing `Notification = CONTAINING_RECORD(ListEntry, ...);`
where `ListEntry` iterates over a well-formed linked-list, the `Notification`
pointer can **NEVER** be NULL!
Now the WinMain() message loop correctly exits and we get to perform
last-time cleanup. However, the main thread must not exit (except under
certain conditions, not yet implemented), so we Sleep for an infinite
amount of time.
* [WIN32K] Fix gdi/dib assembly code and 'C' code horizontal line draw function crashes.
Do not do subtracts that cause a wrap to a negative value when determining length.
This affects bit depths of 8, 16, 24, and 32 Bits per Plane.
CORE-19634
CORE-13532
The current implementation does not notify the dhcp client of the changed registry setting. Windows IPCONFIG calls DhcpHandlePnpEvent after setting the DhcpClassId registry value.
- Implement RtlpExecuteHandlerForUnwind in asm
- Implement RtlpExecuteHandlerForUnwindHandler
- Use the correct context in DISPATCHER_CONTEXT when unwinding
- Handle collided unwinds
One more step to support ghost windows.
JIRA issue: CORE-19671
- Add IntForceMinimizeWindow helper
function.
- Use IntForceMinimizeWindow in
co_WinPosShowWindow function.
- Enhance ShowWindow testcase in
user32_apitest.
- Add mask to the return value of
GetWindowLong.
Implementing missing features...
JIRA issue: CORE-19361
- Implement TF_CreateCategoryMgr
and TF_CreateDisplayAttributeMgr.
- Rename g_tlsIndex as g_dwTLSIndex.
- Use ProcessAttach and
ProcessDetach in DllMain.
The WDM header contains power manager related GUIDs that were declared but never initialized properly due to the fact the initguid.h header wasn't at the top.
This patch fixes a linker error in the kernel where GUIDs like GUID_LIDSWITCH_STATE_CHANGE are used.
It's a hotfix for 624c3fd.
This library aims to include all the public and global power manager related GUID identifiers into one shared library, of which they can be accessed across multiple modules of ReactOS, e.g. the kernel, ACPI, PCI, et al.
This patch is needed for the development of the Power Manager (#5719) to continue.
CORE-18969
This just makes it so ACPI.sys is always loaded and copied by the bootcd no matter what on amd64.
On x86 it can depend on whether we're using an ACPI hal but is set up to never boot with ACPI on the bootcd.
Add a SCSI and ATA passthrough support helper library for direct use
from low-level storage drivers.
Tested with: CDRoller, CloneCD, Magic ISO
NOTE: Vbox seems to lack support for CD/DVD burning; tested on real hardware.
CORE-10191 CORE-16452
CORE-14788 CORE-18241
CORE-17256 CORE-13866
Noticed by Katayama's comment from chat.reactos.org:
> Indonesian translation warning: base\setup\reactos\lang/id-ID(15): warning RC4206: title string too long; trunctated at 256
Fix problem by making the string length shorter, it's 245 chars now.
Addendum to 0.4.16-dev-862-g 7b5e004dd6.
- Sync winerror.h to wine-10.0
- Fix a couple hacks that existed because we didn't do this sooner
- Fix an instance where Wine compares a pointer to S_OK to see if it's null
This workarounds broken changing volume level for left and right volume controls separately ("Speakers Volume" button in "Sound" tab of mmsys.cpl).
CORE-19190
Fix broken volume level changing and left/right speakers balance level changing.
Get and set volume level value for all available output channels instead of only the 1st channel (available in MIXERCONTROLDETAILS.cChannels member), so other channels don't have a non-set volume values now. This allows to control the volume for all channels.
So now the volume control works correctly and hence, the volume level can be properly changed from Sound Properties (mmsys.cpl) and Volume Mixer (sndvol32.exe) as well.
Note that the volume level settings changed by user are not saved after reboot yet. We need to save (write) and then load (read) them at next boot from HKLM/System/CurrentControlSet/Control/DeviceClasses/KSCATEGORY_AUDIO/.../DeviceParameters/Mixer/.../* keys inside wdmaud.sys, similarly to as it's done in Windows XP/2003. It can be tested (and is tested sveral times by me and is confirmed) by using MS wdmaud.sys in ReactOS. It writes the values in that key, so the actual volume values are stored there.
Another key, HKCU/SOFTWARE/Microsoft/Windows/Applets/Volume Control/, is created and managed by sndvol32.exe instead, so it does not contain the actual values of volume levels.
CORE-17976
On Windows the function that calls the language specific exception handler function registers it's own exception handler, so the top of the exception chain does not point to our own handler. We need to take that into account when unwinding the stack and removing each handler as we go.
Previously, when leave was used in the except or finally block of a nested try block, it would jump back to the start of the except/finally block, resulting in an endless loop. This is fixed by jumping back to a label at the beginning of the try block, which is only visible from within the try block itself and from there to the end of the SEH block.
Fixes seh0055 testcase of MS SEH tests.
This probably seems a little silly that I'm making a change to an array
we don't really use but because of this little bug ACPI was getting
reported as 0xA which is incorrect! As we call IoConnectInterrupt with
0x9 later. This makes sure that the IRQ from FADT is correct.
Fix BSoD when toggling visibility of the IME status
window (IME Toolbar).
JIRA issue: CORE-20261
- Add IntGetImeUIFromWnd helper function.
- Fix exception in IntNotifyImeShowStatus function.
- Fix initialization of IME UI in ImeWndProc_common
function.
- Delete RegisterIMEClass function.
Add a `wlntfytests.dll` in `ReactOS\bin\suppl`, containing tests for Winlogon notifications.
To use it:
- Register the dll with `regsvr32 <path_to>\wlntfytests.dll` and reboot
the machine.
- With a debugger, observe the traces emitted by the dll, whenever any
Winlogon notification is emitted. If Winlogon debugging is enabled,
a debug-break is made everytime a notification is invoked.
- Once testing is done, unregister the dll with `regsvr32 /u <path_to>\wlntfytests.dll`
and reboot the machine.
For each received notification, the handlers dump the contents of the
`WLX_NOTIFICATION_INFO` structure, and verify that the notifications
are received in the correct expected order. This is done by keeping
what the previous received notification was, before comparing it with
the expected one(s) that must precede the new notification being received.
References:
- https://learn.microsoft.com/en-us/windows/win32/secauthn/creating-a-winlogon-notification-package
- https://learn.microsoft.com/en-us/windows/win32/secauthn/winlogon-notification-events
- https://rsdn.org/article/baseserv/winlogon.xml
* [SDK] Partial Revert of 0bf42067d2
It was found that the timer code from WINE doesn't work as well as ours,
This is a revert from that part of the PR as it doesn't change any of the real threadpool code in all reality. Thanks to the investigation of Julenuri and Simone
JIRA issue: CORE-20245
Management of System Pen icon was
inconsistent.
JIRA issue: CORE-10667
- Add g_bSysPenNotifyAdded global
variable.
- Add checking the result of
Shell_NotifyIcon.
- Fix UpdateLanguageDisplayCurrent
function.
- Add WM_INPUTLANGCHANGEREQUEST
message handling.
Testbot runs (
- [PSDK] Sync wincrypt.h to Wine 10.0, keeping our SAL annotated function definitions behind an #ifdef guard
- [XDK] Add definitions to our winnt header that Wine 10.0's winternl.h depends on.
- [INCLUDE/WINE] Sync winternl.h to Wine 10.0
- [OTHER] Fix breaking changes with the synced winternl.h.
- Properly initialize a string in SHPropertyBag test. This prevents a heap assertion failure on Vista+ when freed and connected to a debugger.
- Adjust a value against Windows 8+ instead of Vista as originally assumed in the IsQSForward test.
- Use GetVersion() to check if we are running on NT6+ and test appropriately in the PathIsUNC and PathIsUNCServer tests.
ATA passthrough IOCTLs not supported by MS scsiport.
The implementation is optional, especially in SCSI.
IOCTL_SCSI_PASS_THROUGH will be implemented in SPTI library.
CORE-16422
Follow-up of #8224.
JIRA issue: CORE-19361
- Add cicIsNullPtr function in Cicero <cicbase.h>.
- Reordering of CMakeLists.txt items.
- Minor refactoring.
- liCreateTimestamp isn't set in TCP tables on several Windows versions. If it isn't, then we can't compare it to the current system time; so don't.
- GetInterfaceName had some test failures unique to Vista, guard them.
- icmp: Accept either ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER as a last error in a couple tests.
Fix several kmtests in preparation for testbots with newer versions of Windows. There's still more kmtests to fix, but this fixes all the kmtests that bugchecked during my testing.
- Move functions from header to main source, keeping their definitions
- Fix typo DefaultPalette -> VidpDefaultPalette
- Add missing PrepareForSetPixel() function
Addendum to 5f2ca473dc and cd91271796. CORE-17617 CORE-17604
"Far East Asian" Visual Studio had
generated a lot of "warning C4819:
File contains characters that
cannot be displayed in the current
code page...".
JIRA issue: N/A
Note: On Windows, where a long double is the same as a double, nextafterl is the same as nextafter, nexttowardl is the same as nexttoward.
Also nexttoward is the same as nextafter.
Taskbar task button context menu was wrongly
overlapped by Taskbar. #8105 introduced this bug.
JIRA issue: CORE-20260
- Don't bring the taskbar to top on no rude app.
- Check the target window by FindTaskItem in
OnWindowActivated and OnWindowDestroyed.
In particular:
- unhardcode buffer sizes and API flags;
- add our standard file header in the .c file (I haven't done it for
the other files);
- merge systeminfo.rc and rsrc.rc together.
- Improve help/usage display formatting for all languages.
- Fix sk-SK Slovak typos and file encoding.
With Notepad++:
* "Encoding->Convert to ANSI", then Save;
* "Encoding->Character encoding->Central Europe Languages->OEM 852", then Save;
* "Encoding->Convert to UTF-8 (without BOM)"
- Fix and finish French (fr-FR) translation.
- Improve help/usage display formatting for all languages.
- Change "IP" to "IPv4" where applicable (our IPCONFIG doesn't support
IPv6 yet, but prepare the terrain in the translations :)
- Fix and finish French (fr-FR) translation.
Implement SystemLoadGdiDriverInSystemSpaceInformation case of NtSetSystemInformation() function.
According to https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/gdi_driver.htm, it does the similar thing to SystemLoadGdiDriverInformation (these two cases even have the same shared SYSTEM_GDI_DRIVER_INFORMATION structure).
The only difference is, SystemLoadGdiDriverInSystemSpaceInformation uses the global system space (without passing an additional flag to MmLoadSystemImage()), while SystemLoadGdiDriverInformation uses the session space instead.
Since the session space is not supported yet, for now simply redirect SystemLoadGdiDriverInSystemSpaceInformation to SystemLoadGdiDriverInformation case, which we have already implemented. However, this code needs to be updated appropriately (an additional flag should be passed to MmLoadSystemImage() call for SystemGdiDriverInformation as well) once a support for session space is implemented.
This fixes VM starting failure for VirtualBox 3.1.0 - 4.0.24 and 4.3.0 - 4.3.12 versions. Newer versions of VirtualBox still don't work because of another blocking bugs.
CORE-20257
Related to #8145. We shouldn't use
user32 functions in
DllMain.DLL_PROCESS_ATTACH.
This bug affects Global Hook. See
DllMain and "Dynamic-Link Library
Best Practices" on MS Learn.
JIRA issue: CORE-20242
Don't use user32!FindWindow in
DllMain.DLL_PROCESS_ATTACH,
but in KbSwitchSetHooks function.
It's frustrating when windows open
during a test and remain after the test
is over.
JIRA issue: ROSTESTS-402
- Delete closewnd.cpp. Enhance
closewnd.h.
- Modify ShellExecCmdLine,
ShellExec_RunDLL, ShellExecuteEx,
and ShellExecuteW testcases.
- Certainly close the newly-opened
windows.
A bit clearer code. A bit faster execution.
- NtUserGetTitleBarInfo(): Add/Use early returns.
Addendum to
3b4c9ded42 (r33657).
- NtUserTrackPopupMenuEx():
Check flags a bit earlier.
Addendum to
3c35117f97
(0.4.16-dev-1275).
- NtUserThunkedMenuItemInfo():
Sort out code and comments
- menu.c: Move UserLeave() a bit earlier.
- MSGINA: The `pMprNotifyInfo` and `pProfile` structures returned by
`WlxLoggedOutSAS()`, as well as all of their pointer fields, are
allocated by `LocalAlloc()`[^1][^2]. This is what Windows' Winlogon
expects (and ours too, for interoperability with GINA dlls written
for Windows), as it then frees them using `LocalFree()`.
- WINLOGON: In `HandleLogon()`, free the cached `MprNotifyInfo` and
`Profile` buffers (and all their members) obtained from a previous
call to `WlxLoggedOutSAS()`.
[^1]: https://learn.microsoft.com/en-us/windows/win32/api/winwlx/nf-winwlx-wlxloggedoutsas
[^2]: 3rd-party GINAs rely on this as well. One example can be found at:
https://www.codeproject.com/Articles/20656/Winlogon-using-Mobile-Disk
CORE-12686
Test the following compilation scenarii:
- using the `pathcch_static` library (function implementations
statically linked into the test);
- using the `pathcch_kernelbase` library (linking directly to
kernelbase.dll);
- using the `pathcch` MS PSDK-compatible library (linking to
the api-ms-win-core-path-l1-1-0.dll APISET dll).
CORE-12686
This collection of libraries consist in:
- a down-level `pathcch_static` PathCch library, to be used for programs
that need to run on Windows 7 and below;
- Windows 8+ compatible libraries importing from either kernelbase.dll
(`pathcch_kernelbase`), or from the corresponding APISET
api-ms-win-core-path-l1-1-0.dll (`pathcch`, which is Win8+ PSDK
compatible).
The down-level static library is compiled by reusing the newly-introduced
kernelbase's path.c, instead of using a specific pathcch.c.
Unrelated functions are excluded from compilation by putting them into
`#ifndef STATIC_PATHCCH ..... #endif` blocks.
Since VS 17.14.36203.30 / MSVC 19.44.35209.0 the default behavior on ARM64 is to not inline _Interlocked* functions. Until we have those implemented, we disable this feature, going back to the old behavior.
For additional details / tracking of the implementation see CORE-20255
Note: The code contains a custom implementation of ldexp in python, because on Windows (below Win 11) ldexp is broken and rounds denormals incorrectly. ldexp is used by mpmath to convert multi-precision to float, which led to incorrect floating point results (specifically denormals).
The following code in user32_winetest scroll.c was causing it:
ret = EnableScrollBar( mainwnd, SB_CTL, ESB_ENABLE_BOTH );
ok( !ret, "EnableScrollBar should fail.\n" );
There was a bug that hKbSwitchWnd was not correctly initialized.
JIRA issue: N/A
- Check if hKbSwitchWnd is initialized or not.
- When hKbSwitchWnd was not initialized, initialize it on DllMain.
- Enable trace in indicdll.dll.
DefView will now map its internal (FCIDM) commands (when sent from the toolbar and accelerators) to canonical verb strings so clients outside shell32 can detect the verb. This is critical for "rename" and handy for "properties".
CORE-18326
For each device we must first try to read its AllocConfig resource list. If its AllocConfig resource list is not available, try to read its BootConfig resource list.
* [NTDLL_WINETEST] `test_query_process_debug_object_handle()`: one WINESYNC
Cherry-pick WineTest part of:
52d733b5c4
server: Implement retrieving the debug object of a process.
by: Alexandre Julliard <julliard@winehq.org>
* [NTOS:PS] Fix `NtQueryInformationProcess(ProcessDebugObjectHandle)`
Close the retrieved `DebugPort` on failure.
Addendum to commit 1e172203a (r55734).
* [NTOS:PS] Optimize `NtQueryInformationProcess(ProcessWow64Information)` on 32-bit.
No need to do the ExAcquire/ReleaseRundownProtection rigamarole since
we aren't retrieving the `Process->Wow64Process` on 32-bit builds.
Addendum to commit 1e172203a (r55734).
* [NTOS:PS] Fix `NtQueryInformationProcess(ProcessExecuteFlags)`
s/return/break/ on a failure case.
Addendum to commit 1e172203a (r55734).
* [NTOS:PS] NtQueryInformationProcess(): Optimize `*ReturnLength` assignment
Enter the SEH block only if we know we'll have to set `*ReturnLength` on return.
Addendum to commit 2278c2914 (r23175).
This feature is used to report errors when `LoadUserProfile()` fails.
It is also meant to be used by other functions in the future.
The error dialog is shown only when the `PI_NOUI` flag is _NOT_ set
in `PROFILEINFO::dwFlags`.
- Add support for retrieving USERENV-specific registry policies,
in a systematic way.
- Add support for "timed" dialogs that automatically close after
a given timeout has elapsed.
The default timeout is controlled by the `"ProfileDlgTimeOut"` policy:
https://www.visualautomation.com/comprod/secure6/profile_.htmhttps://www.infania.net/misc/kbarchive/kb/196/Q196284/index.html
- TODO for the future: report the error in the event log.
- `LoadUserProfileW()`: Reset `ret` to `FALSE` after the call to
`CreateUserProfileW()`; this allows to return failure in case
any other function calls down the line fails. (`ret` is set to
`TRUE` only when everything has succeeded.)
This PR resolves a bug of #8094. #8094
correctly validates the flags. TPM_SYSTEM_MENU is an internal flag
and not a valid flag for TrackPopupMenu.
Thus, calling TrackPopupMenu.TPM_SYSTEM_MENU
in User32DefWindowProc was wrong.
This caused failure of taskbar context
menu.
JIRA issue: CORE-20238
- Move WM_POPUPSYSTEMMENU
message handling of user32 into
win32k.sys!IntDefWindowProc.
- Use win32k.sys!IntTrackPopupMenuEx
instead of user32!TrackPopupMenu
in handling of WM_POPUPSYSTEMMENU.
* Disable most apphelp:env and some apphelp:db tests on x64 due to structure differences breaking these tests.
* Add new tag lists for Windows 8.1 and Windows 10 in apphelp:apphelp test.
* Make a few changes to accept either Windows 10 or Windows 8.1 and older behavior in apphelp:apphelp test.
* Create new shimdata structures for Windows 8 and Windows Vista.
* Add attribute size definitions for Vista, 8.1, and 10.
* Create new shim data validation functions for Vista and 8.1.
* Use local time instead of UTC time for shim db version. This fixes test failures when the day in local time and the day in UTC are different.
- Replace WH_KEYBOARD_LL hook and
handler with WH_KEYBOARD and
adapted KeyboardProc.
- Update key-state checks to use
HIWORD(lParam) flags and
GetKeyState.
Implementing missing features...
JIRA issue: CORE-19361
- Delete documentmgr.c and add
documentmgr.cpp.
- Make ITfDocumentMgr and
IEnumTfContexts C++ code.
CORE-18351 CORE-18237 CORE-17137 CORE-16567
CORE-15360 CORE-5071 CORE-3804
Reset `LogonState` back to `STATE_LOGGED_OFF` before invoking
`WlxDisplaySASNotice()` when:
- in `STATE_LOGGED_OFF_SAS` state, `HandleLogon()` failed;
- or when an attempted shutdown operation failed.
This fixes the resulting inconsistent `LogonState` that happened if
any of these operations failed due to legitimate reasons. For example,
a corrupted user profile that caused the login attempt to abort, or,
an ongoing shutdown attempt being aborted as well.
One of the user-visible effects of this inconsistency, was the inability
to access the familiar Logged-Out SAS dialog by pressing Ctrl-Alt-Del at
the invite (SAS notice) dialog, because the `LogonState` was incorrectly
left into the `STATE_LOGGED_OFF_SAS` state, instead of being reset to
`STATE_LOGGED_OFF`.
----
Typical scenario:
The "Administrator" user, who is auto-logged-in by default after the
installation, gets a corrupted ntuser.dat profile registry hive if the
2nd-stage installation is aborted at the end by force-restarting ReactOS.
After reboot, ReactOS tries to log into the account, but fails, and goes
back to the Ctrl-Alt-Del invite dialog.
Before this fix, the user couldn't go into the Logged-Out SAS dialog to
enter new login credentials and attempt login to another account.
This is now fixed.
- Locking (`WLX_SAS_ACTION_LOCK_WKSTA`) is allowed only if `LogonState`
is either `STATE_LOGGED_ON` or `STATE_LOGGED_ON_SAS`, i.e., either the
user invokes the `user32:LockWorkStation()` API or presses Win-L, or,
opens the Logged-On SAS dialog then clicks on the "Lock Workstation" button.
- Unlocking (`WLX_SAS_ACTION_UNLOCK_WKSTA`) is allowed only if
`LogonState` is either `STATE_LOCKED` or `STATE_LOCKED_SAS`,
i.e., the workstation is locked and we are either on the Locked-
notice or on the SAS dialog that asks for the user credentials.
Additionally:
- Fix the invocation order of `LockHandler`/`UnlockHandler` notifications:
* the `LockHandler` is invoked on the Winlogon desktop, just before
displaying the Locked-notice dialog;
* the `UnlockHandler` is invoked on the Winlogon desktop, just before
switching back to the user's desktop.
- If we are on the Logged-On SAS dialog and the user presses Win-L to
lock the workstation (instead of pressing the corresponding dialog
button), the `DoGenericAction(WLX_SAS_ACTION_LOCK_WKSTA)` handler is
invoked asynchronously while the SAS dialog is still being displayed.
We thus need to ensure all the existing dialogs are closed before
displaying the Locked-notice dialog, in order to avoid stray dialogs
being shown concurrently.
CORE-13478
Addendum to commit 46dcab7ab.
The `WLX_SAS_ACTION_TASKLIST` action can be invoked in three scenarii to
open the Task-Manager:
1. from the logged-on state (`LogonState == STATE_LOGGED_ON`), when the
user presses Ctrl-Shift-Esc while being on its own desktop (usual case);
2. from the Logged-On SAS dialog (`LogonState == STATE_LOGGED_ON_SAS`),
when the user presses the "Task-Manager" button: here Winlogon should
switch back to the user's desktop, restoring `STATE_LOGGED_ON` and
start the TaskMgr;
3. or when the user presses Ctrl-Shift-Esc **while being on the Logged-On
SAS dialog**: in this case, the Task-Manager is started on the
currently-hidden user's desktop (and so, will be hidden), but the SAS
dialog stays open. The user will see the opened TaskMgr once (s)he
closes the SAS dialog and Winlogon switches back to the user's desktop.
In order to support these scenarii, the `WLX_SAS_ACTION_TASKLIST` action
handling is reworked:
- `SASWindowProc(WM_HOTKEY, IDHK_CTRL_SHIFT_ESC)` always invokes the
`DoGenericAction(WLX_SAS_ACTION_TASKLIST)`: this allows centralizing
inside `DoGenericAction()` the condition checks for starting TaskMgr.
- `DoGenericAction(WLX_SAS_ACTION_TASKLIST)` just starts the Task-Manager
only if the Winlogon's `LogonState` is either `STATE_LOGGED_ON` or
`STATE_LOGGED_ON_SAS`. It doesn't attempt there to switch desktops nor
change the `LogonState` value, in order to support scenarii 2 and 3.
- The switch from/to Winlogon/user's desktops when going to the
`LogonState: STATE_LOGGED_ON -> STATE_LOGGED_ON_SAS` change is done
in `DispatchSAS()`, just before invoking the GINA's `WlxLoggedOnSAS()`
(see below for more details) and just after it returns, only in the
necessary cases.
----
[MSGINA] The WlxLoggedOnSAS() dialog shouldn't switch the desktops itself.
This behaviour can be observed on Windows with Winlogon debugging + tracing
enabled. It is Winlogon instead that does the desktop switch itself, as for
all the other SAS dialogs, in addition to changing its internal `LogonState`.
Fix for commit 7aecedf79 (r58785).
Win2K internat.exe uses this section.
WinXP and Win2k3 have this section.
JIRA issue: CORE-19268
- Add [KbdLayoutIds] section and add values to intl.inf.
- Add some missing "Layout Id" for "SYSTEM\
CurrentControlSet\Control\Keyboard Layouts" of
hivesys.inf.
Import the following Wine commits:
oleaut32: Implement LPSAFEARRAY user marshal interface marshaling.
a1f2b44a1b
oleaut32/tests: Add tests for LPSAFEARRAY user marshal interface marshaling.
b2574278f7
containing the implementation itself and a test for it.
Fixes:
1) improperly displayed comboboxes with OS type and version selection,
2) failure to save/load virtual machine settings in/from XML file
in VirtualBox 3.0.0 - 4.0.36 versions and
3) improperly displayed comboboxes in 3DMark2001.
As result, this also allows to create and start a virtual machine(s) in VirtualBox up to 3.0.8 version. For newer VirtualBox versions, another fix is required.
CORE-8418, CORE-11254, CORE-14507, CORE-17980, CORE-18496, CORE-20015
Adds support for handling fullscreen
applications (a.k.a. “rude apps”) so
the taskbar can hide or show
appropriately.
JIRA issue: CORE-11242, CORE-15681,
CORE-16056, CORE-16063, CORE-16131,
CORE-16132, CORE-16192, CORE-16196,
CORE-16249, CORE-16290, CORE-16313,
CORE-16320, CORE-16322, CORE-16347,
CORE-16584, CORE-19795, CORE-9862,
CORE-16230, CORE-10738,
and CORE-12263.
- Removes legacy pulse/timer logic in
the tray window and adds a fullscreen
notification workflow.
- Implements fullscreen detection
across monitors in the task switcher,
using a sequence of validation timers.
- Defines a new ITrayWindow::
NotifyFullScreenToAppBars interface
method to broadcast fullscreen state
to appbars.
Fix CRASH of msctf:inputprocessor tests.
JIRA issue: CORE-19361
- Implement Range_Constructor and
TF_SELECTION_to_TS_SELECTION_ACP functions.
- Adapt CRange to these changes.
The caret move on IME was slow until this PR.
JIRA issue: CORE-19268
- Don't use ImmIsIME but use IS_IME_HKL(hKL) in
EDIT_SetCaretPos function. This change improves
the caret speed.
- Prohibit display of composition window for Korean
in the handling of WM_IME_SETCONTEXT and
WM_IME_STARTCOMPOSITION, because Korean
doesn't want it.
Improve CTF IME customization.
Use the proper names for CTF IME.
JIRA issue: CORE-19268
- In the registry key "HKLM\SOFTWARE\Microsoft\
Windows NT\CurrentVersion\IMM", add
DontLoadCTFIME value and set it to 1.
- Delete LoadCTFIME value to avoid user
confusing.
- Rename UserIsCiceroEnabled function
as UserIsCTFIMEEnabled.
- Rename SRVINFO_CICERO_ENABLED
flag as SRVINFO_CTFIME_ENABLED.
Finishing IME menu work. The IME menu of the system
pen icon has to append the default items if DMI_LEFT and
RDMI_RIGHT are not specified.
JIRA issue: CORE-20142
- Add IsRegImeToolbarShown and ShowImeToolbar
helper functions.
- Add more code into KbSwitch_OnPenIconMsg function
to handle IME menu default items.
- Add some resource strings.
Validate flags.
JIRA issue: CORE-3247
- In NtUserTrackPopupMenuEx function, validate the flags.
- If validation failed, then set last error and return FALSE.
- Add SAL annotations to NtUserTrackPopupMenuEx.
- Keep reference to menu in the function.
- Add TrackPopupMenuEx testcase to user32_apitest.
This PR is just a step, but a slightly
great one for OS development history.
JIRA issue: CORE-19361
- Add IAnchor interface into textstor.idl.
- Fix ITfRangeAnchor interface (that
was wrong).
- Delete range.c.
- Add range.cpp.
- Add CRange class as stubs.
[RICHED20] Sync to Wine-10.0
Sync wine/rbtree.h to Wine-10.0 as changes in riched20 require this. Also added a define to allow directx code to compile.
Sync riched20 to Wine-10.0 and its tests using the script.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 9f72c5601173728c52626342a1ec6c9a4c70670f by Francois Gouget <fgouget@free.fr>
Update WINESYNC.txt
Update precomp.h
fix build
[WINESYNC]: riched20 is now in sync with wine-staging wine-10.0
[WINESYNC] riched20: Only call ME_SendRequestResize when control is in-place active.
Prevent GetClientRect from being called when not in-place active.
wine commit id e61db557ab8473a490c84301dbb4b4665b6c9c9f by Charlotte Pabst <cpabst@codeweavers.com>
[WINESYNC] riched20: Exit from editor_ensure_visible when control is not in-place active.
According to microsoft documentation, ScrollWindowEx, SetScrollPos and SetScrollRange may only
be called while the control is in-place active.
This fixes a segmentation fault in an application.
wine commit id dafaadcb4addd9af334433666a4bc2e7aa6eb9ff by Charlotte Pabst <cpabst@codeweavers.com>
[WINESYNC] riched20/tests: Test that ScrollWindowEx and GetClientRect are only called when control is in-place active.
wine commit id f1301cedbea51be107017bb8545956bcfd02b610 by Charlotte Pabst <cpabst@codeweavers.com>
Update editor.c
[WINESYNC] riched20: Release IME input context when done using it.
wine commit id 3f51fb96c162e8d3314627b3db25564fa7d9d419 by Zhiyi Zhang <zzhang@codeweavers.com>
[WINESYNC] riched20: In para_set_fmt protect against out of bound cTabStop values.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56730
wine commit id 7b2ff977739df25252d46552d2447af50c23040e by Fabian Maurer <dark.shadow4@web.de>
Update editor.c
[WINESYNC] riched20: Don't write past end of buffer.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
wine commit id 5cbe3a6cb186cffed20e3fea5f88abd0880d3914 by Eric Pouech <epouech@codeweavers.com>
[WINESYNC] riched20: Don't crash when no OLE obj is present.
This was generating a lot of crashes in riched20 tests.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
wine commit id 015aae30cf2217164f631d1c03abfc9ea63bb43d by Eric Pouech <epouech@codeweavers.com>
Update editor.c
[WINESYNC] riched20: Use CRT allocation functions.
wine commit id 42579f1dcd2f14e765e2f53ceb5b46fff5623f10 by Alex Henrie <alexhenrie24@gmail.com>
[WINESYNC] riched20/tests: Make the editor paste test failures more informative and unique.
Knowing the content of the edit field is more useful than knowing the
strcmp() result. The text field may contain carriage returns and
linefeeds so use wine_dbgstr_a() so they are clearly visible in the
failure message.
Also prefix the ok messages with a unique string to indicate which
test_WM_PASTE() test failed.
wine commit id b8950d04e439f649f2167477a36ee453ad8b81ef by Francois Gouget <fgouget@codeweavers.com>
[WINESYNC] riched20: Don't call wrap_marked_paras_dc() before the editor is fully initialized.
Today, CreateTextServices() sometimes triggers an assertion failure in
select_style().
When ME_MakeEditor() calls ME_MakeFirstParagraph(), the editor
(ME_TextEditor) is not in a fully initialized state. For example, the
font cache (pFontCache) is not fully initialized, which sometimes makes
select_style() believe that the cache slots are fully occupied.
Fix this by delaying the call to wrap_marked_paras_dc() until the editor
is fully initialized.
Also, delay the call to ITextHost::TxReleaseDC() until after
wrap_marked_paras_dc(), since we need the device context a bit longer.
Fixes: b70eb32c5f3e506181d9e1e9fbef62e9baf3674d
wine commit id 548d7179e3b2b9961321a4df50644c9b3874a295 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Factor out device context acquisition from ME_MakeFirstParagraph.
This lets ME_MakeEditor() reuse the device context throughout the editor
initialization process.
wine commit id 03036f42e1afa9c79246dcee6b9fe876286b1aa4 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Don't call ME_UpdateRepaint inside set_selection().
This partially reverts c5daf6a30f21 (riched20: Call ME_UpdateRepaint
instead of editor_ensure_visible in set_selection.)
Fixes: c5daf6a30f21acd20263692b278acba49e014cc1
wine commit id ac5110131493b8b05795e8825285e41ca40ab6f1 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20/tests: Add tests for change notifications caused by EM_SETSEL{,EX}.
wine commit id c35926e49825f7a3d48ba826085fe1ae3d2a7e27 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Wrap marked paragraphs at Text Services initialization.
Today, CreateTextServices() returns an Rich Edit object without row
start and end marks, which are expected to exist by many Rich Edit
operations as well as EM_* message handlers.
This leads to a crash when certain messages (e.g., EM_SCROLLCARET) are
sent to the Rich Edit object via ITextServices::TxSendMessage(), unless
ME_WrapMarkedParagraphs() has been called beforehand.
Fix this by calling wrap_marked_paras_dc() early in the initialization
process.
This is not a problem for windowed Rich Edit controls, which already
calls ME_WrapMarkedParagraphs() before the user or application starts
interacting with it.
wine commit id b70eb32c5f3e506181d9e1e9fbef62e9baf3674d by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Use nameless unions/structs.
wine commit id 26826d3af8b1969de389f3d6702d7c8b805126e1 by Alexandre Julliard <julliard@winehq.org>
Update editor.h
[WINESYNC] riched20: Remove DECLSPEC_HIDDEN usage.
wine commit id c04ab166498b5841ecde620a9bd0b74969b01596 by Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
[WINESYNC] riched20: Call ME_UpdateRepaint instead of editor_ensure_visible in set_selection.
To prevent cases where ME_WrapMarkedParagraphs has not been called causing a NULL
pointer when editor_ensure_visible tries to get the row from the cursor.
wine commit id c5daf6a30f21acd20263692b278acba49e014cc1 by Santino Mazza <smazza@codeweavers.com>
[WINESYNC] riched20: Update paragraph position in marked tree.
nCharOfs is the key for paragraphs added to the marked tree
If it is updated, re-add the entry to update its position
wine commit id f1aa3f37ef326b7cbf8fc94e982c9f0b398181c4 by Daniel Lehman <dlehman25@gmail.com>
Update editor.c
[WINESYNC] riched20: Update the editor IME position on GCS_RESULTSTR.
So that a GCS_RESULTSTR followed by GCS_COMPSTR, without interruping the
composition, begins inserting the new composition text after the result
instead of before it.
wine commit id de45bc33a73eac5dbc3502b4a43cd48399507c73 by Rémi Bernon <rbernon@codeweavers.com>
[WINESYNC] riched20/tests: Fix a typo in a comment.
wine commit id 145e3c758b9594596835e291b2fcb3c80e4c0479 by Francois Gouget <fgouget@free.fr>
[WINESYNC] riched20/tests: Don't specify DT_WORDBREAK in _check_txgetnaturalsize().
Today, test_TxGetNaturalSize() creates a pop-up window with a fixed size
(extent) of 100 x 100. The test function then proceeds to compute the
natural size of rich edit control that fits the sample text
"TestSomeText" and compare it to the RECT calculated by DrawText.
Apparently, this test fails if the width of the sample text
"TestSomeText" exceeds the width of the test window's client area. In
this case, DrawText() with DT_WORDBREAK breaks the text into the two
lines due to text wrapping; however, Rich Edit's
ITextServices::TxGetNaturalSize implementation does not seem to perform
text wrapping on overflow. This results in extent mismatch.
(Note that the test may either succeed or fail depending on the current
font used for DEFAULT_GUI_FONT, which defaults to Tahoma according to
Microsoft's documentation. To reproduce this failure, it may be
necessary to switch fonts or change the width of the pop-up window.)
Fix this by omitting the DT_WORDBREAK flag for the DrawText() call in
_check_txgetnaturalsize().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54637
wine commit id f54a1dac64c89aea3fe02ae8c0d6eef43a0aa117 by Jinoh Kang <jinoh.kang.kr@gmail.com>
Update editstr.h
[WINESYNC] riched20: Implement ITextDocument::Freeze and ITextDocument::Unfreeze.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54617
wine commit id 3fe15349d39ccf31026a92eae30f83f65c91cb1f by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Don't assume that TxDraw preserves the device context's brush selection.
Today, RichEditWndProc_common assumes that ITextServices::TxDraw
preserves the brush selection of the given device context. However,
this invariant may be broken by misbehaving embedded OLE objects in the
text document.
Fix this by not assuming that the return value of the second
SelectObject() call equals the brush passed to the first SelectObject()
call in RichEditWndProc_common's WM_PAINT / WM_PRINTCLIENT case.
wine commit id 2027be7e0370c92595f126a0b0dd167a635d50a2 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20/tests: Test for ITextDocument::Freeze and ITextDocument::Unfreeze.
wine commit id 3105fad82b9bae390fcd710a2fc10a18988b4622 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Don't set para unless committing cursor move in ME_MoveCursorWords.
Introduce a temporary variable, `other_para`, so that we don't end up
returning incorrect para (with stale run) inside the output cursor.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54564
wine commit id 7e28fa5c558f1417f8f033cb843424778bbfb8b8 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20/tests: Test for word movement across paragraph boundary.
wine commit id 21d25b17c2cae8eb2d2376ce42b76e3f61eb0bba by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20/tests: Fix the EM_GETSELTEXT tests in Hindi on Windows.
On Windows EM_GETSELTEXT fails with an invalid parameter error in the
Hindi locale but works in most other locales, including UTF-8 ones.
So check for this issue and adjust the expected results accordingly.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54559
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54565
wine commit id 37cd13abdf5d91c7b3f25b39fa14976bc3a3e3a3 by Francois Gouget <fgouget@codeweavers.com>
[WINESYNC] riched20/tests: EM_GETSELTEXT's wparam is not used and should be 0.
wine commit id baa41970647a7e548701a72bea2e4aa2a61ca27e by Francois Gouget <fgouget@codeweavers.com>
[WINESYNC] riched20/tests: Add context to the EM_FORMATRANGE tests.
wine commit id 020145248371bbfd2e473e79ba873e8313dde72d by Francois Gouget <fgouget@codeweavers.com>
[WINESYNC] riched20/tests: Check clipboard content after destroying the editor window.
Destroying the editor window should render all the formats so they are
still available after.
wine commit id b5b5b0b365639b889a0240d4992e16174b428f75 by Francois Gouget <fgouget@codeweavers.com>
[WINESYNC] riched20/tests: Add retry loop around OpenClipboard() to avoid access denial.
Reusing existing helper from user32 & comctl32.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47888
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
wine commit id 25743d46f4103c7345c955b87b4134a065fb5f1d by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] riched20/tests: Ensure clipboard has been pasted before testing the result.
The patch does reduce error failures locally.
For the record:
- WM_PASTE in undo operations haven't been transformed (as it requires
UNDO stack manipulation in a coherent way across platforms)
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47888
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
wine commit id 4fd5252f635817b431673accaba718c7481f48f6 by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] riched20: Support SFF_SELECTION when streaming in plain text.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
wine commit id 1b7a918bd7ec8bc2c51bcb76525b56b17c5ff0c0 by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] riched20/tests: Add tests when pasting in plain text mode.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
wine commit id 82fa1048b5cc7d9c6a2a289403f25adbdd8158c7 by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] riched20: Obtain the composition start index after deleting selection.
Today, the Rich Edit control handles the WM_IME_STARTCOMPOSITION message
by the computing the composition start position (imeStartIndex) _before_
calling ME_DeleteSelection(), which shifts the character positions after
the range of deletion. If the selection were not empty, imeStartIndex
immediately becomes stale, since it does not take into account the
number of deleted characters before it.
Fix this by computing imeStartIndex after the ME_DeleteSelection() call.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54318
wine commit id 8c43577f0f9b4422d3641457c595c3998bd54a18 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Call GlobalReAlloc with GMEM_MOVEABLE flag.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53474
wine commit id dfd44bb979ee2052eceff094083147e9879fa807 by Rémi Bernon <rbernon@codeweavers.com>
[WINESYNC] riched20: Fix failing test in UTF8 locales.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52875
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
wine commit id 5902cfd2990261189ce9af27981a95ac12fa2a5d by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] riched20: Don't emit EN_CHANGE events during window creation.
wine commit id 5c997de8dc1e4885266fa884a2fb74f840e3bedc by Evan Tang <etang@codeweavers.com>
[WINESYNC] riched20: Add test for EN_CHANGE events during window creation.
GenoPro isn't very happy if it receives one
wine commit id 0b069106b0e0f141d6925d3e10166be89fc59145 by Evan Tang <etang@codeweavers.com>
[WINESYNC] riched20: Move test class creation to a helper function.
wine commit id f9083961ed187777d660796f7136addc04fff8b0 by Evan Tang <etang@codeweavers.com>
[WINESYNC] riched20/tests: Use ARRAY_SIZE instead of open coding it.
wine commit id 90b6288f54afdc4430dac146779a92b89f4d1219 by Michael Stefaniuc <mstefani@winehq.org>
[WINESYNC] riched20/test: Add scrolling test for richole.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
wine commit id 059c70d736baa164a1b246e949acd006cf83ab5a by Santino Mazza <mazzasantino1206@gmail.com>
[WINESYNC] riched20: Ensure that cursor is visible when selecting text.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40444
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
wine commit id 25209c162fc209124b369abbad55d915d31909b2 by Santino Mazza <mazzasantino1206@gmail.com>
[WINESYNC] riched20/tests: When selection is out of view, the scrollbar should move.
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>
wine commit id ee131e9eba7dad090f0baf4a73fab2d62dc73b52 by Santino Mazza <mazzasantino1206@gmail.com>
[WINESYNC] riched20: Remove duplicate code.
Signed-off-by: David Kahurani <k.kahurani@gmail.com>
wine commit id 3588479e1a674e5f43f1acb9e7c0aa8cecf98f25 by David Kahurani <k.kahurani@gmail.com>
[WINESYNC] riched20: Implement ITextDocument::Undo and ITextDocument::Redo.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53289
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id ded8227774570a1ea320dc34f2de0033f85b3ce7 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Add undo control state variable to ME_TextEditor.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id 40c54854e61d8adfca21e2fa9260712e4f5453e9 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Factor out undo-ignored status check.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id 0cd86e010e41eebdc1a4c142f9cc6a4948554d0e by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Ensure MEPF_COMPLEX is unset when in password input mode.
Otherwise, Wine may crash while attempting to fetch the script shaping
information, which does not exist since shape_para() was not called.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53335
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id f77f12ba3b1dad9ebdcb116c66b137e9103a0d1b by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20/tests: Test for ITextDocument::Undo and ITextDocument::Redo.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id 73284ea18891a152dce989ffff59e2c527f94c73 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Commit and wrap paragraphs after changing text properties.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53170
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id 0974f047b57357252ec94bea119e5291250a446c by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Draw OLE objects with IViewObject implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52752
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id ecc607c6da96a5c2e8988f3021e98b442fe24c12 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Fetch extent from object if REOBJECT::sizel is unset.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id 164897e6c94d3eee4798f82a730472a5a847f9b2 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20/tests: Add tests for drawing embedded OLE objects.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
wine commit id a7d29d1625f7e02df4fbf59ef4e4a999d39edde0 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20/tests: Fix the spelling of a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f9fa5f9e523b45766f715c6981c6a6ab5f183157 by Francois Gouget <fgouget@free.fr>
[WINESYNC] riched20: Implement callback to IRichEditOleCallback_QueryInsertObject.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 10667b39aad6710668f60c1ba8f10e50aeb87242 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20/tests: Add tests for IRichEditOleCallback_QueryInsertObject.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 95b4072cc774ba7a7eabb0d4c114b933b7d71105 by Jinoh Kang <jinoh.kang.kr@gmail.com>
Update richole.c
[WINESYNC] riched20: Set REOBJECT's cp correctly in IRichEditOle::GetObject.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52705
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 194ba06c403fd72fbfb95048385c9ca4838af169 by Jinoh Kang <jinoh.kang.kr@gmail.com>
[WINESYNC] riched20: Add back-reference to outer ME_Run from struct re_object.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 05796c4e2a4acb91e6035c536b4d0e1f7e16896d by Jinoh Kang <jinoh.kang.kr@gmail.com>
fix
[WINESYNC] riched20/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 9e90cecdc603d79c6332a03884ed8d4851ef2e88 by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] riched20/tests: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8b66db027d4112bfd4287b03d5c7b6f33994adc3 by Eric Pouech <eric.pouech@gmail.com>
fix build, sync rbtree.h
[WINESYNC] riched20: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 42d0e56643740a0eac5913a9f176e789457cb475 by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] riched20/tests: Add a test to see what richedit class flavours should be available.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d54a0e2bea4548bb5d9c0cca9f918d7c46591e23 by Dmitry Timoshkov <dmitry@baikal.ru>
[WINESYNC] riched20: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 63a643f7f42ecd0c2625a5f5704b5b9647349e7b by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] riched20/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2d6fad7bda2f2e21a871f405a6b0c3e70ebf6a6a by Fabian Maurer <dark.shadow4@web.de>
[WINESYNC] include: Remove the wine_ prefix on rbtree functions.
Add defines for frequently-used functions.
For compatibility with vkd3d.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3527230c461b6baba9c29e69b575ada85bdbbc43 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] riched20: Defer releasing the host if inside a notify callback.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51521
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8138159f20d6453443861570689e0f14018051da by Huw Davies <huw@codeweavers.com>
[WINESYNC] riched20: Return the nearest char pos if the coords are outside the format rect.
For the two tests that remain todo_wine, the results differ between
riched20 and msftedit, with Wine's implementation matching msftedit.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52041
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 363508454d5f8f1fc5916bda47e6429756b7dc8f by Huw Davies <huw@codeweavers.com>
[WINESYNC] riched20: Check font_cache in select_style() too.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 177f808aa86e5442be1a0a92ddccc4904bf2e743 by Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
[WINESYNC] riched20: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5b15bf33255bd373cbf26ec373d16a8234ec6b1c by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] riched20: Use regular allocation helpers for text services objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2064c206c0b67edb8524f572166b974ba9cbd6fe by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] riched20: Remove New() allocation macro.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1d5c9defb19fca6cfb1107384fc2325d391726d6 by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] riched20: Don't create custom heap.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8bff437e9d5e047e689d8b32f62995785c0cd48e by Dmitry Timoshkov <dmitry@baikal.ru>
[WINESYNC] riched20/tests: Don't cast NULL.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id b701c3df99fbd6d4df7eaa11327bb11db95d8676 by Michael Stefaniuc <mstefani@winehq.org>
[WINESYNC] riched20/tests: Add more tests for testing EM_GETTEXTEX with OLE objects.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 40988d6c3886d0f7a914c45ea68264bfc8540859 by Jactry Zeng <jzeng@codeweavers.com>
Update richole.c
[WINESYNC] riched20: Allow to insert OLE object at specified offset.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8c894382dde5b9da88b0e9f23a753d5e851a43d6 by Jactry Zeng <jzeng@codeweavers.com>
Update richole.c
[WINESYNC] riched20/tests: Lock hGlobal before use.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f9c8c95856ded333be35ff41ab40a246bfe345b6 by Jactry Zeng <jzeng@codeweavers.com>
Co-authored-by: winesync <ros-dev@reactos.org>
## Purpose
Supporting System Pen icon and IME menus for
East-Asian users.
JIRA issue: CORE-20142
## Overview
The East-Asian system has the system pen icon
in taskbar additionally. The system pen icon
shows the current IME status.
If the user clicked the IME system pen icon,
the IME menu will open. The IME system pen icon
can be customized by the IME module by posting
indicator messages.
## Proposed changes
- Add default pen icon resources.
- Add base/applications/kbswitch/imemenu.c to
handle IME menus.
- Add code for adding, modifying and deleting
the System Pen icon.
- Modify indicdll.spec.
- Fix popup menu alignment.
JIRA issue: N/A
- Replace MSGDUMP_TPRINTF with
MSGDUMP_PRINTF and use ANSI for
strings. Now, we can use printf-
compatible function for dump.
- Fix some mistakes.
- Adapt user32_apitest
MessageStateAnalyzer to these
changes.
Defining macros in proper place will improve header
compatibility.
JIRA issue: CORE-19268
- Move WM_IME_SYSTEM macro in <undocuser.h>
into <imm32_undoc.h>.
- Move IMS_... macros in <immdev.h> into
<imm32_undoc.h>.
- Include <imm32_undoc.h> in base/ctf/msutb.
Splitted from #8080. The message
handling of WM_IME_SYSTEM.0x1D
is needed for IME menu handling.
JIRA issue: CORE-20142
- Define IMS_IMEMENUITEMSELECTED
(0x1D) in <immdev.h>.
- Add WM_IME_SYSTEM.0x1D handling
in ImeWnd_OnImeSystem function.
- Rename and extend
User32GetImmFileName function as
User32GetSystemFilePath, with
adding a filename parameter.
Validate structure size.
JIRA issue: CORE-3247
- In IntTrackPopupMenuEx function,
if lpTpm was non-NULL, then
validate lpTpm->cbSize.
- If validation failed, then set last
error and return FALSE.
Splitted from #8080. We have confirmed usage of the
name of "indicdll.dll" in user32.dll, in #8080. So, we
have to rename kbsdll.dll as "indicdll.dll".
JIRA issue: CORE-20142
- `REACTOS_NO_SECURITY_SS`
Added on 9ef17ea (r475), without being used.
Not currently used either.
- `FMIFS_IMPORT_DLL`
Now lives in the 2 /base programs which use it.
Addendum to (probably earlier than) 9723b5e (r70868) and dc17af9 (r70916).
- Remove duplicated code in NtUserRegisterHotKey() and in
NtUserUnregisterHotKey() by directly calling UserRegisterHotKey()
and UserUnregisterHotKey() after the usual user-validation steps.
- In UserRegisterHotKey(), ignore hotkeys with virtual key VK_PACKET
since this is not a real keyboard input, but is instead used in
conjunction with unicode characters to simulate keystrokes for
non-keyboard input methods.
- s/StartDebugHotKeys/SetDebugHotKeys/
- Remove duplicate code between NtUserCallMsgFilter() and IntCallMsgFilter().
Refactoring and improving trace.
JIRA issue: CORE-19455
- Add SAL2 annotations to
function parameters.
- Add and improve tracing
(TRACE and ERR) for easier
debugging.
When an NTFS partition is created with Windows and modified with Linux
(see below), the NTLDR/BOOTMGR will compare the file names ignoring the
case of the files, while FreeLdr does not and the same hack is on Btrfs
file name comparison.
This PR is necessary because the case of the file names on registry, etc.
may not always be consistent!
How to reproduce:
- Try to install Windows with NTFS and install FreeLdr on it;
- Try to modify Windows partition on Linux like creating/copying some new files;
- Try to boot with FreeLdr (it will fail if the hive file path case is different
than the actual file path);
- Try to boot with NTLDR/BOOTMGR (it will work finally reaching the desktop).
Fix annotations' mistakes. Improve debug output.
JIRA issue: CORE-19268
- Fix some SAL annotations.
- Use debugstr_a and debugstr_w for tracing
strings.
- Add static to some functions.
- Remove APIENTRY of some functions.
- Fix code formatting.
* Windows Server 2003 x86 may return a DNS_ERROR_RCODE_NAME_ERROR in some tests where other versions of Windows may return ERROR_INVALID_NAME, ERROR_TIMEOUT, or DNS_ERROR_INVALID_NAME_CHAR. Pass this behavior.
* Windows 8+ sets the query to a null pointer when given an invalid query pointer while earlier Windows versions don't change the query pointer. Pass either behavior.
Follow-up of #8057. Generally, the IDL
file is a higher level than the header file.
JIRA issue: CORE-19361
- Modify CMakeLists.txt.
- Add sdk/include/reactos/CMakeLists.txt.
- Add reactos_idls CMake target in
- sdk/include/reactos/CMakeLists.txt
to process IDL files.
- Add reactos_idls dependency to cicero.
- Delete msctf_undoc.h and add
msctf_undoc.idl.
* [SDK] Update ThreadInfoClass to wine-10.0
* [SDK][MODULES] Fix a test and add wine-10 entries to headers
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
We believe the power of simplicity.
JIRA issue: CORE-20142
- Rename g_nCurrentLayoutNum as
g_iKL for simplicity.
- Make g_iKL zero-based indexing.
- Add ID_LANG_BASE id for language
menu items and adjust
ID_EXIT/ID_PREFERENCES values.
- Fix KbSwitch_OnNotifyIconMsg
function.
The CTF modules depend on Cicero
static library. Cicero should be a
component in CTF.
This move will improve code
readability and grep-ability.
JIRA issue: CORE-19361
JIRA issue: CORE-19363
- Move sdk/lib/cicero to base/ctf/cicero.
- Adapt CMakeLists.txt to this move.
- No code content change except
CMakeLists.txt.
This interface is needed for msctf.dll.
JIRA issue: CORE-19361
- Add ITfRangeAnchor interface
(based on current msctf
implementation) to
<msctf_undoc.h>.
* [WIN32K:DIB] Fix 'DIB_16BPP_AlphaBlend' copypasta in a DPRINT()
Addendum to 684c3d3 (r49275).
* [WIN32K:DIB] USE_DIBLIB: Use new DIB_16BPP_AlphaBlend()
Addendum to 7540c2e (r64953).
Splitting IME installation code for code readability.
JIRA issue: CORE-19268
- Add win32ss/user/imm32/install.c.
- Move some code to install.c.
- Add SAL annotations. Use debugstr_a/_w macro.
- Modify <imm32_undoc.h>.
- Don't CharUpperW for IME pathname due to
security reason.
This PR reorganizes the location of
the CTF-related modules to improve
grep-ability, understanding, and
readability. New folder base/ctf will
become incomplete Cicero, CTF or
TSF (Text Services Framework).
JIRA issue: CORE-19360
JIRA issue: CORE-19361
JIRA issue: CORE-19363
- Move ctfmon, msctf, msctfime,
and msutb modules to new
directory base/ctf.
- Adapt CMakeLists.txt to this move.
- Modify .github/labeler.yml and
media/doc/WINESYNC.txt.
- No code content changes except
CMakeLists.txt, .github/labeler.yml,
and media/doc/WINESYNC.txt.
- Add missing versioning defines for the different SEE_MASK_*
and CMIC_MASK_* defines.
- Move the five undocumented SEE_MASK_* defines into reactos/undocshell.h
Implementing missing features...
These functions are given for IME
program handling.
JIRA issue: CORE-19268
- Implement ImmIMPQueryIMEA
and ImmIMPQueryIMEW functions.
- Implement ImmIMPSetIMEA and
ImmIMPSetIMEW functions.
- Add prototypes to <imm32_undoc.h>.
Recently language switching (Alt+Shift)
was not working. This PR will fix
Alt+Shift (partially).
JIRA issue: CORE-18546
- Add WH_KEYBOARD_LL hook to
detect Alt+Shift.
- Add delay to the action after language
change.
- Increase g_SpecialIds not to be full.
- Delete useless ID_NEXTLAYOUT
command.
Missing things are:
- "Show details for each battery" doesn't work
- Data are not updated on timer (you need to reopen the window)
Global battery doesn't work, but that's a ntoskrnl bug (CORE-19452)
Some baby steps to msctf.dll for CTF.
JIRA issue: CORE-19361
- Add all the export functions of msctf.dll.
- Modify msctf.spec.
- Modify sdk/include/psdk/msctf.idl
and sdk/include/psdk/inputscope.idl.
- Add sdk/include/reactos/msctf_undoc.h.
- Include <msctf_undoc.h> in ctfmon,
msctfime, and msutb.
imm32 and win32ss have common
interface. This move will improve
grep-ability.
JIRA issue: N/A
- Move dll/win32/imm32 to
win32ss/user/imm32.
- Adapt CMakeLists.txt to this move.
- No code content change except
CMakeLists.txt and .github\labeler.yml.
SPI_SETDOCKMOVING allows you to turn off window snapping when moving a window with the mouse. The Win keys can still snap unless you turn everything off with SPI_SETWINARRANGING.
Send OID_GEN_PHYSICAL_MEDIUM and OID_GEN_MEDIA_SUPPORTED query requests to NDIS.
This will enable us to distinguish wired and wireless ethernet adapters.
This PR enhances Cicero IME support.
JIRA issue: CORE-19268
- Add null checks for the functions
of Cicero IMEs in Imm32LoadIME
function.
- Add and use
IS_CICERO_COMPAT_DISABLED
macro in win32ss/include/ntuser.h.
- Fix ImmGetImeInfoEx,
Imm32LoadImeDpi,
ImmGetDescriptionA,
ImmGetDescriptionW,
ImmGetIMEFileNameA,
ImmGetIMEFileNameW, and
ImmGetProperty functions for
Cicero IME support.
- Set last error in NtUserGetImeInfoEx.
JIRA issue: CORE-19455
- Add some traces for NotifyIME calls.
- Improve Imm32MakeIMENotify trace.
- Make some parameter types of
Imm32MakeIMENotify function
DWORD's.
- Fix and improve ERR_PRINTF macro.
- Disable the Removable capability
- Enable the SilentInstall and SurpriseRemovalOK capabilities
This keeps the remove device icon from showing in the notification area whenever you plug in a mouse or a keyboard.
Make FreeLoader print a notice message before it passes the control
to the kernel, if kernel-mode debugging is enabled via boot options.
This can be helpful for people who may forget that they're booting
in debug mode (the default boot option also for the bootcd) and they
need to attach a debugger for the boot process to continue.
Supporting IME menus will improve
Asian users' usability. IME menu is
used on the IME System Pen icon.
JIRA issue: CORE-20142
- Add dll/win32/imm32/imemenu.c.
- Move some code to imemenu.c.
- Implement IME menu transporting
correctly by using file mapping and
serialization.
Supporting the IME System Pen icon.
JIRA issue: CORE-19268
- Change kbswitch window class to "Indicator"
from "kbswitcher".
- Add <ime/indicml.h> from DDK.
- choose VGA adapter outside of driver initialization loop
- choose primary adapter outside of driver initialization loop
- link VGA adapter to primary adapter at the end
- only set DISPLAY_DEVICE_PRIMARY_DEVICE in this function
Also mark VgaSave driver as SystemStart instead of Disabled,
so it is available if main display driver doesn't work.
Silence "NtUserSetWindowPos bad window
handle!" error at win32k!NtUserSetWindowPos
function when Desktop has started up.
JIRA issue: CORE-19663
Add null check of window handle before
SetWindowPos call in
CShellBrowser::RepositionBars method.
- umpnpmgr.dll: Call I_ScSendPnPMessage to report pnp events to the service manager.
- adavpi32.dll: Implement I_ScSendPnPMessage which calls the service managers RI_ScSendPnPMessage function.
- services.exe: Add a debug message to RI_ScSendPnPMessage.
I want to work in correct type info.
JIRA issue: CORE-17684
- Add and fix SAL2 annotations.
- Fix const-ness of function
parameters.
- Delete needless type casts.
Enable the users to delete fonts.
JIRA issue: CORE-17684
- Add IntDeleteRegFontEntry helper function.
- Add RegDeleteValueW and RegEnumValueW helper
functions in win32ss/user/ntuser/misc/registry.c.
- Add some code to IntGdiRemoveFontResourceSingle
function.
Related to #7870. netapi32.dll uses NDK.
So, we have to reduce dependency on Wine.
JIRA issue: CORE-5743
- Introduce wine2ros module in
sdk/lib/wine2ros/.
- Reduce Wine dependency.
Fix a bug introduced in 5070e8960a.
CORE-17256
- These handlers must be memory resident. Otherwise,
this would cause a page fault that needs to be resolved.
Low-level storage drivers could evaluate ACPI control
methods while the device's IRP queue has been paused.
- Minor code enhancements.
Follow-up of #7778.
JIRA issue: CORE-7237
- Rename APPBARDATA3264 structure
as APPBARDATAINTEROP.
- Fix structures for WoW64.
- Use trace instead of DPRINT1.
- Add CAppBarManager::
RecomputeAllWorkareas function.
- Fix WM_DISPLAYCHANGE handling
to re-compute the work areas.
This implements the right click menu on the network icon that is in the taskbar.
CORE-9055
Note that Repair isn't implemented and emits a "not implemented" message,
because as far as I see ReactOS has no repair functionality for internet.
This fixes the garbage in the "Get Text" dialog which occurs if there is no text input
and one clicks on "Get Text" under Extras.
CORE-19868
Reported to Wine: https://bugs.winehq.org/show_bug.cgi?id=58144
Remove argument parsing hacks from desk.cpl that were originally introduced to
make it work with the previous broken implementation of `Control_RunDLLW`.
CORE-20076
- Remove argument parsing hacks from desk.cpl;
- Fix some issues with space separated string parsing in `Control_RunDLL`;
- Windows seems to allow invalid dialog-box names if there is only one dialog-box.
CORE-20124
Since `TB_HITTEST` returns negative numbers for ID for separator menu items [^1],
shell menu assumes mouse moved outside of the menu popup, highlighting the menu
item for currently open submenu.
To fix this behavior, we can detect separators in `CMenuFocusManager::ProcessMouseMove`
and negate the ID returned by `TB_HITTEST` to make it a positive number again,
so the shell menu wouldn't glitch.
[^1]: https://learn.microsoft.com/en-us/windows/win32/controls/tb-hittest
CORE-19833
wine commit id d551564f1b by Orin Varley <ovarley@codeweavers.com>
comctl32: Make CBS_NOINTEGRALHEIGHT only set minimum combobox height.
When the combobox height is to be set by the application (as the CBS_NOINTEGRALHEIGHT style is on),
and when a large size is specified but only a small number of items in the list, the height of the
combobox should be set by the number of items rather than the size specified to avoid empty lines.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57360
The font object `infoPtr->Font` is not owned by the `syslink` control, therefore freeing it would make the whole system use a different font. The fix provided by Wine removes the code that deletes this font object.
Imports Wine commit 480598680c
Fixes deleting system font object when destroying syslink. CORE-20127
- `CBindStatusCallback_UpdateProgress`:
* Rework the failsafe check to enable percentage to be at 100%.
* More thorough failsafe check, to avoid displaying 100% (or even 101%) where the actual and expected file sizes don't match.
- `case BINDSTATUS_ENDDOWNLOADDATA`: Do update the progress one last time to be at 100%, on download success.
CORE-20023
- Besides copying the event information, copy also its formatted data.
- Update translations with new IDS_COPY* strings.
- Eliminate all statically-sized temporary buffers, in favour of
carefully calculating the size, and allocating an adequately
sized buffer to hold the data to be copied.
- By default, the "title" and event info on the single-line fields,
are separated with TABs (to facilitate data import in spreadsheets).
Add a mode where, when the user presses the SHIFT key while clicking
on the "Copy" button, the separation is instead done with space
padding, to be able to prettify information display when copying
into text files instead.
* Check is FontGDI->OriginalWeight > FontGDI->RequestWeight and if so, then return original weight.
* Do not handle FontGDI->OriginalWeight as a boolean. Use 'FontGDI->OriginalWeight = FW_DONTCARE;'.
CORE-17011
Supporting soft keyboard will improve IME
usability.
JIRA issue: CORE-19268
- Define IMS_SOFTKBDONOFF constant as
0x13 in <immdev.h>.
- Implement
WM_IME_SYSTEM.IMS_SOFTKBDONOFF
message handling in ImeWnd_OnImeSystem.
Add missing status text for the "Multi-String Value" and
"Expandable String Value" in the "New" menu of the registry editor
for the English and German languages.
CORE-19886
Fixes erroneous addition of "Properties" item into its context menu.
- Addendum to 0241b5c4e9 and 5aaead3fdb. CORE-20152
- Also remove FIXME for CORE-19477 which is fixed now. CORE-20151
- Add accelerators to the IDD_EVENTDETAILS_CTRL controls, in _some_
translations but NOT all. Anyone is welcome to add the missing ones
in the translations to their own language!
- Fix "Data" static text tab-ordering. It should be just before the
IDC_EVENTDATAEDIT control, so that when pressing its accelerator,
focus is given to the edit control and NOT on the Bytes/Words buttons.
- Change IDC_WORDRADIO -> IDC_WORDSRADIO
CORE-20021, CORE-20023, CORE-20037
Complements commits 1786a68256 (#7757) and d1aa59982d (#7921)
- When starting eventvwr, the details buttons are disabled and the fields
are empty.
- During events enumeration, i.e. when refreshing the events list, the
Previous/Next navigation arrow buttons are disabled. They get re-enabled
once enumeration is done. No default event item is auto-selected at first.
- When the user selects an item, the details fields are filled (and the
Copy button is enabled; the Byte/Word mode buttons are enabled only if
the selected event has associated data).
- When changing the current filter via the TreeView, the events list is
refreshed, but also the event details fields are emptied and buttons
are disabled. The navigation arrows are re-enabled once enumeration is
finished, but the details fields remain empty until an event is selected.
- Pressing the Previous/Next buttons just after the events list refresh
(when no item is selected), automatically selects respectively the
last/the first event in the list.
The rationale for this behaviour is the following: in this situation,
no item is selected, so it is as if the "current" item is at the same
time, at the top and at the end (i.e. at the borders) of the list.
- Temporary HACK: When disabling the navigation arrows, this is usually
because the events list is being refreshed, so we loose access to the
event's data and we cannot use the bytes/words mode buttons anymore.
Supporting AppBars.
JIRA issue: CORE-7237
- Rewrite shell32!SHAppBarMessage
function.
- Introduce CAppBarManager class in
base/shell/explorer/appbar.cpp.
- Add support of ABM_NEW,
ABM_REMOVE, ABM_QUERYPOS,
and ABM_SETPOS messages for
AppBar in Tray Window.
The menu band window is about to go away, don't pass it to InvokeCommand because it's invalid as an owner window for any dialogs the callee might display.
This is a very small revert of PR #5227 to simplify the code and eliminate an MSVC warning.
It was pointed out by Timo Kreuzer as probably not doing what I intended and he was correct.
I added this code in PR #5227 to try and correct some return values from SetDIBitsToDevice.
After testing with this new PR, there was no difference in the regression tests for either
1) gdi32:bitmap or 2) gdi32:SetDIBitsToDevice after deleting the code here and the MSVC warning was fixed.
While PROFILE_LEVEL is defined as 27 on x86, this does not match the vector for the profiling interrupt, which is 0xFD (see https://community.osr.com/t/odd-ioapic-output/45216), implying IRQL 31.
Fixes boot with x86 APIC hal (CORE-20093)
Write both high and low 32 bits of ICR in ApicRequestSelfInterrupt. In VMs we get away with only writing the low 32 bits, but actual hardware doesn't always accept that.
JIRA issue: CORE-18944
EDIT_EM_GetHandle unlocks the handle,
so the next EM_SETHANDLE handler
shouldn't unlock the unlocked text.
Don't unlock the handle when es->text
was NULL on EM_SETHANDLE
message handling.
CORE-18855
Add a call to _ChangeHotItem(NULL, -1, 0) in CMenuBand::OnSelect(MPOS_CANCELLEVEL) which causes to deselect currently selected item the moment the menu bands (including start menu) are closing.
Start Menu is not destroyed when it's closed so its allocated resources can be re-used next time user wants to open it, so to keep this behavior and still not having an item selected every time you open the start menu, you have to deselect the currently selected item.
Note: A bug in the classic button prevents it from sending CDDS_POSTPAINT if the button has no text, the button resource has a space in its text as a workaround.
Since the setuplib.dll isn't available after installing ReactOS, build
instead a static library that is then used for the dll, and linked into
the setuplib_unittest, so that it can be run in our test-suite.
Addendum to commit d7c1d220.
This header is not to be used outside of dhcpcsvc because it contains the data structures for the communication between the client and the server part within dhcpcsvc. That is why it is moved inside of dhcpcsvc and renamed to rosdhcp_pipe.h.
CORE-20107
Improve the minimal handling done in the fall-back KdSend/ReceivePacket()
routines when they are invoked by KD64 (in Release build).
Part of my `kdbg_tests_kdio_split` branch for splitting kd/kdio.c
into a separate KD dll.
KdSendPacket:
- Silently ignore PACKET_TYPE_KD_STATE_CHANGE32/64 DbgKdLoadSymbolsStateChange notification.
- Partially manage and log the unhandled PACKET_TYPE_KD_STATE_CHANGE DbgKdExceptionStateChange notification.
- Log other unhandled PACKET_TYPE_KD_STATE_CHANGE32/64 and PACKET_TYPE_KD_STATE_MANIPULATE notifications.
When KdSendPacket receives the DbgKdExceptionStateChange notification,
it cannot handle it (no debugger is there!). However, we need to claim
the debugger to be present, so that its KD64 caller: KdpSendWaitContinue(),
can call back KdReceivePacket(PACKET_TYPE_KD_STATE_MANIPULATE), which,
in turn, informs KD that the exception cannot be handled, by returning
a failure code in the ManipulateState's ContinueStatus.
During bugchecks, this allows KiBugCheckDebugBreak() to not loop infinitely,
but instead fall back into calling HalHaltSystem() to halt the computer.
When KDBG isn't included in the kernel (Release build), the fall-back
KdSend/ReceivePacket() routines are invoked by KD64. A minimal handling
of the basic packets needs to be done:
PACKET_TYPE_KD_STATE_CHANGE32/64 for KdSendPacket(),
and PACKET_TYPE_KD_POLL_BREAKIN, PACKET_TYPE_KD_STATE_MANIPULATE
for KdReceivePacket().
Addendum to commit 2046a17ef4
CORE-20107
RtlpBreakWithStatusInstruction is just a label for KD.
On machines that have register calling conventions (basically all except
x86), the `Status` parameter for `DbgBreakPointWithStatus` is stored in
the first argument register.
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-dbgbreakpointwithstatus
On the x64 platform, `DbgBreakPointWithStatus` only uses the ECX register
and leaves EAX untouched. Verified on Windows.
Implements a couple of extra commands in IShellBrowser and adds support for the AppKeys fallback registry key (used when the foreground application does not handle the command).
They were introduced when MEMROY_AREAs and VAD still lived in different tables to synchronize between them. Since some time MEMORY_AREAs are special VADs and live in the same table as ARM³ VADs, but with flags to distinguish them. Since then the only reason that the fake MEMORY_AREAs still existed was to determine whether a VAD that is a MEMORY_AREA is still handled by ARM³ (which is the case for some kernel VADs, like for paged pool). This is no longer required as it is now determined by a 2nd flag in the VAD itself.
Additionally, we tried to insert the fake MEMORY_AREAs into the VAD table, which would fail, because it was already occupied by the ARM³ VAD, but the failure was ignored.
- Implement MiLocateVad and make MiLocateAddress call it
- Use MiLocateVad in MmAccessFault to get the VAD
- Check VadFlags for whether this is an ARM³ VAD/MEMORY_AREA
Use this instead of MmLocateMemoryAreaByRegion to determine whether we can inert a section at the requested base address. This will be required to get rid of fake memory areas allocated for each ARM³ VAD.
In MmCleanProcessAddressSpace we already delete VADs that are RosMm memory areas by calling MiRosCleanupMemoryArea, so we never reach the later check. This code path is from a time when VADs and memory areas lived in different tables, which is no longer the case.
Related to #7870. IMM32 uses NDK.
So, we have to remove Wine
dependency.
JIRA issue: CORE-5743
- Add dll/win32/imm32/debug.h.
- Remove Wine dependency.
- Update the documentation
(media/doc/WINESYNC.txt).
- `MountMgrVolumeMountPointChanged()`: Set status code in all failure
paths and correct the check for remote or removable media.
- `DeleteRemoteDatabaseEntry()`: Do not allow the database with size of zero.
- `QueryVolumeName()`: Use reparse point file reference when no file name is supplied.
- Added bounds check for -w and -h options to prevent the program from crashing.
- Added argument checks for -w and -h to make sure values were of the correct type and within range.
- Added check to see if a host was specified.
- Added new resource strings for reporting errors related to the checks above.
- Added the slash character as an additional option to specify command options.
Addendum to commit 271b985
CORE-20107
[NTOS:KD] Comment defines related to KdMax. They are not used,
but keep them for documentation purposes.
Addendum to e160c0f (r14799) and 6d53c91 (r27419).
It was introduced in commit 1f9c4940d (r38270), but this flag isn't used
anymore in our source tree, and nowadays, we actively compile both UP
and MP support.
Use process-tree Level-Order-Traversal to determine the children
processes to be terminated.
This avoids using recursion to establish the process tree, and also
allows termination in a fashion similar to Windows' taskkill.
The main difference with the latter is that we terminate parent
processes first before terminating their children, instead of doing
the reverse. (This allows avoiding the case where parent processes
respawn their children when they have been terminated.)
[WINESYNC] taskkill: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fb80c1b554eaf07bf2f89fcf2960e39bd0d4787a by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] taskkill: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3180972ee2c8e67c425aa7f5279d0cd830455c3d by Michael Stefaniuc <mstefani@winehq.org>
[WINESYNC] taskkill: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2c2e75503bea973a3091ea48d431782da656ef8e by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] taskkill: Use OEM code page for output.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8fdf397505522cc8e41b58cd960899ef7cdf322b by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] taskkill: Use exit code 1 when terminating processes.
wine commit id fe6294c74346e9956fb839d2a4ca078c624f6bbf by Brendan Shanks <bshanks@codeweavers.com>
[WINESYNC] taskkill: Use CRT allocation functions.
wine commit id dd3f3f381f9e761325c7c06236de1241c9605ed6 by Paul Gofman <pgofman@codeweavers.com>
[WINESYNC] taskkill: Remove unneeded free() before process exit.
wine commit id 20ab5f06d0972440a7df7fb1ba390ab1b32f3b1d by Paul Gofman <pgofman@codeweavers.com>
[WINESYNC] taskkill: Enumerate processes in main().
wine commit id cf4a0b7392f33ba3e0b3fe69007a6d1f327f13f2 by Paul Gofman <pgofman@codeweavers.com>
[WINESYNC] taskkill: Factor out get_task_pid().
wine commit id 62ef3c5be1d2c5374399984588a9daa75663d030 by Paul Gofman <pgofman@codeweavers.com>
[WINESYNC] taskkill: Use toolhelp snapshot to get process information.
wine commit id 6cca1f5099a8354b67578b42dd34fd010e80b6de by Paul Gofman <pgofman@codeweavers.com>
[WINESYNC] taskkill: Mark processes for termination in main().
wine commit id 5c851451892e05c1747108432a5a2bff3a78ed9e by Paul Gofman <pgofman@codeweavers.com>
[WINESYNC] taskkill: Support terminating child processes.
wine commit id fb6b1c91bbf412f5eba260ae52ee38176fd693d4 by Paul Gofman <pgofman@codeweavers.com>
NOTE: This implementation is disabled for ReactOS, and we keep
our own. See the comment block in the code for the reasons why.
+ Adaptations for ReactOS-specific code.
In particular, great care has been taken to keep the `pkill_list`
functionality (read: fix) introduced in PR #2403 (commit 97e7efc020).
The current problem with Wine's code is that if many processes (more
than one) with the same image name are running, then:
taskkill /im theimagename.exe
would only terminate *one* of the corresponding processes, instead of
all processes having this same image name (as on Windows).
The `pkill_list` array contains all the PIDs of these processes. This
replaces the single `pid` initialized by `get_task_pid`.
Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
- Avoid unnecessary enumerating audio-related device interfaces which are currently not present in the system.
- Do this for MMixer routines, same as it's already done for Legacy ones.
Skip unsuccessfully initialized devices and continue enumeration until all of devices are enumerated.
Patch by Johannes Anderwald with additional improvements from me.
This fixes 0 audio devices detected for HD audio controllers (e. g., Realtek), and hence allows to properly detect all available devices and play the sound with MMixer routines enabled (they are currently default).
Tested personally with Realtek HD Audio driver version R2.74 for Windows XP/Server 2003 in pair with hdaudbus.sys from Windows Vista SP2 on real hardware.
CORE-17285
The Install/Uninstall/Modify/... buttons stay disabled by default, unless:
- For installed apps: when an app item is selected, Uninstall (and
Registry-remove) are enabled, and Modify is enabled under certain
conditions.
- For available apps:
* Modify, Uninstall and Registry-remove are always disabled.
* When an app item is selected, Install is enabled.
* Install is also enabled if there is at least one application
selected for installation (box checked), in which case the button
stays enabled even while changing across apps categories.
Re-trial of #7800. Deleting __WINESRC__
hacks.
JIRA issue: CORE-5743
- Add sdk/cmake/set_wine_module.cmake.
- Load set_wine_module.cmake at
top-level CMakeLists.txt.
- Use set_wine_module cmake function
and delete __WINESRC__ as possible.
- Delete many include_directories.
Invoke the MmVerifyImageIsOkForMpUse() helper. If the boot-time driver
only supports a uniprocessor system, bugcheck with UP_DRIVER_ON_MP_SYSTEM.
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0x92--up-driver-on-mp-system
Note that we don't do this check very soon at boot time (e.g. in
MiReloadBootLoadedDrivers or MiInitializeLoadedModuleList), but only
after loading the drivers' debug symbols (if any).
The reason is simply to ease debugging in case we bugcheck: this allows
having the debugger set up with the symbols for this driver.
For automatic and manual driver loading, MmVerifyImageIsOkForMpUse()
is invoked by MmCheckSystemImage() but in this case, there is graceful
failure and no bugcheck.
On x64 malloc needs to return a 16 byte aligned buffer, the previous code used an 8 byte header, making the allocations unaligned. This is now fixed with an improved header structure.
Also simplify realloc a bit and make it handle Object == NULL.
Short answer: our UI sucks bolas rojas.
Long answer: when the NT kernel informs the user-mode part of the system that the battery is no longer charging, the machine is directly powered up by the AC adapter.
This is understood by determining the presence of AC_LINE_ONLINE status bit in ACLineStatus member field, which is a Windows API construct.
In the NT world this is understood by checking the power state returned by the BATTERY_STATUS structure.
What's happening right now is that when the battery is fully charged, ROS UI simply displays "100% remaining" implying the battery is about to discharge, which is not the case.
This is extremely confusing to the user. AND WORST PART IS THAT IT'S XP/2003 DESIGN, AND I HATE IT UGGGHHH.
With this patch we're leaning towards Windows 10/11 way of informing the user the battery is fully charged. VIVA LA NT6!
CORE-18969
CORE-19452
Example output:
[ROSAUTOTEST] System uptime 7.41 seconds
... Testing here...
[ROSAUTOTEST] System uptime at start was 7.41 seconds
[ROSAUTOTEST] System uptime at end was 1546.20 seconds
[ROSAUTOTEST] Duration was 25.65 minutes
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
CORE-18385
Retry of PR #7704
In USER32 change CMakeLists.txt to include libpng.
Improve libpng.spec to include additional needed defines.
Add code into mostly cursoricon.c to support PNG icons.
Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Follow-up of #7815. This function
affects ShellExec_RunDLLA/W
implementation.
JIRA issue: CORE-17659
- Implement PathProcessCommandW
in shlexec.cpp.
- Adapt utils.h to non-C++.
- Don't corrupt static (global) data when formatting more than one disk at the same time.
- Guess partition size to enable formatting blank partitions.
- Added info tip.
- Calls SetVolumeLabel.
CORE-17273
Sorry this is something I had to do, I should have investigated deeper
before approving it and that's on me so ill take this over and get this
done. and credit you once again. Thank you @ILauncherDev
This reverts commit 185225a5fc.
- Display item sizes inside \\ UNC paths.
- Don't display anything in the location pane inside the Recycle Bin (CORE-20005).
- Don't display the size and location panes in My Computer
- Don't update the location pane on simple item selection changes.
CORE-20005
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.