* [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
Add extra parameters to 'struct host' to handle 'defer_release' and 'notify_level' and use these.
Fixes crash when using 'Enter' key in DevCpp installer license edit box.
Update and retrial of #7733. CORE-19991
Cherry pick of wine commit: 8138159f20
Improve UX on memory shortage.
JIRA issue: CORE-20020
- Clear history on memory shortage.
- Improve CCanvasWindow::OnPaint on memory
shortage.
- Add null check in CCanvasWindow::DoDraw.
- Retire using of cache in CCanvasWindow.
Windows ships ucrtbase without debug exports and ucrtbased with debug exports. The wine test tests ucrtbase and loads it dynamically in some cases. Compiling it with _DEBUG requires it to be linked to ucrtbased, which causes problems, because it also dynamically loads ucrtbase, which will cause it to crash.
Some old names redirect to functions that are not exported by ucrtbase. Place them into a seperate asm file, so that they don't get pulled in, when any of the other ones is referenced.
Previously sprintf and _vsnprintf were imported from ntdll. These functions are defined as inline functions in ucrt headers, but linked directly by legacy CRT code.
* [SHELL32] Fix drive volume renaming
- Support renaming to empty volume name.
- Use SHGDN_FOREDITING in Explorer tree and DefView ("Volname" instead of "VolName (C:)").
- Added support for the ShowDriveLettersFirst setting.
CORE-17292
* Suggested changes
Prepare the d3dkmt APIs up to Vista RTM
Build the skeleton needed for having userspace components talk to a WDDM KMD driver
Co-authored-by: Mark Jansen <mark.jansen@reactos.org>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Improvements based on recent Romanian translation document revision 06e89b2.
This file was not translated in Romanian language in any Win version (neither XP/2k3+, nor in the previous ones). I tried to translate this file as close as possible in the way I did in the previous PRs.
Improvements based on recent Romanian translation document revision 06e89b2.
This file exists in XP/2k3+, but there are many things I didn't find in desk.cpl. I found them in other files like explorer.exe. There were also many items I found nowhere. I tried to translate this file as close as possible in the way I did in the previous PRs.
I also fixed the accelerator collisions and added the missing ones.
It's purpose was to create x64 unwind information from DWARF debug info, but it was never fully working and is pointless now anyway, because x64 GCC does this itself properly.
Match Hardware ID correctly. This fix is required to install the latest (7.1.6) Virtual Box Guest Additions drivers.
- Add Compatible IDs match, call SetupDiGetDeviceRegistryPropertyW twice, once for SPDRP_HARDWAREID and once for SPDRP_COMPATIBLEIDS.
- Use case-insensitive comparison (wcscmp -> _wcsicmp)
- Convert code file to UTF-8 encoding
Fix `SetupInstallServicesFromInfSectionEx`.
- Call SetupDiSetDeviceRegistryPropertyW only if DeviceInfoSet is valid
- DeviceInfoSet can be INVALID_HANDLE_VALUE, treat this as NULL
- Improve function declaration
Sync SetupQueryInfVersionInformation stubs to Wine.
The new synced stubs set ERROR_CALL_NOT_IMPLEMENTED as last error and return, rather than raise exception EXCEPTION_WINE_STUB (0x80000100), then the Virtual Box Guest Addition 7.1.6 setup progress can move on.
Related to #7800. Reduce code dependency on Wine.
JIRA issue: CORE-5743
- Wrap DLL_WINE_PREATTACH usage by #ifndef
__REACTOS__ and #endif.
- Undefine DLL_WINE_PREATTACH macro in
sdk/include/xdk/winnt_old.h.
Follow-up of #7795. This affects
boot condition of es-CR, rm-CH,
ur-PK, fa-IR, vi-VN, ka-GE, bn-IN
and my-MM users.
EDIT: These languages are not
supported in
base/setup/usetup/
muilanguages.h yet.
JIRA issue: CORE-19496
Modify boot/bootdata/hivesys.inf t
o change the values of
HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Control\Nls\
Language and HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Control\Nls\
Locale registry keys.
Based on @Doug-Lyons's wordpad-ruler-fix-05.patch.
JIRA issue: CORE-19870
In IntRequestFontSize function, if lfWidth < 10, then
req.width = 0;.
Co-authored-by: Doug Lyons <douglyons@douglyons.com>
[USBCCGP]
Ignore invalid devices
Group audio function interfaces together
[USBPORT]
Prevent infinite loop in USBPORT_OpenPipe when endpoint is not becoming ready
JIRA issue: CORE-19496
Modify boot/bootdata/hivesys.inf to change
the values of registry key HKEY_LOCAL_MACHINE\
SYSTEM\CurrentControlSet\Control\Nls\Locale.
Allows "ROS as a workstation" installs to report itself as a basic server to Win32 applications when the user toggles the sysdm.cpl checkbox (to unchecked in this case).
Use a `[Shell]` section with `DefaultThemesOff` and `CustomDefaultThemeFile`
values, specifying respectively whether to use the classic theme or a
custom one, and the complete path to the custom .theme (or .msstyles) file.
These values are compatible with those documented in the
"MS Windows Preinstallation Reference" help file
of the Windows installation CD (DEPLOY.CAB\ref.chm)
[BOOTDATA] bootcd/unattend.inf: Use the Shell/CustomDefaultThemeFile value to specify which theme to use
The ping utility found in various versions of Windows fills the optional
data field in the ICMP echo request structure with ASCII characters from
'a' to 'w' wrapping back around until SendBuffer is full.
Future TO-DO: Compare ReplyBuffer data to SendBuffer.
[DDK] Update IDENTIFY data and other ATA definitions.
Based on the MinGW header.
[FREELDR] Refactor and optimize the IDE driver.
Fix long-standing bugs, which have a negative impact on the boot stability.
- Make the driver more ATA specification compliant.
- Improve the speed of device detection.
- Remove inconsistent delays.
- Support modern hard drives with sector size greater than 512 bytes.
- Add basic error recovery.
- Move private definitions to a separate private header.
- Remove the useless AtaFree API method.
Rewrite the Ext bootsector because the older one was broken and had no compatibility with Ext4 extents.
Introduce a 3rd-stage bootsector for complex code.
CORE-14235
- Why was the previous bootsector broken?
Because of hardcoded inode size, hardcoded freeldr base address, etc.
- Why is there a extldr.sys?
The extldr.sys was introduced because the limited code space in the bootsector
prevents adding new features, such as Ext4 full extents support.
- What is extldr.sys and What does it do?
It is the helper file for the Ext bootsector and that is necessary for adding
Ext4 support. It locates the freeldr.sys file, loads it into memory and runs it.
[CONFIGURE.CMD] Use multi-command syntax instead of AND operator for successive echo's
And adjust few strings.
[CONFIGURE.SH] Quote the echo'ed strings, and adjust some of them.
When drawing the menu, the boot options should not be overwritten, but when clearing the screen, everything needs to be drawn, otherwise there will be uninitialized characters at the bottom. See CORE-20014.
CORE-18206 CORE-18799 CORE-19371
Fixes infinite loop of:
err: Message WM_PAINT count 1 Internal Paint Set? FALSE
The symptom appears in the following scenario (as reported in CORE-18799):
A program (game) runs at a small resolution (e.g. 640 x 480), but the
game window gets invalidated at a larger size (e.g. 1152 x 864 screen
resolution) before switching to the smaller (640 x 480) size.
Because of this, the window's update region is larger than the current
window so only the 640 x 480 region gets validated leaving the remaining
region invalid. This causes the recurring WM_PAINT messages because there
is no way to invalidate the remaining area.
Initial implementation of `CertEnumSystemStoreLocation`, which is required by the latest "VirtualBox Guest Additions".
This function returns 8 fixed hard-coded system stores and registered OID system stores, this PR didn't implement the latter because `CryptEnumOIDFunction` is unimplemented, marked as FIXME.
CORE-10386
Fixes the behavior when selecting multiple files in a folder with the Shift key, while using either the Large Icons or Small Icons view, so that it is consistent with how it works on Windows.
Proposed changes:
Disable the specialized code for these views in LISTVIEW_SetGroupSelection, using the same code as for the list and details views, which also works fine for them.
* [FREELDR] Mark noreturn functions
* [FREELDR] Compile hw debugging support code only in debug builds
- Make BREAKPOINT() portable
* [FREELDR] Consolidate identical names into a single string
* [FREELDR] Use intrinsics for string I/O operations on x86 and x64
Stop them being pulled in from a static minihal library
* [MINIHAL] Exclude unnecessary portio dependency
This behavior is straight out of win7 where this logic was moved to
KernelBase and friends. Required for thousands of apps. But also just
preps for the KernelBase sync from Wine-10
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Don’t display garbage to the users.
JIRA issue: CORE-19786
- Localize message text by using
newly added
IDS_CONTFROMBEGINNING
and IDS_CONTFROMEND
resource strings.
- Check item count before
showing next/previous item.
- Add EnableEventDetailsButtons
function.
AI-friendly development for the future.
JIRA issue: CORE-20011
- Reduce time and cost on using Cursor AI.
- Improve interoperability with Cursor AI.
- Add .cursor folder and some files.
- Modify .gitignore.
- Shortcut icons require the correct IShellFolder because it needs the full path.
- Items in a drive root needs the final backslash to be part of the path.
CORE-18692
JIRA issue: CORE-20011
- Add CODING_STYLE.md at the root
directory.
- This CODING_STYLE.md is generated
from HTML text of
https://reactos.org/wiki/Coding_Style
- [NTOS:PS] `STATUS_INVALID_IMAGE_PROTECT` returned by `MmCheckSystemImage` should be a fatal error too.
- [NTOS:PS] Fix object attributes for opening NTDLL.
- [NTOS:MM] Remove `MmCheckSystemImage` unused parameter.
- [NTOS:MM] Inline `MmVerifyImageIsOkForMpUse` in `MmCheckSystemImage`, reducing a call to `RtlImageNtHeader`.
Implement DLL Load Notification, an NT6+ feature.
https://learn.microsoft.com/en-us/windows/win32/devnotes/dll-load-notification
- [RTL] Sync `RTL_STATIC_LIST_HEAD` and `RtlFailFast` from XDK to NDK.
- [NTDLL_VISTA] Introduce ntdll_vista_static static library and link both ntdll_vista and ntdll to it.
- [NDK][LDR] Add and fix DLL Notification definitions.
- [NTDLL_VISTA] Code improvements.
- [NTDLL_VISTA:LDR] Implement Dll Notification.
- [NTDLL][NTDLL_APITEST] Add Dll Notification API test.
Reason: the size of `READ_CAPACITY16_DATA` struct in UniATA driver and ReactOS/Windows SDK were not equal.
- In UniATA driver: `sizeof(READ_CAPACITY16_DATA) == 33` (wrong);
- In ReactOS/Windows SDK: `sizeof(READ_CAPACITY16_DATA) == 32` (correct).
CORE-19696
Improvements based on recent Romanian translation document revision 06e89b2.
This file was not translated in Romanian language in any Win version (neither XP/2k3+, nor in the previous ones). I tried to translate this file as close as possible in the way I did in the previous PRs.
- When Ctrl+X is pressed on a selected item, it will appear ghosted until another clipboard action takes place.
- Generate SHCNE_UPDATE* notifications when file attributes change.
- When an items hidden attribute is changed (filesystem notification), we must update the ghosted state.
CORE-9465
- Add a new page to the network setup wizard that installs the required network components in a background thread.
- Remove the network setup code from syssetup.dll.
TODO: Move the network setup code for the LiveCD.
Import device installer code from syssetup.dll.
This is the first step to move the network component installer code from syssetup.dll to netcfgx.dll and netshell.dll.
- Searching the Desktop now searches the two desktop folders.
- Searching My Computer now searches all local disks.
- Adds a "Browse..." entry to the combobox list.
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
"Sync" to WINE-10.0, plus add some functions we need. Required for various apps going forward.
Fixes:
- Reduce flicker when resizing main window
- Fixed slideshow starting with 1x1 pixel image zoom
- Don't reset zoom levels > 100% when resizing main window
- Always retain an active window on toggle slideshow (show/hide actions order)
- Enable/disable real-size button as required
- Correctly handle accelerators in main window after slideshow has been closed
- Use same zoom shortcuts as NT6
New features (unique to ROS):
- Fullscreen mode (slideshow mode but without timer)
- Alt+Enter or double-click to toggle fullscreen mode
- Shift +/- to change fullscreen slideshow next picture timer
CORE-19358
[WINESYNC] propsys/tests: Merge test files.
wine commit id d189b55d2ffb038474cb6656dc8743eb34c35a3d by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] propsys: Add a semi-stub for PSCreatePropertyStoreFromObject().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47958
wine commit id acb2e4fc7a4242c74ac91657edb97bf1e402656a by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] propsys: Allow only ASCII digits in PSPropertyKeyFromString.
wine commit id 6e8c2d836e637e1fbd83c231cfd846ecb9333964 by Jacek Caban <jacek@codeweavers.com>
[WINESYNC] propsys/tests: Get rid of strcmp_wa().
wine commit id 2340212ee9c48c731c85bbad8c81ed833458bf15 by Michael Stefaniuc <mstefani@winehq.org>
[WINESYNC] propsys: Use wide-char string literals.
wine commit id b72440fa2e1016681cbfcebcdc4792b6ced3eb53 by Michael Stefaniuc <mstefani@winehq.org>
reduce wine diff and add stuff from previous commit
[WINESYNC] propsys: Use --prefer_native instead of DLL_WINE_PREATTACH.
wine commit id f99113192ffac37506a905827415d3d21d0ebbf8 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] propsys: Use nameless unions.
wine commit id 1d8e5079f0e53a767a783e5107f57f04c1897951 by Jacek Caban <jacek@codeweavers.com>
[WINESYNC] propsys/tests: Use nameless unions.
wine commit id 497de3cc19f971808ca4105f52038e61dc818db1 by Jacek Caban <jacek@codeweavers.com>
[WINESYNC] winecrt0: Add a default implementation for DllCanUnloadNow().
wine commit id bd6b53740c28c6974300e15f965c12feb0252085 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] winecrt0: Add a default implementation DllRegisterServer()/DllUnregisterServer().
wine commit id 5d82baf9747b7b133cad3be77c0cc9e24cc09582 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] propsys: Add support for VT_VECTOR|VT_UI1 type in PropVariantCompareEx().
wine commit id e91b05bb5be6fd70a767bea9991e818a49cc5547 by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] propsys: Fix VT_UI4 comparison, use ulVal instead of uiVal.
wine commit id 58eeb1a86433db1104d3a9ccf9ad7435ec81443a by Rémi Bernon <rbernon@codeweavers.com>
[WINESYNC] propsys/tests: Add a VT_UI4 test for PropVariantCompareEx().
A test for 58eeb1a86433db1104d3a9ccf9ad7435ec81443a.
wine commit id 10359e17ce64f39461a7b7b54f73857e6458d1fb by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] propsys/tests: Avoid "misleading indentation" warnings.
wine commit id 7cd6681b3be35cf6c02f056cb5131c90c0674c16 by Fabian Maurer <dark.shadow4@web.de>
[WINESYNC] propsys: Enable compilation with long types.
wine commit id a9c797e4538a37716e62bb81c3fed3de39561b41 by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] propsys/tests: Enable compilation with long types.
wine commit id c1c393595d43bd95390d3ddf86dcbc46bc4f52ba by Eric Pouech <eric.pouech@gmail.com>
[WINESYNC] propsys: Implement InitVariantFromFileTime.
wine commit id f2b8ccb7b0b22b7b5d661d908f8f8ee02f22647d by Daniel Lehman <dlehman@esri.com>
[WINESYNC] propsys/tests: Add some InitVariantFromFileTime tests.
wine commit id 083dea7fce4372840ac18176496a7d05dadd5ad8 by Daniel Lehman <dlehman@esri.com>
[WINESYNC] propsys: Implement VariantToStringWithDefault.
wine commit id bf0f1fdcf80657a42116b79a0953181191cf9221 by Mohamad Al-Jaf <mohamadaljaf@gmail.com>
[WINESYNC] propsys/tests: Add VariantToStringWithDefault tests.
wine commit id 89aba13dc381dbbda62d1019e1af2af5a589b0cf by Mohamad Al-Jaf <mohamadaljaf@gmail.com>
[WINESYNC] include: Add Stg functions declaration in propvarutil.h.
wine commit id 0d294ad26544913414277daa164004d731ae6e33 by Biswapriyo Nath <nathbappai@gmail.com>
[WINESYNC] propsys: Add InitPropVariantFromStringVector().
wine commit id 3a1146d8e63d7ceff38441fee08f7f7080527020 by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] Remove unused NONAMELESS defines.
wine commit id 20afe438320f77d103a96d1d8cd562d0899ebac7 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] propsys: Partially implement VariantToString().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55708
wine commit id f7ef02bd8f74ea052d61e48cd84b226d8a5867a8 by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] propsys: Handle VT_I4 type in VariantToString().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55708
wine commit id 001e0543bfd5aea060053af0c76233bb90fbb43b by Nikolay Sivov <nsivov@codeweavers.com>
[WINESYNC] propsys: Implement PropVariantToUInt32WithDefault.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55713
wine commit id d177709b10ce07ddd234b0e8e00764ae4b1d8488 by Fabian Maurer <dark.shadow4@web.de>
[WINESYNC] include: Use proper dllimports for propsys functions.
wine commit id f0b2e0d00c86fb04d47467f39e49c587250ffec5 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC] propsys: Remove DECLSPEC_HIDDEN usage.
wine commit id e9ff53e098ef3871d692c7b907151cfbb2f0673f by Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Update propsys_private.h
[WINESYNC] propsys: Force debug info in critical sections.
wine commit id 67bea281cc851eda6a08430c70f6c9e848d3fbe1 by Paul Gofman <pgofman@codeweavers.com>
[WINESYNC] include: Fix typos in IID_IPropertyEnumType2 and CLSID_PropertySystem.
wine commit id 66e6b61705a66459ed3a9e0cf9457d8b180e4564 by Alfred Agrell <floating@muncher.se>
[WINESYNC] propsys: Add stubs for variant conversion functions.
wine commit id c21f04f7adaa4a8d0ca2d2659bf9a6facdc168c3 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys/tests: Add tests for VariantToPropVariant.
wine commit id 8877889f2a8e36d22dcad061e6da84476efb3750 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys: Initially implement VariantToPropVariant.
wine commit id 6985637ed59e81e7d1716095a343cc5681082306 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys/tests: Add tests for PropVariantToVariant.
wine commit id 3277de5572b7f6c41ebeeb89f781e378a6a2c2d3 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys/tests: Test converting clsid to string.
wine commit id 7a4f9f83c51883f41ae1363e27700452472ec18f by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys: Support converting clsid to string for PropVariant.
wine commit id 67b097ff46c65d525de6a7f560f019de6828320c by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys: Initially implement PropVariantToVariant.
wine commit id 808b398549350fffc9fc023d637ef8de9e4bba37 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys: Add PropVariantToBSTR stub.
wine commit id 86558a4b83ebf9a0c6e76888a3d0f3fe3e36bf57 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys/tests: Test PropVariantToBSTR.
wine commit id b4ac03f1f622120906a8b6e691caa05f6539c2dd by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys/tests: Test truncating for PropVariantToString.
wine commit id df16802582a56f8076ebbcf9cb6178f65bb8b9b6 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys: Implement PropVariantToBSTR.
wine commit id 66220be403ce5c3634c13da3546f0c19f04059cc by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys: Use debugstr_variant for the trace in VariantToPropVariant.
wine commit id 3517aded4090229dbb11e413bde8349d1eca0be3 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys: Support converting to BSTR for PropVariantToVariant.
wine commit id c33fdc27650045a754a05a8f25e250e6e72c8072 by Ziqing Hui <zhui@codeweavers.com>
[WINESYNC] propsys/tests: Fix a test that fails on some Windows versions.
wine commit id c09f828f43101cf2dfe11d7e13f1fc6ef4b19853 by Alexandre Julliard <julliard@winehq.org>
[WINESYNC]: propsys is now in sync with wine-staging wine-10.0
Co-authored-by: winesync <ros-dev@reactos.org>
[PROPSYS] Remove duplicate uuid
[PROPSYS] Fix headers/idl file
- Refresh the details view of the item that was just installed.
- Hint update of uninstallers list is needed.
- Restore focus correctly after installer process finishes.
CORE-17677
Add PNG (NT6/Vista+) support.
JIRA issue: CORE-18385
- Change libpng to add IMPORTLIB libpng.spec
to allow linking to it in USER32.
- Add code into mostly cursoricon.c to support
PNG icons.
JIRA issue: CORE-6920
- Make the return value of
NtUserCallHwnd a DWORD_PTR.
- Add DWP_GetEnabledPopup
helper function in
win32ss/user/ntuser/defwnd.c.
- Add code to NtUserCallHwnd for
HWND_ROUTINE_DWP_GETENABLEDPOPUP.
- Add code to GetWindow for
GW_ENABLEDPOPUP.
- Set last error in GetWindow and
IntGetWindow.
__acrt_initialize is here as a stub to later support linking ucrt statically. When it is statically linked the real function should be called, but when the executable links to ucrtdll, the initialization happens when the DLL is loaded, so we call a stub here.
vcruntime contains the code that is linked into ucrtbase (in VS it is also provided as vcruntime140.dll)
vcstartup contains the code that is statically linked into executables that link to ucrtbase.dll. In Visual Studio this is part of msvcrt.lib (the import library for msvcrt), similar to our current msvcrtex, and it gets linked when you link to ucrtbase as well. The name is based on the folder name in the library.
Both libraries share some code, but each file is only compiled once.
This is required, so that the definition is available when preprocessing asm files on MSVC builds. Otherwise systimer.s will contain KeStallExecutionProcessor, which must not be used in freeldr.
This removes a dependency of UI code to boot options code by getting rid of a call to DisplayBootTimeOptions() from within the menu code.
Instead this is now handled by MainBootMenuKeyPressFilter.
Check if the stack pointer is out of bounds, before trying to unwind a frame. This will not fix any crashes, but it prevents simple crashes from going into a recursive exception.
The description had nothing to do with CREATE_DELETE_LOCK_NOT_LOCKED,
but instead was for EMPTY_THREAD_REAPER_LIST. And even so, descriptions
for both of these BSOD codes have been removed in official MS Windows
2000 and beyond.
Regarding the Thread Ripper:
https://devblogs.microsoft.com/oldnewthing/20231031-00/?p=108944
Add new kernel-mode test for Device Interface functions, based on the patch by Mark Jansen.
The previous one was buggy and crashed even on Windows.
The new one doesn't fail, and works without bugs. Although there is missing one test case (for IoRegisterDeviceInterface).
Also perhaps IoRegister/UnregisterPlugPlayNotification testcases should be keept, if they correspond to Device Interface functions.
CORE-17361
Implementing missing features...
JIRA issue: CORE-9368
- Modify shdocvw.spec.
- Add dll/win32/shdocvw/winlist.cpp.
- Add stubs of WinList_* functions.
- Add WinList_* function prototypes
to <shdocvw_undoc.h>.
- Adapt explorer and rshell to new
WinList_Init prototype.
Improve usability. Re-trial of #7679 with different approach.
JIRA issue: CORE-12905
- Add ShellSmallIconSize, ShellLargeIconSize, and
ShellIconBPP global variables in iconcache.cpp.
- Add SIC_GetMetricsValue, SIC_GetLargeIconSize,
SIC_GetSmallIconSize, and SIC_GetIconBPP helper
functions in iconcache.cpp.
- Load shell icon size from registry key
"HKEY_CURRENT_USER\\Control Panel\\Desktop\\WindowMetrics".
- Load icon BPP (bits per pixel) from registry.
- Fix SIC_Initialize and SIC_LoadIcon functions for icon size.
- Fix SHGetFileInfoW function for SHGFI_SHELLICONSIZE flag.
Defining missing interfaces for
file association...
JIRA issue: CORE-19278
- Define IID_IAssociationElementOld,
and IID_IAssociationElement
interface IDs in <shlguid_undoc.h>.
- Define ASSOCQUERY, and
IAssociationElementOld in
<shlwapi_undoc.h>.
- Define IAssociationElement,
IEnumAssociationElements,
IAssociationArrayOld, and
IAssociationArray interfaces in
<shlobj_undoc.h>.
- Simplify <shlwapi_undoc.h>
and <shlobj_undoc.h>.
In C99 mode GCC emits global symbols for inline functions, as soon as the compilation unit contains a declaration that marks the function as "extern". A number of functions like printf are implicitly declared as extern by GCC, which seemingly cannot be disabled. This would lead to the inline function being emitted as a global symbol in every compilation unit. Using static inline prevents duplicate symbol errors.
This command was removed in commit baa47fa5e0
because there was no way to get the CRx registers from a CONTEXT structure.
Previous code was also displaying current GDTR/LDTR and IDT.
Rewrite the code to use KdSystemDebugControl(SysDbgReadControlSpace, ...)
to get CRx, GDTR/LDTR and IDT values just before entering debugger.
This reverts commit 3b3741c10a of #7679 .
It seems like the shell icon size is not the
system icon size.
The wide string L"Shell Small Icon Size" is detected in
shell32.dll and themeui.dll.
No L"Shell Small Icon Size" in win32k.sys found.
JIRA issue: CORE-12905
Move these out of ACPI in preparation for ACPI_NEW so they keep their juicy commit history.
Also both ACPIs can coexist for awhile as I don't see the old driver getting removed anytime soon.
WinDBG can do some local debugging using 'windbg -kl'. In that case,
WinDBG tries to directly use NtSystemDebugControl. If this function
returns an error, WinDBG extracts a driver from its resources.
WinDBG will send IOCTLs to this driver, and this driver will call
KdSystemDebugControl.
However, on livecd (where %SYSTEMROOT% is read-only), WinDBG is unable
to extract the driver from its resources, and can't use the driver to
call KdSystemDebugControl.
As a work-around, allow all control classes in NtSystemDebugControl
in case of livecd.
WinDBG local debugging now also works on livecd (windbg -kl).
- Add SEH probing for user buffer
- Mark some classes as i386 only
- Explicitly return STATUS_NOT_IMPLEMENTED on disabled classes (must use KdSystemDebugControl instead)
- Explicitly return STATUS_NOT_IMPLEMENTED on not implemented classes
- Return STATUS_INVALID_INFO_CLASS on all other classes
`DeviceInformation->DeviceName.Buffer` was already freed via the previous
`FreePool(TargetDeviceName.Buffer);` call,
since `DeviceInformation->DeviceName` was set to `TargetDeviceName` above
in the code. This resulted in a pool double-free, triggering a corruption
of the pool, and a BSoD.
What had to be freed instead, is `DeviceInformation->SymbolicName.Buffer`
that is allocated at the beginning of the function.
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
to dead links.
- Use MS Learn links rather
than MSDN ones.
- Some dead links revived by
Web Archive.
- Don't change Wine Tests
and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
Use #pragma section only for MSVC (and Clang-cl), because Clang doesn't like allocating non-const variables in a read-only section, while GCC doesn't understand these pragmas and ignores them.
Start menu items were created after the wizard had finished. This patch moves the creation of the start menu items into the process page of the wizard and enables the 2nd item of the task list.
Implementing missing features...
JIRA issue: CORE-19278
- Move function definition from
stubs.cpp to utils.cpp.
- Implement SHIsBadInterfacePtr
function in utils.cpp.
- Add prototype to <undocshell.h>.
Defines can cause problems, like previously with the end define, which caused a jump to label ".end" to be interpreted as a jump to ".", which is the current address, resulting in an infinite loop.
Remove obsolete CODESEG
Fixes crash of mshtml_winetest:htmldoc (introduced by 716613c). Please do not ask me why.
The test started crashing with commit 716613cddc "[CMAKE] Use new policies for CMP0005 and CMP0018 (#1481)", which moved this definition from the command line to urlmon_main.h. This got later removed by commit 6c3c2e33f6 "[URLMON] Sync with Wine Staging 4.18. CORE-16441"
Our FT_Bitmap_Convert function had a hack to make the
bitmap image compatible to ReactOS. I think the hack on
FT_Bitmap_Convert should be separated from our font
engine.
JIRA issue: CORE-16047
- Add FT_Bitmap_Convert_ReactOS_Hack function, that is
based on FT_Bitmap_Convert, and split the hack of
FT_Bitmap_Convert.
- Use FT_Bitmap_Convert_ReactOS_Hack in
IntGetBitmapGlyphWithCache function instead of
FT_Bitmap_Convert.
- Modify ftfd.spec to add
FT_Bitmap_Convert_ReactOS_Hack.
The VolumePath buffer returned by IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH
contains one string stored as a multi-NUL-terminated string, whose
total length is given by its `MultiSzLength` member.
The DosName UNICODE_STRING just returns the (single) string as a normal
NUL-terminated string. So, we need to remove the two NUL-terminators
from the `MultiSzLength` count to retrieve the correct length.
- When trying to find a device, don't fail with STATUS_NOT_FOUND if no
associated symbolic links are present. Instead, that test was wrong,
and should go out of the search loop to do the drive-letter processing.
Addendum to commit f9f5a78715.
- In addition, when using the associated-device method, fix the list
used to retrieve the corresponding device.
- In the TryWithVolumeName: block, reset DeviceString to NULL after
freeing, so that we can correctly fail with STATUS_NOT_FOUND if no
suitable device was found, before initializing the output data.
- Use FIELD_OFFSET to correct structure and member instead of hardcoding
sizeof-s of fields until the member of interest.
- Fix a bug in MountMgrQueryDosVolumePath() where the FIELD_OFFSET used
in the entry structure size validation was incorrect.
FIELD_OFFSET(MOUNTMGR_TARGET_NAME, DeviceNameLength) is == 0 since
DeviceNameLength is the first member of the MOUNTMGR_TARGET_NAME
structure. The intended member was DeviceName.
Addendum to commit f9f5a78715.
- Limit the HarddiskVolume loop to 32 trials (instead of an unknown
number of them). Ideally the list of volumes has to be queried from
the volume manager, instead of hardcoding them (TODO).
- Verify that the buffer returned by IoVolumeDeviceToDosName() is
indeed a unicode multi-string (ends with two NULs), and, in the
case it specifies a volume GUID, that it's a valid one.
- Use %lu instead of %lx for printf-ing last-errors;
- Don't call GetLastError() within ok, or after a previous invocation,
when the aim is to retrieve the last-error set by a tested API.
Instead, store its value in a local variable, that is then used in
the ok() tests.
- Use win_skip() only for functionality that _may_ not be implemented
in Windows/ReactOS yet, but not for unexpected situations leading to
tests being skipped.
- Add comments; improve buffer size specifications.
- Reformat the file license header.
Follow the standard way.
JIRA issue: CORE-19469
- Use STDMETHODIMP and override keyword
instead of virtual HRESULT STDMETHODCALLTYPE.
- Delete CTaskBand::ProcessMessage and
CTaskBand::ContainsWindow methods.
I think they are useless.
Support Unicode on Start Button
context menu for international text
support.
JIRA issue: N/A
- Support Unicode in
CStartMenuBtnCtxMenu::InvokeCommand
method by using
CMINVOKECOMMANDINFOEX structure.
Supporting raster fonts. Using
num_faces is the generic way.
JIRA issue: CORE-16165
- Use FT_FaceRec.num_faces instead
of TT_Face.ttc_header.count in
counting the font faces in
IntGdiLoadFontsFromMemory function.
This avoids a linker error due to a duplicated symbol in ntdll and the statically linked chkstk library. This happens when the linker first resolves _chkstk from the CRT or the chkstk library (which also pulls in _alloca_probe(_16)) and then tries to resolve _alloca_probe(_16) from ntdll.
This setting can be overwritten by defining the CMake variable HOST_BUILD_TYPE.
The target build type is passed to the host build as TARGET_BUILD_TYPE CMake variable.
This improves time to build cab+iso:
MSVC x86: 37s -> 28s
GCC x86: 32s -> 16s
Follow-up of 42d5dfd3de.
- Revert "shell32: Fix ShellExecute for non-filespec paths." 0bad544aab.
- Apply "shell32: Look for the file name without extension also for the path search case." 38b6640be9.
- Clear leading/trailing whitespaces (an improvement by Doug Lyons).
- Update the comment for xlpFile buffer definition, to match the current code behaviour.
This fixes some failures for the following tests:
- shell32_apitest:ShellExecCmdLine: 12 failures less,
- shell32_apitest:ShellExecuteEx: 5 failures less,
- shell32_winetest:shlexec: crash fixed, now 13 failures as before,
- wshom_winetest:wshom: crash fixed, now 2 failures less too (0 failures).
I've also tested: the problem which was intended to be fixed by the guilty commit (CORE-19953) still remains fixed after this change.
CORE-19964
Useful for debugging.
Motivation: With SMP on x64 I found a number of instances where critical sections would be left abandoned, causing lockups. From what I can tell it was exceptions inside rpcrt4, which leave the process in a blocked state. Might or might not be related to x64 / SMP.
For real value, you still need to put checks at certain places manually, but this is not super straight forward, because there can be false positives, e.g. when a process is terminated due to an exception, where the abandoned lock is acceptable, and we have this during testing. It's difficult to 100% distinguish this from silent and very bad lock leaks.
Problematic code:
__try
{
SomeFunction(); // throws an exception with a CS held, e.g. heap code
}
__except(1)
{
DPRINT1("Oops. let's just pretend it's all ok!\n");
}
Implemementing missing features...
JIRA issue: CORE-19278
- Add netapi32 and secur32 delay importing.
- Move function definition from stubs.cpp into utils.cpp.
- Include some security headers in utils.cpp.
- Adapt <secext.h> to C++.
- Add prototype to <undocshell.h>.
CORE-18304
The included Telnet client does not support displaying messages with Unicode characters in them.
This is a problem, because even though localisation for the program was made for ReactOS,
it doesn't work properly.
- Make the `printm` function load and format messages using wide character APIs instead of the narrow ones.
- Add format specifiers to the resource files (this is necessary, as there are a lot of places, where narrow strings
are used in the program, and passed as parameters to `printm`).
Improvements based on recent Romanian translation document revision 06e89b2.
This file was not translated in Romanian language in any Windows version (neither XP/2k3+, nor in the previous ones).
I tried to translate this file as close as possible in the way I did in the previous PRs.
i.e. fix build.
When these get synced with more recent Wine version, you can remove
this define once you get past a "Enable compilation with long types"
Wine commit or similar.
It is not wishable anymore to automatically define __ROS_LONG64__
whenever __WINESRC__ is defined. Indeed, Wine now has started to
introduce the possibility to "Enable compilation with long types".
Thus, for these modules we import from them, we want to be able to
define __WINESRC__ without __ROS_LONG64__ automatically defined.
Addendum to commits 89c3520c86 (r73383) and 75eeb2a7e4 (r38872).
This is because GCC will generate errors for both const_cast and static_cast depending on the template parameter:
- With const_cast: error: invalid 'const_cast' from type 'std::nullptr_t' to type 'const wchar_t**'
- With static_cast: error: invalid 'static_cast' from type 'wchar_t** const' to type 'const wchar_t**'
On GCC the code using extended ISA cannot be inlined and must either be marked with a function attribute or compiled with the proper target options ('-mavx2' on the command line or '#pragma GCC target("avx2")' inside the code)
This is used with Clang, which does have native SEH, but it's broken and can cause the compiler to crash. Previously some code was not handling this and instead used native SEH for clang. Fix this by always using _SEH2_* macros instead of relying on __USE_PSEH2__ to be defined.
Improve consistency of code management.
JIRA issue: CORE-19278
- Move SHOpenPropSheetA from
utils.cpp into propsheet.cpp that
contains SHOpenPropSheetW.
PAGE_ROUND_DOWN macro seems to not work correctly with LONGLONG values. It creates some random freezes in the 1st-stage setup after commit 69bf140506.
It's fixed by creating PAGE_ROUND_UP_64 and PAGE_ROUND_DOWN_64 macros for 64-bit only data types.
---------
Co-authored-by: Thamatip Chitpong <thamatip.chitpong@reactos.org>
This is used with Clang, which does have native SEH, but it's broken and can cause the compiler to crash. Previously some code was not handling this and instead used native SEH for clang. Fix this by always using _SEH2_* macros instead of relying on __USE_PSEH2__ to be defined.
Try to improve things
For some unknow reason some intrinsics fail to get inlined. Using extern inline results in a linker error. Change it to static inline, so that there is a static implementation in case it doesn't get inlined
#pragma function(llabs) causes an error: "error: no_builtin attribute has no effect on defaulted or deleted functions"
This is probably a bug in clang, see https://github.com/llvm/llvm-project/issues/116256
- Declare CMBATT_DISCHARGE_TIME and CMBATT_CAPACITY_BOGUS constructs
- Determine if the battery was already discharging and if not, update the time when it's being discharged
- Fix the condition where it checks if the battery has been discharging for quite some time
- Default the time to BATTERY_UNKNOWN_TIME if querying the estimated battery time request fails or if the battery has just started discharging not over 15 seconds
CORE-18969
CORE-19452
Addendum to commit dbc7eeb47e (PR #4303).
The argument to get_temp_buffer() should specify the length of the
string being buffered + 1 (for the NUL-terminator).
The original code wrongly interverted this with specifying the buffer
shifted by one character.
Get rid from bogus SearchPathW() call, which is marked as most likely not needed in the comment above (by Wine). Simply get a length of the file name and use the file name directly instead, with checking for its validity too. Similarly as it's done for other cases.
That call seems actually not needed because it is already done using SearchPathW() in another parts of the code in this file, before calling SHELL_ArgifyW().
Fixes another heap corruption when trying to login via OAuth menthod in SpotifyXP 2.0.3 Beta (nightly build). The previous commit did not fix the bug fully, as I discovered it later.
CORE-19953
Windows SDKs define this constant to 0xFFFFFFFF but we define it to 0x80000000.
As a result, when our COMPBATT driver is being tested on Windows (namely XP, Vista and 7), BATTERY_UNKNOWN_TIME is not interpreted as UNKNOWN TIME but entirely something else.
CORE-18969
CORE-19452
IoInitializeRemoveLock expects an allocation tag to be provided when it allocates debug data in the kernel.
Passing 0 leads to a bunch of ASSERTs in the kernel as such data is allocated by ExAllocatePoolWithTag of which a tag has to be supplied, it's not optional.
- Introduce some new constructs
- Annotate the function prototypes with SAL2
- Re-structure & remove some useless fields in COMPBATT_DEVICE_EXTENSION and COMPBATT_BATTERY_DATA
Because SHOpenPropSheetW() is modal, there is no way for us to keep COM
alive on the original thread until the dialog completes, so a cloned
data object is used instead so that the property sheet handlers may access
the object even after ShellExecute() has returned (this is only relevant
for callers like Taskmgr that does not initialize COM even though MSDN
says they should).
Addendum to afc130ff3f (PR #7571). CORE-19933
- Fix typos and improve Portuguese (pt-PT) translation.
- Add missing accel keys and fix accel collisions.
- Improve Portuguese (pt-PT) translation. Fix text box width to fit all text.
- PartMgrAddDevice(): If IoAttachDeviceToDeviceStack() fails, bail out
immediately, instead of continuing initializing the device extension
then deciding to fail.
- PartitionCreateDevice(): Initialize the fields pertaining to parent
device linking in the partition device extension, before the other fields
(following in a similar way what's done in PartMgrAddDevice).
If an out of range dialog box number was given in a single comma syntax
for Control_RunDLL(), it should be set to 0 to launch the default dialog
box instead of failing.
Addendum to dcf9eb060a. CORE-19580 CORE-8981
_BIX is basically _BIF but with more information added, such as cycle count, measurement capacity accuracy and whatnot.
Starting with ACPI 4.0 _BIF is rendered obsolete and as a matter of fact a lot of modern hardware fill their ACPI machine data to _BIX.
ReactOS must go forward and beyond, compatibility with _BIF is kept. NOTE that a machine can ONLY support one battery static information method!
CORE-18969
CORE-19452
damage to your time machine warp core.
UNEXPECTED_NEW_YEAR_TIMESLIP
If this is the first time you have seen this Stop error screen,
restart your time machine. If this screen appears again, follow
these steps:
Check to make sure you wish the ReactOS Community a
🎊🍾🥳 *:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:* 🎆⚛️☢️
█ █ █▀█ █▀█ █▀█ █ █ ██████╗ ██████╗ ██████╗ ███████╗ ██╗
█▀█ █▀█ █▀▀ █▀▀ ▀█▀ ╚════██╗██╔═████╗╚════██╗██╔════╝ ██║
▀ ▀ ▀ ▀ ▀ ▀ ▀ █████╔╝██║██╔██║ █████╔╝╚█████╗ ██║
█▄ █ █▀▀ █ █ █ █ █ █▀▀ █▀█ █▀█ ██╔═══╝ ████╔╝██║██╔═══╝ ╚═══██╗ ╚═╝
█▀██ █▀▀ █ █ █ ▀█▀ █▀▀ █▀█ ██▀ ███████╗╚██████╔╝███████╗██████╔╝ ██╗
▀ ▀ ▀▀▀ ▀▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ╚══════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═╝
🎆⚛️☢️ *:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:* 🎊🍾🥳
Also, ensure you use the latest nightly ReactOS version and run it
attached to a debugger.
If problems continue, Keep Calm And Carry On Developing. Test your
code more thoroughly, use a sane compiler and debugger, or ask any
questions on ReactOS' official Mattermost channel.
Technical information:
*** STOP: 0x42000042 (0x67747770,0x000007E9,0x00000001,0x00000001)
*** jira.reactos.org - Address chat.reactos.org Base at reactos.org
*** github.com/reactos - Address git.reactos.org Base at reactos.org
- Update the page title and subtitle.
- Embolden the types of installation.
- Introduce title and subtitle for the upgrade/repair page
(not translated yet).
- Rewrite the introductory text.
- Add a temporary (ReactOS-Alpha) informational message.
- Hide the "Back" button when the Welcome page is active, and
show it back again when switching to the following ones.
Commit 325d74c30f (PR #7437) introduced a side effect that made impossible
to expand a folder when it contained both a ZIP file and subfolders.
Fix this by ignoring the return value of BrFolder_InsertItem and free the
pidlTemp pointer explicitly in all cases.
CORE-19955 CORE-19751
https://gitlab.winehq.org/wine/wine/-/blob/wine-10.0-rc3/dlls/shell32/shlexec.c?ref_type=tags#L6310bad544aab
Import new path handling code from Wine 10.0-rc3. It uses PathResolveW(), which was hacked in ReactOS for a long time but has been implemented properly starting from 0.4.15-dev. So now it should work correctly, and we don't need to use SearchPathW() anymore.
This fixes a heap corruption from shell32.dll when launching SpotifyXP 2.0.3 Beta and trying to login with Spotify credentials via OAuth login method. Also it fixes the same heap corruption when pressing Update button in CCleaner 5.39.6399.
CORE-14670, CORE-19953
Pressing Shift-F10 to open cmd.exe when the setup program runs from
a different current directory than System32, now works correctly.
Use the 2nd CreateProcessW() `lpCommandLine` parameter, instead of the
1st parameter `lpApplicationName`, so as to use default path search.
The command-line buffer given to the 2nd-parameter can be temporarily
modified by CreateProcessW(), thus use an on-stack buffer.
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw#parameters
Fixes build error:
../src/dll/win32/shlwapi/ordinal.c:5417:63: error: passing argument 3 of 'StrToIntExW' from incompatible pointer type [-Werror=incompatible-pointer-types]
if (!StrToIntExW(V_BSTR(&vargTemp), STIF_SUPPORT_HEX, &V_I4(&variTemp)))
In file included from ../src/dll/win32/shlwapi/ordinal.c:45:
../src/sdk/include/psdk/shlwapi.h:1682:52: note: expected 'int *' but argument is of type 'LONG *' {aka 'long int *'}
BOOL WINAPI StrToIntExW(_In_ LPCWSTR, DWORD, _Out_ int*);
^~~~
PropSheet_SetCurSelByID() was badly called in response of PSN_WIZBACK or
PSN_WIZNEXT notifications. See the reference on these notification codes:
https://learn.microsoft.com/en-us/windows/win32/controls/psn-wizback
> Returns 0 to allow the wizard to go to the previous page. Returns -1 to
> prevent the wizard from changing pages. To display a particular page,
> return its dialog resource identifier.
> (...)
> To set the return value, the dialog box procedure for the page must call
> the SetWindowLong function with the DWL_MSGRESULT value and return TRUE.
This bug sometimes causes the wrong page to appear (e.g. "Previous" in
IDD_NODRIVER should come back in IDD_CHSOURCE, but goes to IDD_WELCOME).
They are redundant when these are already present in the given module's
root resource file, from which the language-specific resource files are
being included.
- A caller of LsaRegisterLogonProcess is a trusted caller if the calling process has got the Tcb privilege, otherwise it is an untrusted caller.
- A caller of LsaConnectUntrusted is always an untrusted caller.
- A caller of LsapOpenLsaPort is always a trusted caller.
Fixes clang build, since ubuntu-latest (24.04.1 LTS / Noble Numbat) has no
LLVM 13 package available:
```
Ign:6 https://apt.llvm.org/noble llvm-toolchain-noble-13 InRelease
Err:9 https://apt.llvm.org/noble llvm-toolchain-noble-13 Release
404 Not Found [IP: 151.101.46.49 443]
Reading package lists...
E: The repository 'http://apt.llvm.org/noble llvm-toolchain-noble-13 Release' does not have a Release file.
Error: Process completed with exit code 100.
```
* [SHELL32] Use FS compatible PIDL format for Recycle Bin items
This allows SHChangeNotify to handle these items and DefView will correctly update the recycle folder.
CORE-18005 CORE-19239 CORE-13950 CORE-18435 CORE-18436 CORE-18437
Add support for configuring the CM lazy-flush and delay-close variables:
`CmpLazyFlushIntervalInSeconds`, `CmpLazyFlushHiveCount`,
and `CmpDelayedCloseSize`,
using REG_DWORD values named respectively:
`RegistryLazyFlushInterval`, `RegistryLazyFlushHiveCount`,
and `DelayCloseSize`,
in the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager` .
Extra observations:
- While delay-close support exists in Windows 2003, configuring
the delay-close size is possible only in Windows Vista and later.
- The possibility of configuring the lazy-flush hive count has been
removed in Windows 8+.
See the comparison tables at:
https://redplait.blogspot.com/2011/07/cmcontrolvector.htmlhttps://redplait.blogspot.com/2012/06/cmcontrolvector-for-w8.htmlhttps://redplait.blogspot.com/2016/03/cmcontrolvector-from-windows-10-build.html
In addition:
Remove `CmpDelayedCloseIndex` from cm.h as it is not used anymore in our code.
We do have IDS_PWR_HOURS_REMAINING and IDS_PWR_MINUTES_REMAINING string resources but they're never used programmatically.
Display the estimated battery time ONLY if the returned time is not unknown.
CORE-18969
CORE-19452
BatteryClassStatusNotify is used by battery miniport drivers to notify the Battery Class of a status change. This can either be a battery status change or battery tag assignation, depending on what the device extension (namely the composite battery) waits for.
We do have implementation for EVENT_BATTERY_STATUS but not for EVENT_BATTERY_TAG. What happens is when BatteryClassIoctl fails to query the battery tag because it has not yet been assigned, the thread is stuck on waiting for the event object to be signaled, forever.
This tipically happens when a timeout of -1 (meaning the calling thread must wait indefinitely) is supplied. The composite battery driver (COMPBATT) is responsible to signal the Battery Class when a CM (Control Method) ACPI battery receives a tag, which then this function will signal the event.
CORE-18969
CORE-19452
ReactOS (like any other OSes) expects power data to be represented in milliwatts per hour, not in milliamps per hour.
Currently CMBATT defaults the stats to unknown values, if that's the case, and there are a bunch of machines that do report their data from _BIF ACPI method in ampere.
CORE-18969
CORE-19452
KeWaitForSingleObject takes 100ns unit for timeout. Both IOCTL_BATTERY_QUERY_TAG and IOCTL_BATTERY_QUERY_STATUS take a wait for the timeout in milliseconds.
Supposedly a miniport driver wants to supply a wait of 5000 ms (which is equivalent to 5 s), the miniport driver WON'T BE WAITING 5 seconds but 0.5!!!
CORE-18969
CORE-19452
This is a temporary helper for the system call entry point to store the user mode stack, before switching to the kernel mode stack. Initially it was copied to the trap frame inside KiSystemCallHandler. This has been moved to the system call entry point, but some remnants remained. The problem is that KiSystemCallHandler can be called twice in a system call (when the call is the first GUI call and the stack needs to be extended). In that scenario, when the thread was preempted, a new value could be saved in the PCR before running KiSystemCallHandler again, and then overwriting the proper value with a bogus one from a different thread. This rarely seemed to happen on UP, but happens a lot with SMP.
Addendum to 0.4.16-dev-323-g c212c184f3 (#7352).
In the usage help message one line started with '\pentru', but it should have been '\tpentru'.
Fixes GCC compiler error:
base/applications/mscutils/eventvwr/lang/ro-RO.rc:177: unrecognized escape sequence
Co-authored-by: George Bișoc <george.bisoc@reactos.org>
Its support is controlled with a REG_DWORD value named
`VolatileBoot` inside the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager` .
Its implementation is very trivial: when enabled, CmpShareSystemHives
is set to TRUE and doesn't change state during runtime.
In a sense this is similar to what happens in WinPE-boot, except that
ALL hives without exception (system hives and others) will be loaded
in shared mode.
This is controlled with a REG_DWORD value named
`SelfHealingEnabled` inside the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager` .
The `CmSelfHeal` variable is used to retrieve the data,
hence it needs to be a ULONG.
The REG_DWORD value `AutoReboot` stored in the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\CrashControl`
(used as a boolean value), controls whether to automatically reboot
the operating system at the end of the crash dump, after a bugcheck.
ReactOS doesn't currently implement crash dumps, so only the auto-reboot
is done. (The reason of the apparent redundant `Reboot` variable in
KeBugCheckWithTf() is because that variable would be updated on return
by the not-yet-existing crash-dump helper routines called from there.)
- Directly call KdpGetMemorySizeInMBs() within KdpPrintBanner(),
instead of having the caller doing it.
- Use the miarm.h MiIsMemoryTypeInvisible() helper.
- Add Doxygen comments.
- Move local variables to the code blocks where they are used.
- if-s one-line bodies on their own lines.
- Massage the boot-images symbols loading, using a for-loop.
PeLdrCheckForLoadedDll():
- Use a for-loop to iterate over the linked list.
- Adjust few comments.
- Use SAL2 annotations.
PeLdrpCompareDllName():
- Make its input paramters const.
- Use SAL2 annotations.
See https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlqueryregistryvalues
The RTL_REGISTRY_OPTIONAL applies to the first parameter of the
RtlQueryRegistryValues() function, not to the Flags member of the
table entries. However, a RTL_QUERY_REGISTRY_REQUIRED flag exists
to mark values whose existence is NOT optional.
Problematic usage was introduced in the following modules:
drivers/input/i8042prt: Commit e7e959fb0 (r30000)
drivers/input/kbdclass: Commit 5a77f871d (r18911)
drivers/input/mouclass: Commit aeeab7d1f (r18906)
drivers/input/sermouse: Commit 3f348259c (r19100)
rosapps/drivers/green : Commit c8a90f769 (r21165)
Override DbgPrint(), used by the debugger banner DPRINTs,
because KdInitSystem() can be called under the debugger lock
by KdEnableDebugger(WithLock)().
In this case, when DbgPrint() (re-)enters the debugger via an
interrupt and acquires the debugger lock, a deadlock occurs.
- The debugging banner helpers *CANNOT* be in the INIT section, because
it is possible for KdInitSystem() to enable the debugger **MUCH LATER**
after boot time. (Reverts part of commit f239ca0f0 (r72922).)
This can happen in two situations:
* When the debugger is in CRASHDEBUG mode, i.e. initialized at boot
time but not immediately enabled, and a BSOD happens later that
enables the debugger with a `KdInitSystem(0, NULL)` call.
* When the debugger was possibly manually disabled with a
KdDisableDebugger() call, then later re-enabled with a
KdEnableDebugger() call.
- In the same cases as described above, the KeLoaderBlock is freed after
boot time. Thus, KdpGetMemorySizeInMBs() cannot use it and enumerate
the MemoryDescriptors to evaluate the number of physical memory pages
available on the system. Instead, we can use what the memory manager
has already computed, since the latter is already initialized by now.
These two fixes avoid (invisible) crashes when (re-)enabling
the debugger at non-boot run time.
I.e. when LoaderBlock != NULL and we have loaded the initial hal and
ntoskrnl symbols. KdBreakAfterSymbolLoad is then checked for when the
other boot symbols have been loaded by ex/init.c!ExpLoadBootSymbols(),
invoked by ExpInitializeExecutive().
Use the PE import table's OriginalFirstThunk array when scanning and
resolving imports during DLL binding.
It points to an array of pointer-sized IMAGE_THUNK_DATA structures
which describe the functions being imported. On the other hand, the
FirstThunk points to an array of pointers, whose initial values are
a copy of those pointed to by OriginalFirstThunk, but are replaced
by the actual function pointers determined at runtime, when a DLL
is loaded (see PeLdrpBindImportName() function).
If we were to use the FirstThunk array to find again later the imports
by name or ordinal, we would fail because these are replaced by the
addresses of the corresponding functions.
This fixes loading kdcom.dll from Windows XP x64 with FreeLDR when
testing on ReactOS x64.
```diff
(freeldr\freeldr\lib\peloader.c:498) trace: PeLdrpScanImportAddressTable() ---- Calling PeLdrpBindImportName() in a loop
(freeldr\freeldr\lib\peloader.c:501) trace: *** ThunkName->u1.AddressOfData = 00000000000070F0
(freeldr\freeldr\lib\peloader.c:502) trace: *** ThunkData->u1.AddressOfData = 0000000000573780
(freeldr\freeldr\lib\peloader.c:209) trace: !!! ExportDirectory->NumberOfNames 1504
-(freeldr\freeldr\lib\peloader.c:210) trace: !!! ImportHint 0 - ExportName 'CcCanIWrite' - ImportDataName ''
+(freeldr\freeldr\lib\peloader.c:210) trace: !!! ImportHint 282 - ExportName 'HalPrivateDispatchTable' - ImportDataName 'HalPrivateDispatchTable'
....
-(freeldr\freeldr\lib\peloader.c:268) err: Did not find export ''!
-(freeldr\freeldr\lib\peloader.c:709) err: PeLdrpScanImportAddressTable() failed: ImportName = 'ntoskrnl.exe', DirectoryPath = 'multi(0)disk(0)rdisk(0)partition(2)\ReactOS\system32\'
```
('-': lines before the fix; '+': lines after the fix)
Code has been adapted based from the following functions:
ntdll/ldr/ldrpe.c!LdrpSnapThunk() and LdrpSnapIAT()
ntoskrnl/mm/ARM3/sysldr.c!MiSnapThunk() and MiResolveImageReferences()
References:
https://devblogs.microsoft.com/oldnewthing/20231129-00/?p=109077https://devblogs.microsoft.com/oldnewthing/20231130-00/?p=109084https://stackoverflow.com/questions/42413937/why-pe-need-original-first-thunkoft
CORE-13525
Notes:
- Most of the exported functions have been turned from default cdecl to explicit stdcall / "NTAPI".
- The two InitializeSetup() phases have been collapsed to make the initialization simpler.
Average reductions (percentages; see PR #7523 for actual numbers):
x86 Debug builds:
reactos.exe: 35.1%
smss.exe : 39.8%
Total (including setuplib.dll): 17.9%
x86 Release builds:
reactos.exe: 22.3%
smss.exe : 25.0%
Total (including setuplib.dll): 10.6%
x64 Debug builds:
reactos.exe: 40.6%
smss.exe : 41.6%
Total (including setuplib.dll): 20.0%
x64 Release builds:
reactos.exe: 22.8%
smss.exe : 22.3%
Total (including setuplib.dll): 10.1%
Use name from public Windows SDK for 'Network Connections' CLSID, available since Windows SDK 6.0A (Visual Studio 2008 or higher).
Replace all such instances in netshell, shell32, apitests/com.
- Partially reverts/refactors commit bea0b47
- Follow-up to PR #7266
Improves detection of Explorer being the default shell.
- Check the "Software\Microsoft\Windows NT\CurrentVersion\Winlogon" key to see if Explorer is the default shell.
- Use this check to determine whether to start the desktop and taskbar or only open a file browser window.
JIRA issue CORE-19887
- Implement SHOpenPropSheetW.
- Reuse already opened propertysheets and format dialogs by finding the existing unique stub window.
- Default .lnk property dialog to the shortcut tab.
* [WINESYNC] msvcrt: Respect allocation mode in malloc.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 70ac780e6ed26380fd2fcdfbb96352ca8548bc79 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _callnewh in operator new implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 7e9cba139d30d3b48567baaf6a8b901143c738e7 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Reimplement _set_new_mode function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6113a251ef3955f2ac3436d90a523faf4c03bc0a by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] ucrtbase: Change ptd fields offsets to match with native.
Makes it possible to use native vcruntime140_1.dll.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 9b94e4c80580325e62097ed6c08cc37c28575470 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use __ASM_BLOCK_BEGIN and __ASM_BLOCK_END macros.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3f8ac955de59da9f81a17ccf9d20c7402d6b1773 by Jacek Caban <jacek@codeweavers.com>
* [WINESYNC] msvcrt: Use __ASM_USE_THISCALL_WRAPPER macro.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 95e117b3dcd604b544b816c230a4ee8252f0f2f9 by Jacek Caban <jacek@codeweavers.com>
* [WINESYNC] msvcrt: Use internal sprintf implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id bfa1e3ef8f592d74f1dfcc89ba940946ad327591 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Print assertion failure messages to stderr.
This matches Windows behaviour. In particular, redirecting stderr with freopen()
followed by assert(0) will print the failure message to the relevant file.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3533605293e8083dae19c5fbd41e2077faf5adc6 by Zebediah Figura <z.figura12@gmail.com>
* [WINESYNC] msvcrt: Don't use strncmpW in msvcrt_get_flags.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id c6f19b121e74935689eb9666d0d21729a713c2ad by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _wcsnicmp instead of strnicmpW.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 54b2a10659871032720df31ae9ca6cba2ff4acf0 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Don't use tolowerW in _tolower_l.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 0b35b779151d766f6741bc32d3b6d3c8d81f1cc4 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Don't use tolowerW.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id bc47bff4a888872363005da93fe0b714493c835b by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Don't use toupperW.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a81f55093e11a12c25938dada2e3d7f0c8dfe86c by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add _ismbcalnum_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 19c05e60a3cbb7dfa040b919e8783d571fc6ae01 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add _ismbcdigit_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fd74aeb726e65c62a9e110bdbf282549cb8afce0 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add _ismbcgraph_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 71cd3d5e8ce831abe5f601671b307ecff8692f01 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add _ismbcalpha_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5f294e34d6eab6a217991994443c347aa44684b7 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add _ismbclower_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1ad209428442e5c571b8a8478c3821e6c303b3a9 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add _ismbcupper_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 95b3ff9f74ada220295128ceee34a8e191b93baa by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add _ismbcprint_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1750a6969becfb02f0fee9447878d4374db652ab by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add _ismbcpunct_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 986aa52fc41e1cf022cc72a0f40996937bb567dc by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Don't use get_char_typeW in _iswctype_l.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 068a419e4219c5bb5d8156ff9177676d9c174021 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Copy wcscat implementation from ntdll.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2c5bf68a5e7525ae9c50ee0dfc6d819da79c4861 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Don't use wine/unicode.h header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 536be09b8449537925ad4635a06ae45283075c2e by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Introduce fpnum structure that can be used to represent 64 and 80-bit double.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 450015781e7ad45a79df01225ee75271563317ce by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Don't use strtold in __STRINGTOLD_L.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a22adf1893d510660d7eeea5ef290399ce21e8b5 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] ucrtbase: Support _CRT_INTERNAL_PRINTF_STANDARD_ROUNDING flag in printf.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 25cc6ff62d22220f6da742fa47a7f5fe80ed0c1b by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Handle rethrowing from nested try blocks on x64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f65fb09dff86dbb87564264481a23b1179e8d890 by Paul Gofman <pgofman@codeweavers.com>
* [WINESYNC] msvcr120: Add imaxabs.
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1bb193238fa9eb73668b1dd1bb086105af25727c by Myah Caron <qsniyg@protonmail.com>
* [WINESYNC] msvcrt: Fix count parameter type in printf functions family.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 68ca61a555b3118836dbf7b666686e1de3d988b0 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Implement _mbbtype_l().
Fixes Midnight Castle Succubus.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id ebe3fe536c6c0eb8d8144e9235ea8d1f88aa5657 by Paul Gofman <pgofman@codeweavers.com>
* [WINESYNC] msvcrt: Terminate on noexcept function trying to propagate exception (i386).
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 26c1f8fb07790f51c0fbe0012144e213edccd8ed by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Terminate on noexcept function trying to propagate exception (x86_64).
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8468a3ed77ba22d9a33b2251240e2a4e5462e1b7 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Make locale and thread helper functions CDECL.
This prevent callers from having to save SSE registers to the stack.
It is for instance the case in MSVCRT__towlower_l, which is called on
every character by MSVCRT__wcsicmp_l.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a24ad51e3f2515c1970b56f8dfe2206e2b282dc9 by Rémi Bernon <rbernon@codeweavers.com>
* [WINESYNC] msvcrt: Introduce noalloc current locale lookup helpers.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id faf92fdedb16a6e35c556e389bf5ac7241058f75 by Rémi Bernon <rbernon@codeweavers.com>
* [WINESYNC] msvcrt: Add floating point classification macros.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id b9002cc8c7ae16b4a61476834318bcefd638e34f by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Use the msvcrt math functions internally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1be5e83859229d0e8a6c4fb3913865beea00a085 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Use the msvcrt ctype functions internally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id b7fe06d0fa6dbad7d2c3ae380557adcaa10b89f8 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Use the msvcrt atoi() function internally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f48648aeec69f74899ba2f074b60aeb0de03615b by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Use the msvcrt string functions internally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2fb08bed46fec302954578038566593bb108b57c by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Move math functions to a new Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id c72e1b096d16a1e9a36b86fbc8c403ec3653a504 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Share ctype tables between threadlocinfo instances.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5ec7cb5a7f20afd6eef33d5799fb4c5c1ddaebe1 by Chip Davis <cdavis@codeweavers.com>
* [WINESYNC] msvcrt: Share __lc_time_data between threadlocinfo instances.
My testing shows that unk[1] is some sort of refcount.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 898abfc18f409357939e66cd9a6767d4bc5b0672 by Chip Davis <cdavis@codeweavers.com>
* [WINESYNC] msvcrt: Enable multi-thread locking by default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6482ce7666a5f8beb92879af5ae3fde3782627d7 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Build with msvcrt headers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 191bdeaff3676f192148e17c6369865ec94c2ba2 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Don't overwrite threadmbcinfostruct structure in _setmbcp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 35a8f15361022d9195bd141aa67b22e06007fa16 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt/tests: Remove the headers test.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 86b0a633c68dfceb884a74528c407ba359f10991 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Remove some duplicate definitions from msvcrt.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1f11f41f613264dd5b937d0df0a3ee746db0517c by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Move the fenv_t definition to the public header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 34422eb56cad1ba799270bc6dd56f31bec86023a by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Use the public standard type definitions where possible in msvcrt.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 0edef50dfae4ec294a949654fa1e03700b954dcb by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Introduce flags field to describe locale stored in thread data.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 4fc2b7293378be93275e316c3940e7d21b5bda09 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Lock _MB_CP_LOCK lock in setmbcp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d5b2c3f233d2a7263f3b79133ce6216fa991c1f2 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_lconv type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 70c06601e6bc44aa7b78f440b43c5accbcf32038 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_pthreadlocinfo type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d5c0458bd17e1759d25a94038414bf5d4f84a828 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_pthreadmbcinfo type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d496099c74ba7ce4d445a14dceb22b2de2ab0ec5 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT__locale_t type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5114c85a0365d29f49c63ca967dfd2e9159c6338 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT prefix from locale functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 17f3f548861dc2c7502690b7d3183e3b9b8a5510 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_wchar_t type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id c302397c7375157ccca7de977d83c95f38015238 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use type ranges definition from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 758460faf7080efaadfe92a221ad6c623f561be9 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use simple type definitions from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fa272adaeb9df503a8fe04d503e07a41ae0c32a0 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use WEOF from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 7acfe8fb73d88c354dcec0f56c3cdc6acacbdc04 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use EOF from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8180f4001a6d5a0befe6dfb4c0c3118853b7a413 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use struct tm from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6c4b7758c691fad6fd5b5f629a8a01b6bc2f961a by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from cpp.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 772f0331aa1c4e24f97ca5c5ae27a65805cea8d9 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _beginthread_start_routine_t from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fbc9110d232fd5e86113fc73153b754278e0f5e9 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use errno values from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1317b935efaa841e8842b848d422d1bf2471e448 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _onexit_table_t from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id babe6ceb7f7b206ce8181e35934fc0aa1ee02ae5 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use printf and scanf flags from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id eb6f79f96a81371d328476d255e27d3a47925b13 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _CRT_FLOAT and _CRT_DBL from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 811647dff44ab93b89200d873d7707a02331d89a by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _exception definiotion from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 595ee43c48dc75ebc03900b027d000ebd15dffd4 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use locale category definiotion from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e9a1ff11302bbcbb3db68fa4bbd827a7958067ca by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from errno.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id eeada5682b68ae2400271dbda0634be186f962b7 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from heap.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d784dbb89993d0565ea132109b110cc9500c97f4 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use FILE from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 926179938308b49a2ede5e9196d28535cfec782c by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use __utimbuf{32,64} from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2d471db92f0df5d0682369651c0cbb94312cc988 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use ctype definition from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id eabef91a9701ac72c91e64d946d31d829da92d3a by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use status word flags from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 09d018c73d4dbaeddf19333e9c5c6fae51d4c1ec by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use fpclass constants from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 480e25a5f6ae432f4688c79dbf7f0008a740aab6 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _ARGMAX from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 45ac13551966f7a89ad4678fbc0f76f858663bcb by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use floating point exception signals definition from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 9e085387ac8e6a6c34bc6e7bec8135ef84a247d6 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use signal definitions from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2d96d03006798dd64d42735ffbc3dc76fe6a1174 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use fpclassify constants from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d571f377e40082bf234c5b2e3b128598a370ae6b by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use FPU control word definitions from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 4674860303badca0b88436fdc9c7d5be4f00b1b8 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from ctype.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 176aebb0c568e75043012fb0e6d61d6862323993 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from data.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 495f24ebb82af9864287f9cbc39aa4db108979d2 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use heap structures and definitions from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6d799bfa06a818b068bec6ce540477f89d4f63e1 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use stdio.h definitions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 0d479b9d8c54184cce9678b3095bf01d5b4a473c by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from environ.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 9011b0b7c05c481ff043357be655f1fc7e66b924 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from except.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6bd9ea5be9c1e53d2cf7369c5eb75817b3c80df5 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from exit.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2c35caa7671ec4fbf90651e3301cfc58c011031c by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from mbcs.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 065cf4e71496d96baf5f7ff35af4f0bbfee9d1a8 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from misc.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 0364b7681fd6f628b06a9653119cd4f7d1c5cfdb by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from process.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f10c1118e2c2159140d32730f2e49ec70f37bd33 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from scanf.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a1662e3f7d6626618dc0158627ffbe8cf2c81be0 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from string.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1514c54ce560acadb4cacb77cd4ee5915e8dbd67 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from wcs.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6ad42ee7f4df2a3a731e404f090abe383d40dd1c by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from math.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 4f2f3545e59c00aac92448aebe7484467a8cedce by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from dir.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 41fa6e4b6f0e64bfe8be35c215a3c01d8290700c by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove MSVCRT_ prefix from file.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1913affb7b4ee57740a0322e6962d588ae62aca0 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _invalid_parameter_handler from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 264ba46bcdcd2119c2f9712ba52bb74c35bd369b by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _purecall_handler from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 200fe8ac42ff0800c784ec686ccf494391f6907b by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _Dcomplex definition from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 494a78940735ab31bef9a8ae1d5e58175667df37 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _JUMP_BUFFER from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 835a83e3f9699a83482bc5e74d2e931d87cb1a5a by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _finddata_t definition from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8a2dc3aa42551da56dfc3fb9f1b3979c032a9738 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _stat64 definition from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 951968c88a2a705ebe7bbb1ac02cd64f8f899f5b by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove non-needed defines from msvcrt.h.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f67f1ce79ee98f88aedde3a915bb6d85b9a934ab by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Remove non-needed function declarations from msvcrt.h.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 79e950bb7989809f62573e3209f2cb1bc0852d6e by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use _configthreadlocale arguments definition from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a7b9948f396a904b43851105f14e86455ebae703 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] ucrtbase: Improve __intrinsic_abnormal_termination stub.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e734d729461855a5ddaf81f4e08e0cc2b3286e37 by Jacek Caban <jacek@codeweavers.com>
* [WINESYNC] msvcrt: Use __ASM_USE_THISCALL_WRAPPER in cxx.h.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id df446b9c21f52b917a9c2a360bccaed35896a32e by Jacek Caban <jacek@codeweavers.com>
* [WINESYNC] msvcrt: Improve memmove performance on i386 and x86_64 architectures.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49663
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 38c490496000c5852f14e9c022868c5107d9ff03 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Make __lc_time_data more similar to native.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 859261f4809a47fd030b605a6e418b7ac52f0790 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Lazily initialize console handles.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d5ab1401c0988b8c8c14ae7c64da0a55f4e4bbeb by Rémi Bernon <rbernon@codeweavers.com>
* [WINESYNC] msvcrt: Add helpers for creating base class RTTI.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 16f6a567f4c259bc9b856558f4deebd2f4aeb88c by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Fix _unDName crash when demangling class function pointer.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 7a1e7cbeee94756f3c474ba63b9fe9db8bddde3a by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] include: Disallow wcsncpy() in Wine, similarly to strncpy().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id b35404aa61bf9d5c95ba9b51adb57df7cec1827b by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Make UCRT _beginthread[ex]() hold the DLL reference.
MSVCRT's _beginthread[ex]() doesn't exhibit the same behavior and using
ThreadExit() does leak the reference.
FreeLibraryAndExit() has to be used because the DLL may be the only user
of the given CRT.
This fixes Baldur's Gate 3 crashing shortly after launch.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 7435ca85453079283da43d716fac48aa1bf5ca3f by Arkadiusz Hiler <ahiler@codeweavers.com>
* [WINESYNC] msvcrt: Allow specifying destructor in DEFINE_CXX_DATA macro.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id bc05707364d722c7b8c105709962cb78c0469cd4 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Add macro that defines type_info vtable.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6c4cddc4f6324cfd6d37e269aaec111a8a665e22 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Rename scheduler.c file to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id eff57ac9c6280751f5f51a66fcac05d6f842fecb by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Move _Trace_ppl_function to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id ce5c989171f458842bee6e168a65dc36d2ec61d5 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Rename exception::what() implementation to exception_what.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f1fa214b9f936bd91fecbfd6f05436d22311f4dd by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Introduce macro for creating exception class.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f6f8b30c47bc28be5df692743fcf81c7952153ce by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Move improper_lock implementation to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id ef81cfb5fbc6d8f2b892c2782bdd469a5bb2f526 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Move scheduler_resource_allocation_error to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a8decf5c1511019e3cb22a0e4db06cb0e6b121b2 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Move invalid_scheduler_policy_key to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 635f59f2765c03a91b589b810a898bb0b0e566e5 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Move invalid_scheduler_policy_value to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a7bbdea08994625411c94da97ef6b5fbcfb5aaf6 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Move invalid_scheduler_policy_thread_specification to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id c9189a411b7941377cb414eed15d1ce02d43959c by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Move improper_scheduler_attach to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 9694fc11fee300134486ee359b525afe098748c8 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Move improper_scheduler_detach to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 1c9a30f217ef0afcfeb86acf3911e51e81f49880 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Simplify throw_exception helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5e3f959aed66b719d845e9e81b282210758444b0 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Fix _CxxThrowException prototype.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id c306c527e708df33a67d31667be75adcbcbc7d7e by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] ntdll: Move some exception definitions to winternl.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 97479d3d32cd1adf1a77f74b19ecfd0560b78128 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] include: Use the standard va_list instead of __ms_va_list when building with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2a92c58e1152e1d80395cf31d7cd3f282d094540 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ucrtbase: Avoid bool optimization in __std_exception_copy.
Otherwise GCC changes do_free = 1 assignment to *dst = *src which breaks
ucrtbase/cpp tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 21da1f2f1143cfc154a8d46c51d4922ff71008d6 by Piotr Caban <piotr@codeweavers.com>
* [WINESYNC] msvcrt: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d8ed47ec21b255976131c82e4c14653846765adb by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] msvcrt: Don't set frame to 0 in arm and arm64 setjmp.
This matches what was done for x86_64 in
882980c17a9a033fa8e49a4c116af9583698d218.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6a072b98c100f38a61fad00b6c96c86b3445efac by Martin Storsjö <martin@martin.st>
* [WINESYNC] msvcrt: Do not acquire fd lock in msvcrt_create_io_inherit_block.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51647
Signed-off-by: Doug Lyons <douglyons@douglyons.com>
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 5a514d3f45472ce1a169f33d14cdcfb07c51441e by Doug Lyons <douglyons@douglyons.com>
* [WINESYNC] msvcrt: Fix double-free and memory leak in type_info destructor.
Spotted by toying with the gcc's static analyzer.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 01111b941d469cb13ed9d3f63c2935930679bcb8 by Eric Pouech <eric.pouech@gmail.com>
* [WINESYNC]: crt is now in sync with wine-staging wine-7.0
---------
Co-authored-by: winesync <ros-dev@reactos.org>
Fixes previous attempt at commit 0ca4e6dcf, which was reverted by commit
bbdcc14b1 because the partitioning checks mistook unpartitioned disks as
GPT.
Addendum to commit 99f0937fd.
The partition-creation checks are unified for these partitions into one
single function. To prepare for GPT support, the specifics are put into
a separate MBRPartitionCreateChecks() helper, called for MBR disks by the
upper-level function. GPT disks will have a similar helper in the future.
Use section object pointer with byte offset instead of using base address. This simplifies the Mm functions themselves and also the code in Cc that calls them.
Also add minor fixes for MmFlushSegment and MmPurgeSegment.
Addendum to commmit 99f0937fd.
The partition-creation checks are unified for these partitions into one
single function. To prepare for GPT support, the specifics are put into
a separate MBRPartitionCreateChecks() helper, called for MBR disks by the
upper-level function. GPT disks will have a similar helper in the future.
This basically avoids re-entering the debugger (via the embedded breakpoint)
while we are already running within its context.
In addition, this allows the tests for Kd/NtSystemDebugControl
(see PRs #7424 and #7426) to run without having ReactOS to crash.
* Don't return before file object's resource is acquired in FsRtlAcquireFileExclusiveCommon, except some special return cases, when return is reuired. Based on hpoussin_filter_extra.patch by Herve Poussineau (hpoussin) with improved comment, which matches the actual behaviour now.
This is required by fltmgr.sys driver from Windows XP/Server 2003 to work correctly, so this change fixes asserts/exceptions when releasing the file via FsRtlReleaseFile after acquiring, when using 3rd party filter drivers from several antivirus programs (e. g., Avast Free Antivirus all versions, AVG Antivirus Free 18.8, Avira AntiVir Personal 8.2, Dr. Web Security Space 8.0, Kaspersky Antivirus 2012 etc. etc.).
CORE-14157, CORE-14635, CORE-19318
* Add braces around return
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
* Improve the comment (make it more detailed)
* Correct checks sequence
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Don't return before file object's resource is acquired in FsRtlAcquireFileExclusiveCommon, except some special return cases, when return is required. Based on hpoussin_filter_extra.patch by Herve Poussineau (@hpoussin) with improved comment, which matches the actual behaviour now.
This is required by fltmgr.sys driver from Windows XP/Server 2003 to work correctly, so this change fixes asserts/exceptions when releasing the file via FsRtlReleaseFile after acquiring, when using 3rd party filter drivers from several antivirus programs (e. g., Avast Free Antivirus all versions, AVG Antivirus Free 18.8, Avira AntiVir Personal 8.2, Dr. Web Security Space 8.0, Kaspersky Antivirus 2012 etc. etc.).
CORE-14157, CORE-14635, CORE-19318
MiGrabDataSection adds a refcount. There is a missing MmDereferenceSegment cleanup in case of range check error.
Fix that by moving MiGrabDataSection calling code to after range check.
Enable use of flags denoting state of Wi-Fi access point relative to the network adapter trying to connect to it. Used when working with WLAN_AVAILABLE_NETWORK.dwFlags to check whether we are connected to the network or not, for instance.
These flags have been introduced in Windows 10.
References:
- https://learn.microsoft.com/en-us/windows/win32/api/wlanapi/ns-wlanapi-wlan_available_network
- Windows SDK
CORE-6905
Rename the Ext2 recognizer to a more generic Ext to be more future-proof with a possible upcoming ext4 support.
Also, it already makes no sense to use the name ext2 as it already recognizes all the FS of the "Ext family".
In addition, add the Ext Recognizer for CDs.
* [NTOS:MM] Fix MmAllocateMappingAddress and MmFreeMappingAddress and their regression test failures.
Follow up of #7260.
This fixes kmtest:MmReservedMapping failures and hang.
Based on mm-implement-mappingaddress.patch by Thomas Faber and some changes by Oleg Dubinskiy.
kmtest:MmReservedMapping revisions and updates to Vista+ method by Timo Kreuzer.
Signed-off-by: Oleg Dubinskiy <oleg.dubinskij30@gmail.com>
Signed-off-by: Timo Kreuzer <timo.kreuzer@reactos.org>
CORE-10147, CORE-14635, CORE-17409, CORE-19318
- Fixes the case where an extension exists in HKCR but has no ProgId (half of CORE-19355)
- Fixes some cases where Wine hardcoded "File and "... file" strings are used instead of localized strings in SHGetFileInfo.
They were reversed, which meant to immediately complete the IRP
if conditions were NOT satisfied.
Remove a now useless/invalid call to QueryStatus, to return the
status which lead to IRP completion.
If a .lnk shortcut does not specify a working directory, it should use the directory provided by the InvokeCommand caller when it's launced.
CORE-19855
This structure replaced magic field in wine's ACTIVATION_CONTEXT with a new field MagicMarker in a wrapped structure, with the only difference being the field offset. This is pointless, because it's not used anywhere outside of this file. Also remove the related functions, that were never even used in the first place.
This allows to load an image as freeldr extension code.
TODO:
- Add global bootloader DTE list
- Add wrapper function that also processes imports
- Use this for scsiport
Implement MmAllocateMappingAddress and MmFreeMappingAddress routines.
Based on mm-implement-mappingaddress.patch by Thomas Faber with some changes from me.
Required by Microsoft NTFS driver (from Windows Server 2003 SP2 only, the one from Windows XP SP3 does not need them) and by NDIS & TDI drivers (both from Windows XP SP3 and Windows Server 2003 SP2). Also they are called when using Dr. Web Security Space 8 filter drivers together with MS FltMgr & TDI.
Fortunately, this part (these two routines) are enough to get the drivers working in both cases, and others (partially incomplete) routines are not badly required, so they can be finished and committed later.
CORE-10147, CORE-14635, CORE-17409, CORE-19318
These headers come with the MS compiler. Some of them are standard, like emmintrin.h, others are MS specific like crtdefs.h
This separation will allow using MS CRT headers. Eventually it can allow compiling with the compilers' runtime headers.
- no functional change intended
- shrinks the rc files sizes and shrinks the binary size of taskmgr:
RosBEWin2.2.2 GCC8.4.0dbg taskmgr.exe from 696.320 -> 678.912 bytes ==> 17.408 bytes saved in the binary
- does also slightly beautify those lines when displaying them in the reshacker
JIRA issue: none
Fix warnings:
E:\3rdRepo\ReactOS_Fork4\ntoskrnl\ex\keyedevt.c(458): warning C6387: 'Timeout' could be '0': this does not adhere to the specification for the function 'ExpWaitForKeyedEvent'.
E:\3rdRepo\ReactOS_Fork4\ntoskrnl\ex\keyedevt.c(527): warning C6387: 'Timeout' could be '0': this does not adhere to the specification for the function 'ExpReleaseKeyedEvent'.
JIRA issue: None.
Proposed changes
Timeout parameter of those two functions should be optional.
Instead link to cpprt. This fixes build with GCC 13, which generates symbols that conflict with __cxa_pure_virtual, if there is a pure virtual function in a vtable. Importing __cxa_pure_virtual from a library works for all versions of GCC.
Make these definitions compatible with the other ambient size_t and
(u)intptr_t types used in the rest of our code base.
This partly reverts the corresponding typedef changes from wine commit
d8ab5a14aa
"msvcrt: Use intptr_t or size_t instead of long where appropriate."
Refine the algorithm introduced in commit c560342f08 (r75667, r75676),
whereby the installation source path is based on the full image file path
of the installer program, and of the \SystemRoot symlink.
Also reverts commit 6f389a35db "Add a workaround for installing from USB drives"
CORE-17818
+ SAL2-annotate and add Doxygen comments.
----
In case the \SystemRoot full path prefixes the image file path,
use the resolved \SystemRoot as the installation source path.
Otherwise, use the image file path.
The \SystemRoot symlink target resolution needs full path reparsing,
because it can reference other symlinks. This is what happens, for
example when booting the installation from a removable hard-disk.
We can have:
\SystemRoot ---> \Device\Harddisk1\Partition1\ReactOS
and: \Device\Harddisk1\Partition1 ---> \Device\HarddiskVolume2
etc.
and we wish to resolve \SystemRoot to: \Device\HarddiskVolume2\ReactOS
instead of keeping the former version (using Harddisk1\Partition1).
We then verify whether it prefixes the image file path, which is
a fully reparsed path.
Based on the Doug Lyons' test in #7087, I found that my previous fix stopped working partially. Or rather, it would only work until the 32767 indexes were exhausted. It seems to me that the behavior of the bitfield has changed, because when I published the previous patch, it passed my tests.
- Bit array generates free ID cyclically, in the previous code after 32767 indexes expired the same index was returned, because of this the previous fix would stop working after expiration, so change the logic of calculating the next index.
- Change the index range to 256-32767 to match Windows, indexes 0-255 can theoretically be used as reserved for system purposes.
Addendum to fd327db20f. CORE-9141
According to tests, legacy fp state is not saved in kernel mode.
Also add an int 2c to the path that changes cs, as it should not be used and probably never will be.
CORE-13525
This is done so that the caller doesn't need to know details
about particular architecture specifics, like VBR, MBR etc.
Extra checks and specific handling is also performed for supporting
bootloader installation on removable media:
- verify whether the media is a floppy or some other removable media,
- depending on which, a suitable file system is chosen,
- and if the media is not a floppy, do the supplemental partition
verifications to determine whether the media is a "super-floppy"
(in the partitioning sense).
This function could be generalized later to copy other files necessary
for the bootloader; removing also the currently hardcoded placement in
the installation source directory, and instead, using a configurable
path (specified in txtsetup.sif); etc.
Adapted from a commit by Timo Kreuzer (see PR #7420)
Co-Authored-By: Timo Kreuzer <timo.kreuzer@reactos.org>
KeFlushQueuedDpcs is used by some drivers, when unloading or removing a device, to be sure no DPC is still running their code. On a UP system this can be done "inline", on an SMP system, it requires to send an IPI to each processor that has DPCs queued and also synchronize it with the calling thread, which is what KeSetSystemAffinityThread does implicitly: When a queued DPC was detected on a remote processor (implying that processor is currently running at DISPATCH_LEVEL or above), KeSetSystemAffinityThread will schedule the current thread on that processor and send a DPC interrupt. The remote processor will handle that DPC interrupt once it is back below DISPATCH_LEVEL. It will only run the current thread, after all queued DPCs (including threaded DPCs) have finished running.
- Use _alloca instead of non-standard alloca
- Use _TCHAR instead of non-standard TCHAR
- Use _off_t instead of deprecated off_t
- Use _O_BINARY instead of O_BINARY
* [MKISOFS] Fix Clang check for macOS platforms
On macOS, CMAKE_C_COMPILER_ID is "AppleClang". While certainly Clang,
this does not match the exact string "Clang" that is being checked for,
and as a result the warning flags guarded thereby are not passed to the
compiler. With this change CMake will recognize both Clang and AppleClang.
* Update sdk/tools/mkisofs/CMakeLists.txt
- The original code was just incrementing the reference counts (RefCounts)
of the device objects or the device/file handles, without decrementing
them when closing the handles. This is now fixed.
Notice the following:
* When opening a file on a device (disk), the device's (and its
handle's) RefCount is incremented, and the file handle's RefCount
is incremented as well.
* When closing a file, the file handle's RefCount is decremented
(and the file closed if the RefCount reaches zero), and the file's
parent device handle is also closed, recursively.
This has the effect of decrementing the parent device handle's
RefCount, and the device's own RefCount is decremented as well.
IMPORTANT NOTE: The usefulness of handle-level RefCount is still
under question, and might be (consistently) removed in the future.
- Fix opening a device (disk) in direct access, when this device is
already opened. Indeed, we previously allowed direct access only if
the device was opened as such for the very first time (its RefCount
= 0 originally); no filesystem mounting was attempted as well.
Then for any later open-operations on this device (while keeping an
already-opened handle to it), filesystem access was assumed.
Thus, this problem would show up in two ways:
* Either the device is first opened for direct access, this succeeded
and no filesystem was mounted. Then, for any other open-operations,
the filesystem was NOT mounted, and opening files on it would fail.
Direct accesses would succeed but would create an unnecessary second
file handle.
* Or, the device is first opened for file-access: a filesystem was
mounted and file opening would succeed. Any other file opening
operation would succeed as well (if the file exists). But, a direct
access open-operation would fail, because now any open-operations on
the device would be assumed to be a file opening.
This is now correctly fixed. If direct-open is requested, just do it.
If this is a file opening, we open the device, then try to mount a
filesystem on it (if not already done), then we try to open the file.
If file opening fails, derereference the device.
- Pass the file path to the filesystem-specific Open() functions without
truncating the leading path separator, if any. This has to be handled
by the filesystem routines themselves.
This prevents MSVC from reordering the exports in a way that doesn't match our spec file. Also improve the algorithm to apply ordinals, by starting with the first specified ordinal, possibly reserving ordinals for anything declared without an ordinal before.
PathIsExeW is used and will exclude exe, com, pif, cmd, bat, scf and scr. The previous #6122 PR added support for the FTA_Exclude flag and that will exclude .lnk files.
CORE-19805
Addendum to commit baa47fa5e.
Similarly to what was originally done, have KdbpCliInterpretInitFile()
parse the KDBinit file by breaking back into the debugger.
But contrary to before, replace the deprecated call to KdbEnter() by
a standard DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C) . This allows
KdbEnterDebuggerException() to do the KdbpCliInterpretInitFile() call.
Additional fixes and improvements:
- Run KdbpCliInterpretInitFile() in full KDBG environment (interrupts
disabled, modified IRQL, own stack), like the usual interactive loop.
- The KDBinit data buffer must be in non-paged pool.
- Demote the "Could not open KDBinit" error to a DPRINT, so that it
doesn't pollute the debug log when the KDBG init function is called
early (before the storage stack is initialized), or if the file
doesn't exist -- since this is an optional feature.
- Move the printing pager state reset code (setting the number of
printed rows and columns to zero, and the output aborted flag)
to KdbpDoCommand(). This allows to keep the original behaviour,
while also inheriting it whenever KdbpDoCommand() is invoked
elsewhere (for example, from KdbpCliInterpretInitFile()).
- Use KdbPuts/Printf() instead of KdbpPrint() for the entry banners,
so that they aren't subject to the current printing pager state.
Do the same for the "command unknown" error in KdbpDoCommand().
- Add a "Type 'help' for a list of commands" banner, for the users.
- Replace the do-while-loop with a simple while-loop.
- Support loading protocols like XP
- Support most of the relevant EditFlags
- Support reading/writing the AlwaysShowExt and BrowserFlags properties
- Loads the list much faster with optimized code and delaying the large icon and description string
- Reduce the number of magic buffer sizes by replacing them with defines that are in the ballpark of being correct
- Implemented column sorting
- Removed custom icon extraction code
- Removed IDS_FILE_EXT_TYPE string because it must be the same as IDS_ANY_FILE
- Don't touch verb keys that are not edited to retain the original REG type
- Don't clobber unchanged %1 icon location when editing a type
CORE-19756
Those haven't been groomed anymore for more than 10 years. We had many thousands of
different freeldr builds with different behavior and bugs each, but nobody ever
did have the slightest motivation to update those hardcoded
FREELOADER_MAJOR_VERSION, FREELOADER_MINOR_VERSION, FREELOADER_PATCH_VERSION
from ver.h. And that is logical, because touching other modules will change the behavior
of freeldr as well, so it is absolutely impossible to groom anything like that correctly.
Instead we should simply do what we started to do in PR7383, which will at least give
some information (the actual sources it was built from) instead of some misleading voodoo-version.
This might slightly shrink the size of freeldr as well, but I was too lazy to measure by how much.
This function combines those that write a message to and read
a message from the specified pipe into a single operation.
Its usage helps in simplifying the code further.
In addition:
- Acquire ControlServiceCriticalSection just before doing the pipe
operations, and release it just after.
- SAL2-annotate ScmControlService().
- Re-order the ScmControlService() parameters in a more natural way
(image comm pipe, service name, control code; then: arguments for
the control command).
- Improve some DPRINTs.
Tweaks all AUTOCHECKBOXes in desk.cpl
no functional change intended, it seems to work well when testing it locally
Makes the rcs shorter
it also makes the binaries a few bytes smaller:
GCC8.4.0dbg RosBEWin2.2.2 DESK.CPL shrinks 650.240 bytes -> 647.168 bytes
it prettifies also the display in reshacker
Previously FsRtlNotifyVolumeEvent would pass a pointer to a TARGET_DEVICE_CUSTOM_NOTIFICATION structure on the stack to IoReportTargetDeviceChangeAsynchronous, which would store a pointer to it in a work-item and process that after the stack object was already out of scope. This broke x64 boot. Started happening after recent fixes to IoReportTargetDeviceChangeAsynchronous.
CORE-19724
sdk/lib/cmlib/cmcheck.c: Print the HCELL_INDEX indices in hexadecimal.
------------------
sdk/lib/cmlib/cmcheck.c:321:60: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'ULONG' {aka 'unsigned int'} [-Wformat=]
and at lines 341, 357, 374, 554, 579, 733, 760, 801, 984, 1003, 1458,
1476, 1521, 1551, 1670
sdk/lib/cmlib/cmcheck.c:1251:65: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'HCELL_INDEX' {aka 'unsigned int'} [-Wformat=]
and at lines 1282, 1303, 1551
sdk/lib/cmlib/cmcheck.c:1326:79: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'LONG' {aka 'int'} [-Wformat=]
sdk/lib/cmlib/cmcheck.c:1684:76: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'CM_CHECK_REGISTRY_STATUS' {aka 'unsigned int'} [-Wformat=]
and at line 1711
------------------
sdk/lib/cmlib/cmheal.c:223:108: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'ULONG' {aka 'unsigned int'} [-Wformat=]
and at lines 240, 319, 335
sdk/lib/cmlib/cmheal.c:480:79: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
------------------
sdk/lib/cmlib/hiveinit.c:976:62: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'ULONG' {aka 'unsigned int'} [-Wformat=]
and at lines 988, 1492
CORE-19724
sdk/tools/cabman/dfp.cxx:1136:36: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
1136 | sprintf(InfLine, "%s=%s", GetFileName(SrcName).c_str(), DstName);
| ^
sdk/tools/cabman/dfp.cxx:1136:20: note: 'sprintf' output 2 or more bytes (assuming 4097) into a destination of size 4096
2024-10-08 17:47:46 +02:00
4898 changed files with 485762 additions and 154326 deletions
This article describes general coding style guidelines, which should be used for new ReactOS code. These guidelines apply exclusively to C and C++ source files. The Members of ReactOS agreed on this document in the October 2013 meeting.
As much existing ReactOS code as possible should be converted to this style unless there are reasons against doing this (like if the code is going to be rewritten from scratch in the near future). See [Notes on reformatting existing code](#notes-on-reformatting-existing-code) for more details.
Code synchronized with other sources (like Wine) must not be rewritten. [3rd Party Files.txt](https://github.com/reactos/reactos/blob/master/media/doc/3rd%20Party%20Files.txt) and [WINESYNC.txt](https://github.com/reactos/reactos/blob/master/media/doc/WINESYNC.txt) files can be used for tracking synchronized files.
## File Structure
1. Every ReactOS source code file should include a file header like this:
* PURPOSE: Does cool things like Memory Management
* COPYRIGHT: Copyright 2017 Arno Nymous <abc@mailaddress.com>
* Copyright 2017 Mike Blablabla <mike@blabla.com>
*/
```
Please use SPDX license identifiers available at https://spdx.org/licenses.
This makes our source file parseable by licensing tools!
You should add yourself to the `COPYRIGHT` section of a file if you did a major contribution to it and could take responsibility for the whole file or a part of it. Not more than 3 people shall be in that list for each file.
`FILE` line of the old header should be removed.
2. [Doxygen](https://doxygen.reactos.org/) documentation generator is used for ReactOS codebase, so use a proper header for functions, see [API Documentation](https://reactos.org/wiki/Documentation_Guidelines#API_Documentation) for details.
## Indentation and line width
1. Line width must be at most **100 characters**.
2. Do not add a space or tab at the end of any line.
3. Indent with **4 spaces**, don't use tabs!
4. Indent both a case label and the case statement of a switch statement.
**Right:**
```c
switch(Condition)
{
case1:
DoSomething();
break;
case2:
{
DoMany();
ManyMore();
OtherThings();
break;
}
}
```
**Wrong:**
```c
switch(Condition)
{
case1:
DoSomething();
break;
case2:
DoMany();
ManyMore();
OtherThings();
break;
}
```
5. When a function call does not fit onto a line, align arguments like this:
```c
FunctionCall(arg1,
arg2,
arg3);
```
6. Function headers should have this format (preserving the order as in the example):
```c
static// scope identifier
CODE_SEG("PAGE")// section placement
// other attributes
BOOLEAN// return type
FASTCALL// calling convention
IsOdd(
_In_UINT32Number);
```
## Spacing
1. Do not use spaces around unary operators.
**Right:** `i++;`
**Wrong:**`i ++;`
2. Place spaces around binary and ternary operators.
**Right:** `a = b + c;`
**Wrong:**`a=b+c;`
3. Do not place spaces before comma and semicolon.
**Right:**
```c
for(inti=0;i<5;i++)
DoSomething();
func1(a,b);
```
**Wrong:**
```c
for(inti=0;i<5;i++)
DoSomething();
func1(a,b);
```
4. Place spaces between control statements and their parentheses.
**Right:**
```c
if(Condition)
DoSomething();
```
**Wrong:**
```c
if(Condition)
DoSomething();
```
5. Do not place spaces between a function and its parentheses, or between a parenthesis and its content.
**Right:**
```c
func(a,b);
```
**Wrong:**
```c
func(a,b);
func(a,b);
```
## Line breaking
1. Each statement should get its own line.
**Right:**
```c
x++;
y++;
if(Condition)
DoSomething();
```
**Wrong:**
```c
x++;y++;
if(Condition)DoSomething();
```
## Braces
1. Always put braces (`{` and `}`) on their own lines.
2. One-line control clauses may use braces, but this is not a requirement. An exception are one-line control clauses including additional comments.
**Right:**
```c
if(Condition)
DoSomething();
if(Condition)
{
DoSomething();
}
if(Condition)
{
// This is a comment
DoSomething();
}
if(A_Very||(Very&&Long||Condition)&&
On_Many&&Lines)
{
DoSomething();
}
if(Condition)
DoSomething();
else
DoSomethingElse();
if(Condition)
{
DoSomething();
}
else
{
DoSomethingElse();
YetAnother();
}
```
**Wrong:**
```c
if(Condition){
DoSomething();
}
if(Condition)
// This is a comment
DoSomething();
if(A_Very||(Very&&Long||Condition)&&
On_Many&&Lines)
DoSomething();
if(Condition)
DoSomething();
else{
DoSomethingElse();
YetAnother();
}
```
## Control structures
1. Don't use inverse logic in control clauses.
**Right:** `if (i == 1)`
**Wrong:**`if (1 == i)`
2. Avoid too many levels of cascaded control structures. Prefer a "linear style" over a "tree style". Use `goto` when it helps to make the code cleaner (e.g. for cleanup paths).
**Right:**
```c
if(!func1())
return;
i=func2();
if(i==0)
return;
j=func3();
if(j==1)
return;
...
```
**Wrong:**
```c
if(func1())
{
i=func2();
if(func2())
{
j=func3();
if(func3())
{
...
}
}
}
```
## Naming
1. Capitalize names of variables and functions. Hungarian Notation may be used when developing for Win32, but it is not required. If you don't use it, the first letter of a name must be a capital too (no lowerCamelCase). Do not use underscores as separators either.
2. Avoid abbreviating function and variable names, use descriptive verbs where possible.
3. Precede boolean values with meaningful verbs like "is" and "did" if possible and if it fits the usage.
**Right:**
```c
BOOLEANIsValid;
BOOLEANDidSendData;
```
**Wrong:**
```c
BOOLEANValid;
BOOLEANSentData;
```
## Commenting
1. Avoid line-wasting comments, which could fit into a single line.
**Right:**
```c
// This is a one-line comment
/* This is a C-style comment */
// This is a comment over multiple lines.
// We don't define any strict rules for it.
```
**Wrong:**
```c
//
// This comment wastes two lines
//
```
## Null, false and 0
1. The null pointer should be written as `NULL`. In the rare case that your environment recommends a different null pointer (e.g. C++11 `nullptr`), you may use this one of course. Just don't use the value `0`.
2. Win32/NT Boolean values should be written as `TRUE` and `FALSE`. In the rare case that you use C/C++ `bool` variables, you should write them as `true` and `false`.
3. When you need to terminate ANSI or OEM string, or check for its terminator, use `ANSI_NULL`. If the string is Unicode or Wide string, use `UNICODE_NULL`.
## Notes on reformatting existing code
- Never totally reformat a file and put a code change into it. Do this in separate commits.
- If a commit only consists of formatting changes, say this clearly in the commit message by preceding it with *[FORMATTING]*.
## Other points
- Do not use `LARGE_INTEGER`/`ULARGE_INTEGER` unless needed for using APIs. Use `INT64`/`UINT64` instead
- Use `#pragma once` instead of guard defines in headers
- Don't specify a calling convention for a function unless required (usually for APIs or exported symbols)
## Using an automatic code style tool
TO BE ADDED BY User:Zefklop
## Points deliberately left out
Additional ideas were suggested during the discussion of this document, but a consensus couldn't be reached on them. Therefore we refrain from enforcing any rules on these points:
LTEXT "Acest instrument oferă informații detaliate despre componentele ReactX și drivere instalate în sistem.", IDC_STATIC, 5, 0, 443, 17
LTEXT "Dacă aveți la cunoștință careva probleme la o anumită categorie, mergeți la compartimentul corespunzător de mai sus. Altfel, puteți utiliza butonul „Următorul compartiment” de mai jos pentru a trece secvențial prin fiecare categorie.", IDC_STATIC, 5, 15, 443, 25
LTEXT "Acest instrument raportează informații detaliate despre componentele ReactX și driverele instalate pe sistem.", IDC_STATIC, 5, 0, 443, 17
LTEXT "Dacă întâmpinați o problemă cu ReactX și știți ce este, atunci faceți clic pe fila corespunzătoare de mai sus. Dacă nu, puteți face clic pe butonul ""Pagina următoare"" de mai jos pentru a vizita fiecare pagină în succesiune.", IDC_STATIC, 5, 15, 443, 25
GROUPBOX "Informații despre sistem", IDC_STATIC, 5, 35, 452, 150, SS_RIGHT
IDS_DEVICE_FORCEFEEDBACK "Forțare a driverului de feedback"
IDS_NOT_APPLICABLE "n/a"
IDS_OPTION_YES "Da"
IDS_DIRECTPLAY_COL_NAME1 "Nume"
IDS_DIRECTPLAY_COL_NAME2 "Registru"
IDS_DIRECTPLAY_COL_NAME3 "Fișier"
IDS_DIRECTPLAY_COL_NAME4 "Versiune"
IDS_DIRECTPLAY8_MODEMSP "Furnizor de serviciu Modem-DirectPlay8"
IDS_DIRECTPLAY8_SERIALSP "Furnizor de serviciu Serial-DirectPlay8"
IDS_DIRECTPLAY8_IPXSP "Furnizor de serviciu IPX-DirectPlay8"
IDS_DIRECTPLAY8_TCPSP "Furnizor de serviciu TCP/IP-DirectPlay8"
IDS_DIRECTPLAY8_MODEMSP "Furnizor de servicii de modemDirectPlay8"
IDS_DIRECTPLAY8_SERIALSP "Furnizor de servicii seriale DirectPlay8"
IDS_DIRECTPLAY8_IPXSP "Furnizor de servicii DirectPlay8 IPX"
IDS_DIRECTPLAY8_TCPSP "DirectPlay8 TCP/IP Service Provider"
IDS_DIRECTPLAY_TCPCONN "Conexiune de Internet TCP/IP pentru DirectPlay"
IDS_DIRECTPLAY_IPXCONN "Conexiune IPX pentru DirectPlay"
IDS_DIRECTPLAY_MODEMCONN "Conexiune Modem pentru DirectPlay"
IDS_DIRECTPLAY_SERIALCONN "Conexiune Serială pentru DirectPlay"
IDS_REG_SUCCESS "Î&nchide"
IDS_DIRECTPLAY_MODEMCONN "Conexiune de modem pentru DirectPlay"
IDS_DIRECTPLAY_SERIALCONN "Conexiune serială pentru DirectPlay"
IDS_REG_SUCCESS "OK"
IDS_REG_FAIL "Eroare"
IDS_DDTEST_ERROR "Testul a eșuat!"
IDS_DDTEST_DESCRIPTION "Urmează testele de interfață DirectDraw. Continuați?"
IDS_DDPRIMARY_DESCRIPTION "Testul următor va utiliza DirectDraw pentru a desena dreptunghiuri albe și negre pe suprafața primară. Continuați?"
IDS_DDPRIMARY_RESULT "Dreptunghiurile albe și negre au fost vizibile?"
IDS_DDOFFSCREEN_DESCRIPTION "Testul următor va utiliza DirectDraw pentru desenarea unui dreptunghi alb în mișcare utilizând o memorie tampon din afara ecranului. Continuați?"
IDS_DDOFFSCREEN_RESULT "Dreptunghiul alb în mișcare a fost vizibil?"
IDS_DDFULLSCREEN_DESCRIPTION "Testul următor va utiliza DirectDraw pentru desenarea unui dreptunghi alb în mișcare utilizând tot ecranul. Continuați?"
IDS_DDFULLSCREEN_RESULT "Pe ecranul complet, dreptunghiul alb în mișcare a fost vizibil?"
IDS_FORMAT_ADAPTER_MEM "%u Mo"
IDS_FORMAT_ADAPTER_MODE "%d x %d (%u biți)(%uHz)"
IDS_DDTEST_ERROR "Testul de randare DirectDraw a eșuat.\nVă rugăm să consultați notele pentru mai multe informații."
IDS_DDTEST_DESCRIPTION "Acesta va porni testarea interfeței DirectDraw. Doriți să continuați?"
IDS_DDPRIMARY_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena pe suprafața principală.\nAr trebui desenate dreptunghiuri alb-negru. Doriți să continuați?"
IDS_DDOFFSCREEN_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena un tampon în afara ecranului. Ar trebui desenat un dreptunghi alb în mișcare. Doriți să continuați?"
IDS_DDOFFSCREEN_RESULT "Ați văzut dreptunghi alb în mișcare?"
IDS_DDFULLSCREEN_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena în modul ecran complet. Ar trebui desenat un dreptunghi alb în mișcare. Doriți să continuați?"
IDS_DDFULLSCREEN_RESULT "Ați văzut dreptunghi alb în mișcare în modul ecran complet?"
IDS_FORMAT_ADAPTER_MEM "%u (de) MB"
IDS_FORMAT_ADAPTER_MODE "%d x %d (%u (de) biți)(%uHz)"
IDS_OPTION_NO "Nu"
IDS_D3DTEST_DESCRIPTION "Urmează testul de interfață Direct3D. Continuați?"
IDS_D3DTEST_D3Dx "Testul următor va utiliza interfața Direct3D %u cu accelerare de echipament fizic."
IDS_OS_VERSION "%s %s (%d.%d, Build %d)"
IDS_D3DTEST_DESCRIPTION "Acesta va porni testarea interfeței Direct3D. Doriți să continuați?"
IDS_D3DTEST_D3Dx "Acest test va folosi interfața Direct3D %u accelerată hardware."
IDS_OS_VERSION "%s %s (%d.%d, Subversiunea %d)"
IDS_DMUSIC_DESC "Descriere"
IDS_DMUSIC_TYPE "Tip"
IDS_DMUSIC_KERNEL "Mod nucleu"
IDS_DMUSIC_IO "In/Ex"
IDS_DMUSIC_DLS "DLS de suport"
IDS_DMUSIC_KERNEL "Modul nucleu"
IDS_DMUSIC_IO "I/E"
IDS_DMUSIC_DLS "Suportă DLS"
IDS_DMUSIC_EXT "Extern"
IDS_DMUSIC_PORT "Port implicit"
IDS_DDDISABLE_MSG "Accelerările fizice DirectDraw vor fi dezactivate pentru toate dispozitivele.\nDoriți să continuați?\n"
IDS_DDDISABLE_MSG "Acesta va dezactiva toată accelerarea hardware pentru DirectDraw pe toate dispozitivele de afișare.\nDoriți să continuați?\n"
CAPTION "Extragere fișiere de la o instalație sursă"
CAPTION "Extragere a fișierelor dintr-o sursă de instalare"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Specificați fișierele pe care doriți să le extrageți, locația sursei cu fișierele de instalare, și locația destinației.", IDC_STATIC, 7, 7, 339, 17
LTEXT "Fișierele pentru e&xtragere:", IDC_STATIC, 7, 34, 93, 10
LTEXT "&Fișiere de restaurat:", IDC_STATIC, 7, 34, 93, 10
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.