Commit graph

86398 commits

Author SHA1 Message Date
Thamatip Chitpong
1e06829961 [NTOS:PS] Add query support for QUOTA_LIMITS_EX 2024-12-18 09:53:21 +07:00
Thamatip Chitpong
bf0dbdbd19 [NTOS:PS] NtQueryInformationProcess: Move process information-specific variables to their own scope 2024-12-18 09:53:21 +07:00
Thamatip Chitpong
b1f27287ae [NTDLL_APITEST] NtQueryInformationProcess: Add tests for ProcessQuotaLimits/Ex 2024-12-18 09:53:21 +07:00
Thamatip Chitpong
dabe14ae67 [NTDLL_APITEST] NtQueryInformationProcess: Add tests for ProcessBasicInformation 2024-12-18 09:53:21 +07:00
Václav Zouzalík
e18763e13f
[USERINIT] Update German (de-DE) translation (#7541)
* [USERINIT] Update German (de-DE) translation

* [USERINIT] Update German (de-DE) translation

* [USERINIT] Fix copyright header
2024-12-17 20:28:14 +01:00
George Bișoc
28b277aa42
[STOBJECT] Display the estimated battery time when hovering the battery icon
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
2024-12-17 14:34:30 +01:00
George Bișoc
b0680d65fe
[BATTC] Signal the wait battery tag event when notifying Battery Class
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
2024-12-17 14:23:33 +01:00
Eric Kohl
c10c5224ff [SETUPAPI] Implement SetupDiGetClassRegistryPropertyA and SetupDiSetClassRegistryPropertyA 2024-12-16 23:19:56 +01:00
George Bișoc
f3dd15ad64
[CMBATT] Grab the design voltage after the BIF data gets copied
There was a risk of accessing invalid data as the design voltage was grabbed before the read BIF data was copied into the device extension.
2024-12-16 22:09:02 +01:00
George Bișoc
ea8315ba56
[CMBATT] Convert power statistics from mAh to mWh
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
2024-12-16 17:33:51 +01:00
George Bișoc
2416c31a30
[BATTC] Fix the wait timeout conversion
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
2024-12-16 17:24:56 +01:00
Timo Kreuzer
5ebd478325 [NTOS][HAL:APIC] Call HalBegin/EndSystemInterrupt from clock handler 2024-12-16 16:21:44 +02:00
Timo Kreuzer
1f647e4479 [HAL] Remove KiEoiHelper hack 2024-12-16 16:21:44 +02:00
Timo Kreuzer
67231bd69a [NTOS:KE/X64] Fix KiInterruptDispatch
- Enable interrupts
- Acquire the spinlock on SMP builds
2024-12-16 16:21:44 +02:00
Timo Kreuzer
29721ac552 [NTOS:KE/x64] Fix unwinding in KiUserApcDispatcher
This adds a MACHINE_FRAME to the user mode APC dispatcher stack frame.
2024-12-16 16:19:32 +02:00
Timo Kreuzer
91948dea80 [NTOS:KE/x64] Fix handling of PCR::UserRsp
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.
2024-12-16 16:18:45 +02:00
Doug Lyons
5df3a0bb4a
[EVENTVWR] Fix typo in Romanian (ro-RO) translation (#7561)
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>
2024-12-16 13:42:47 +03:00
Hermès Bélusca-Maïto
3c1e022d0e
[NTOS:KE] Synchronize KiPcToFileHeader/KiRosPcToUserFileHeader 1st parameter name 2024-12-15 22:21:10 +01:00
Hermès Bélusca-Maïto
cc40a5870a
[NTOS:CM] Implement Win7+ VolatileBoot support.
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.
2024-12-15 22:15:13 +01:00
Hermès Bélusca-Maïto
f42c81e4ed
[NTOS:CM] Allow CmSelfHeal to be configured via registry.
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.
2024-12-15 22:12:51 +01:00
Hermès Bélusca-Maïto
a43bfe2916
[NTOS:CM/IO/KE] Implement minimal support for CrashControl:AutoReboot
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.)
2024-12-15 22:12:22 +01:00
Eric Kohl
44564cb682 [SETUPAPI] Implement SetupDiGetClassRegistryPropertyW and SetupDiSetClassRegistryPropertyW 2024-12-15 15:54:35 +01:00
Hermès Bélusca-Maïto
3abb21080d
[NTOS:KE/EX] Add minimal EMS (headless) support for bugcheck.
In particular, the HeadlessGlobals->InBugCheck flag MUST be set prior
to displaying the blue-screen, because the HDL global lock function
would trigger a (nested) BSoD otherwise.

Regarding the unimplemented HeadlessCmdSendBlueScreenData:
it sends to the management console an XML description of the bugcheck.
An example can be seen in this issue report:
https://github.com/cloud-hypervisor/cloud-hypervisor/issues/3168

For more information, please consult:
https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/windowsserver2003emssacxml.doc
2024-12-14 23:38:43 +01:00
Hermès Bélusca-Maïto
b15dcb5cf6
[NTOS:KD64] The DbgKdPageInApi, introduced in NT4, has been obsoleted in NT5.
It has been replaced by ExpDebuggerPageIn support in ExpDebuggerWorker().
2024-12-14 23:33:53 +01:00
Hermès Bélusca-Maïto
08ed0988ff
[NTOS:KE] KeRemoveQueueDpc(): Use KeRestoreInterrupts() 2024-12-14 23:33:49 +01:00
Hermès Bélusca-Maïto
da59d797d1
[NTOS:EX] Minor enhancements to ExpDebuggerWorker()
- Add some DbgPrints.
- Use SAL2 annotations.
2024-12-14 23:31:51 +01:00
Hermès Bélusca-Maïto
ec4c169e3e
[NTOS:EX] Revamp ExpLoadBootSymbols() a bit.
- Use a for-loop.
- Make some comments more accurate.
- Reduce indentation level in the loop.
2024-12-14 23:31:49 +01:00
Hermès Bélusca-Maïto
f395f87bb3
[NTOS:MM] MiScanMemoryDescriptors(): Use the MiIsMemoryTypeInvisible() and MiIsMemoryTypeFree() helpers. 2024-12-14 23:31:48 +01:00
Hermès Bélusca-Maïto
c53eb190c7
[NTOS:KD64] Revamp the debugger banner helpers a little.
- Directly call KdpGetMemorySizeInMBs() within KdpPrintBanner(),
  instead of having the caller doing it.
- Use the miarm.h MiIsMemoryTypeInvisible() helper.
- Add Doxygen comments.
2024-12-14 23:31:47 +01:00
Hermès Bélusca-Maïto
cb0c9a4570
[NTOS:KD64] KdInitSystem(): Minor code enhancements.
- 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.
2024-12-14 23:31:46 +01:00
Hermès Bélusca-Maïto
ba342e1d14
[FREELDR] peloader.c: Minor code enhancements.
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.
2024-12-14 23:31:41 +01:00
Eric Kohl
4d376dfd64 [SETUPAPI] CM_Set_Class_Registry_PropertyW: Do not convert SD if ulLength is 0 2024-12-14 20:09:27 +01:00
Hermès Bélusca-Maïto
4795177ced
[DRIVERS] Fix misusages of the RTL_REGISTRY_OPTIONAL flag.
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)
2024-12-14 19:12:11 +01:00
Eric Kohl
b96e648019 [SETUPAPI] CM_Set_Class_Registry_PropertyW: Implement SD conversion
Convert text SD to binary SD for the CM_CRP_SECURITY_SDS property.
2024-12-14 13:52:55 +01:00
Tomáš Veselý
0540c212ea
[USER32_APITEST] Improve RedrawWindow API test. Follow up of #7160 (#7297)
* extension-RedrawWindow-apitest-by-flags-update

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2024-12-11 13:58:15 -06:00
Ratin Gao
d936dba7ff [REACTOS] Fix 'seperate' typos 2024-12-11 08:56:06 +02:00
Daniel Victor
34e76ade03 [FREELDR] Make it more compatible with w2k3 ini file 2024-12-11 07:18:34 +02:00
Václav Zouzalík
e897a5654d [ACPPAGE] Update German (de-DE) translation 2024-12-10 22:37:02 +01:00
Eric Kohl
b667d82f0b [SETUPAPI] Implement CM_Set_Class_Registry_PropertyA() 2024-12-09 21:53:35 +01:00
Hermès Bélusca-Maïto
01a10da73d
[VIDEOPRT] VideoPortInitialize(): Display the invalid and expected struct sizes on error 2024-12-09 13:42:44 +01:00
Thamatip Chitpong
4d9f67c79b [REACTOS] Rename ReactOS_LogOn.wav to ReactOS_Startup.wav
CORE-13951
2024-12-09 09:52:57 +07:00
Thamatip Chitpong
2557948179 [WINLOGON] Implement startup sound support (HACK)
CORE-13951
2024-12-09 09:52:57 +07:00
Thamatip Chitpong
37375fcc4d [WINLOGON] Implement shutdown sound support
CORE-13951
2024-12-09 09:52:57 +07:00
Thamatip Chitpong
77bfc12e0f [WINLOGON] Move logoff flags handling code to HandleLogoff 2024-12-09 09:52:57 +07:00
Eric Kohl
18c3f39c18 [SETUPAPI] Implement CM_Set_Class_Registry_PropertyW()
The conversion of text SDs to binary SDs is not implemented yet.
2024-12-08 23:03:30 +01:00
Thamatip Chitpong
92231340ec
[WINMM] PlaySound: Fix user-specific environment variables handling (#7536)
Correctly retrieve user-specific environment variables when impersonating.
Addendum to commit f18111b641.
CORE-13951
2024-12-07 09:15:11 +07:00
Andrei Miloiu
e6c18b4497
[VGAFONTEDIT] Update Romanian (ro-RO) translation (#7354) 2024-12-06 21:15:51 +01:00
Andrei Miloiu
29ef7062a7
[CONSOLE] Update Romanian (ro-RO) translation (#7404) 2024-12-06 21:12:45 +01:00
Andrei Miloiu
d8daf05e4a
[IEFRAME] Update Romanian (ro-RO) translation (#7356) 2024-12-06 21:05:33 +01:00
Andrei Miloiu
5251d08663
[MSCTFIME] Add Romanian (ro-RO) translation (#7365) 2024-12-06 21:02:30 +01:00