Commit Graph

1752 Commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
24e88af972 [VIDEOPRT][DDK] services.c: Reformat; update/fix SAL annotations (#8450)
NOTA: 2nd parameter `AgpServices` of `VideoPortGetAgpServices()` is
documented as "In", but should be "Out" as it receives information.
2025-11-06 22:36:42 +01:00
Hermès Bélusca-Maïto
a912f8900c [PSDK] Improve the DECLSPEC_NOINITALL definition (#8438)
Addendum to commit 73b54ce2a6.

Conditionally define it on the `_MSC_VER >= 1915, and add the other
`MIDL_PASS` and co. guard checks as in the official Windows PSDK.

Additionally, no-op the define for Clang to silence the following
warnings:
```
sdk\include\ddk\ntddk.h(2050,35): warning: __declspec attribute 'no_init_all' is not supported [-Wignored-attributes]
sdk\include\psdk\ntdef.h(40,95): note: expanded from macro 'DECLSPEC_NOINITALL'
```
Granted, this may be due to the fact our GitHub actions currently use
Clang 13.0.1:
```
-- The C compiler identification is Clang 13.0.1 with MSVC-like command-line
-- The CXX compiler identification is Clang 13.0.1 with MSVC-like command-line
```
while support for `no_init_all` may have been added for Clang 22.0.0,
if https://clang.llvm.org/docs/AttributeReference.html#no-init-all is correct.
(See PR https://github.com/llvm/llvm-project/pull/116847 )
2025-11-06 21:53:25 +01:00
Justin Miller
3fe5b8b0bb [SDK][WDF][USBDEX][NTOSKRNL_VISTA] Fully enable KMDF (#8396)
[SDK][WDFLDR] Add kmdf loader driver
[SDK][WDF] Add kmdf drver init static library
[SDK][WDF] Modify kmdf driver for working with wdfldr driver
[SDK][CDROM] Cdrom driver dynamically linking with kmdf
[SDK][WDF] Add kmdfdriver module type
[SDK][WDF][USBDEX][NTOSKRNL_VISTA] Fully enable KMDF
[KMDF][WDFLDR][WDF01000] Fix Windows 10 Compatibility WDFLDR and WDF01000
[WDF01000] NO_KERNEL_LIST_ENTRY_CHECKS for wdf01000 3rd party code

This PR is an accumulation of three peoples work, with the goal of the trying to get WDF to work like it should.
This has been tested in combination with some extra NT6+ ntoskrnl against multiple drivers.

---------

Co-authored-by: Max Korostil <mrmks04@yandex.ru>
Co-authored-by: Victor Perevertkin <victor.perevertkin@reactos.org>
Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2025-11-03 06:38:52 -08:00
Timo Kreuzer
6b0ac35393 [HALx86] Fix annotations for x86BiosAllocateBuffer 2025-11-02 14:46:54 +02:00
Eric Kohl
f2f057c0a1 [NETAPI32][WKSSVC][IDL] Revert workaround for union _WKSTA_USER_INFO
After fixing the union issue in the RPC runtime, revert all workarounds one by one.

Return to the original declaration of union _WKSTA_USER_INFO and fix NetrWkstaUserGetInfo.
2025-10-28 21:26:53 +01:00
Eric Kohl
5b5b1a2bbf [NETAPI32][WKSSVC][IDL] Revert workaround for union _WKSTA_INFO
After fixing the union issue in the RPC runtime, revert all workarounds one by one.

Return to the original declaration of union _WKSTA_INFO and fix NetrWkstaGetInfo
and NetrWkstaSetInfo.
2025-10-27 22:46:39 +01:00
Eric Kohl
4a3bf41abb [NETCFGX][REACTOS] Add missing INetCfgComponentPrivate interface declaration 2025-10-26 18:21:10 +01:00
Serge Gautherie
d1b1292429 [FMIFS][FORMAT][SDK] Improve/Fix QueryDeviceInformation() and related code (#7475)
- FMIFS: QueryDeviceInformation(): Use more specific types and improve documentation.
  Follow-up to commit 4838d7bd56.

- FORMAT: wmain():
  * Zero the correct variable. Addendum to commit c5a9f22d4e.
  * No need to zero the whole volumeName array. Follow-up to commit 358fecdcf0.
2025-10-26 16:42:01 +01:00
Hermès Bélusca-Maïto
c7d4040767 [FREELDR] ArcGetFileInformation(): Set Information->FileName, Length, and Attributes for filesystems (#8420)
CORE-9023

Add support for all the supported filesystems: FAT/FATX, NTFS,
ISO, EXT, BTRFS, as well as for files loaded via PXE.

arc.h:
- Add `FILEATTRIBUTES` enumeration;
- Remove non-existing `CreateReadOnly` and `SupersedeReadOnly`
  `OPENMODE` values; add missing `CreateReadWrite`.
2025-10-19 22:38:30 +02:00
Hermès Bélusca-Maïto
78362c1afa [PSDK] Update our icmpapi.h header; make it compatible with official PSDK (#8417)
- Add missing definitions in icmpapi.h and use SAL2 annotations;

- Rename `__WINE_ICMPAPI_H` to the official `_ICMP_INCLUDED_`;

- Use `NTDDI_VERSION` versioning for some funtions;

- Use `PIO_APC_ROUTINE_DEFINED` for the `ApcRoutine` parameter
  of the `Icmp*SendEcho2*()` functions, allowing to use the proper
  `PIO_APC_ROUTINE` type instead of `FARPROC`;

- Add missing Vista SP1+ `IcmpSendEcho2Ex()` function.
2025-10-19 17:11:53 +02:00
Hermès Bélusca-Maïto
de1fb41750 [PSDK][NDK] winternl.h, iotypes.h: define PIO_APC_ROUTINE_DEFINED (#8417)
Define `PIO_APC_ROUTINE_DEFINED` after the `PIO_APC_ROUTINE` callback
type definition. Used by icmpapi.h `Icmp*SendEcho2*()` routines.
2025-10-19 17:11:52 +02:00
Hermès Bélusca-Maïto
73fb345877 [PSDK][INCLUDE/WINE] Import wine-10.0 icmpapi.h (#8417) 2025-10-19 17:11:04 +02:00
Carl J. Bialorucki
6762703ce4 [PSDK][INCLUDE/WINE] Introduce our own shlwapi.h for PSDK and import wine-10.0 shlwapi.h for Wine code (#8419)
- [PSDK] Introduce our own Microsoft compatible and MIT-licensed shlwapi.h and fix breaking changes
- [INCLUDE/WINE] Import shlwapi.h from wine-10.0 for use with Wine compatible code
- [CMAKELISTS.TXT] Bump up IE version from IE60 to IE60SP2. This is required because we are already using IE60SP2 guarded functionality; the new header unhides this.
- [SHLWAPI] Fix breaking changes, including a typo for 'SHGVSPB_GLOBALDEAFAULTS' (should be 'SHGVSPB_GLOBALDEFAULTS')
- [MSI] Use wine's shlwapi.h instead of our own in automation.c, don't precompile shlwapi.h.
- [URLMON_WINETEST] Primarily use wineheaders for this test
2025-10-17 09:23:31 -05:00
Eric Kohl
bfee65f62c [NETSH] Implement MakeQuotedString() and FreeQuotedString()
These functions are used by WinXPs ifmon.dll.
2025-10-17 15:12:44 +02:00
Eric Kohl
38afa1a48f [NETSH][REACTOS] Implement and export NsGetFriendlyNameFromIfName
Running the 'interface ip show address' command on XPs ifmon.dll now fails in netcfgx.dll.
2025-10-16 14:19:11 +02:00
Eric Kohl
ac4d7351f9 [IPHLPAPI][REACTOS] Add iphlpapi_undoc.h and add undocumented functions
Add NhGetInterfaceNameFromDeviceGuid() and NhGetInterfaceNameFromGuid().
2025-10-16 13:20:00 +02:00
Eric Kohl
16e711b793 [NETCFGX][PSDK] Add missing parameter to INetCfgClass:FindComponent() 2025-10-15 19:40:25 +02:00
Hermès Bélusca-Maïto
21fc5cd20f [INCLUDE] arc.h: CONFIGTYPE in the FILEINFORMATION structure, is actually CONFIGURATION_TYPE 2025-10-13 22:13:33 +02:00
Eric Kohl
af0c2e703b [PSDK][NETSH] Improve netsh.h 2025-10-12 00:54:10 +02:00
Eric Kohl
bf2ee2f027 [PSDK] Add error codes and NS_CMD_FLAGS enumeration to netsh.h 2025-10-07 16:07:49 +02:00
Serge Gautherie
54b9b41e84 [NTDLL][WINE][NTOS:MM] MmFlushVirtualMemory(): Pretend success (#8290)
* [NTDLL][WINE] Fix *FlushVirtualMemory() parameter types
* [NTOS:MM] MmFlushVirtualMemory(): Pretend success

Yet, set IoStatusBlock's actual data.
Based on Jira hack patch by KRosUser.
Addendum to b445005c70 (0.4.15-dev-2306).
CORE-19589
2025-10-06 16:28:39 -05:00
Hermès Bélusca-Maïto
51d7aeb3ea [SDK] crt/sys/stat.h: Import MinGW-w64 patch "Change _S_IFBLK from 0x3000 to 0x6000"
Mingw-w64 commit id 850703ae46e1971c5789fa1bdd802fb9692c41c9 by Daniel Starke via Mingw-w64-public <mingw-w64-public@lists.sourceforge.net>

headers: Change _S_IFBLK from 0x3000 to 0x6000

The _S_IFBLK macro, used to identify block special files in file systems, is
being updated from 0x3000 to 0x6000. This change aligns mingw-w64 with the more
commonly used value across Unix-like systems and other C libraries.

The old value of 0x3000 may have caused compatibility issues when working with
code that assumes the standard 0x6000 value for S_IFBLK.

This update improves cross-platform compatibility and consistency with other
systems, making it easier to write portable code that deals with file type
identification. It also reduces potential confusion and errors that might arise
from the non-standard value.

One of these is for example python. This is only an example. It does not change
the fact that python should be more careful about actual value implementation.

Note that the current value implies character device + FIFO instead of
character device + directory.

Link: f819900245/Python/fileutils.c (L1197)
Link: 81e4f8d68c/include/uapi/linux/stat.h (L13)
Signed-off-by: Daniel Starke <daniel-email@gmx.net>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2025-10-05 20:38:41 +02:00
Hermès Bélusca-Maïto
3598ae9fbb [SDK] arc.h: Isolate the ARC-specific definitions from those specific to the NT OS Loader Parameter Block 2025-10-04 19:49:56 +02:00
Adam Słaboń
5187834463 [SDK] Update loader parameter block structure definitions to Windows 10 RTM (#8236)
Mostly based on the information on Geoff Chappell's website, Vergilius Project and WDK 10.0.10586.0
2025-10-04 07:11:00 -07:00
Mohammed al-Ramadany
2a0acdbadc [KMTESTS] Kmtest fixes (#8308)
- [KMTEST:IOFILESYSTEM] Add support for NTFS
- [KMTEST:IODEVICEOBJECT] Work around a Windows 7 bug, account for struct size changes on x64, accept Vista+ behavior
- [KMTEST:EXPOOLS] Accept pool being promoted to NonPaged on Vista+, accept 2GB allocation on x64, guard an undocumented behavior
- [KMTEST:CMSECURITY] Add tests for Vista-Win8.1
2025-09-30 10:57:23 -05:00
Carl J. Bialorucki
5f243e66b6 [COM_APITEST][INCLUDE/REACTOS][PSDK] Fix com tests for WS03, Vista+ (#8343)
[COM_APITEST]
- Add NTDDI version gating to classes and interfaces in tests
- Remove rigid offset tests. Instead, offsets to known interfaces can be logged by defining LOG_COM_INTERFACE_OFFSETS.
- Replace the noreg member of the known interfaces array with a function pointer that can be used to determine if a com test should be globally registered depending on the current NTDDI version. I could probably replace this with a min and max registered NTDDI value, but I thought this was confusing for interfaces that are never globally registered.

[INCLUDE/REACTOS]
- Rename the existing interface definition for IShellBrowserService to IShellBrowserService_XP at {1307EE17-EA83-49EB-96B2-3A28E2D7048A}. This only exists on XP and Server 2003, no earlier or later versions.
- Rename IID_IShellBrowserServce to IID_IShellBrowserService since this definition is correct for Windows 7+ at {DFBC7E30-F9E5-455F-88F8-FA98C1E494CA}
- Add an interface definition for IShellBrowserService4 at {F5A24314-5B8B-44FA-BC2E-31285544B520}. This definition for IShellBrowserService exists for Vista only and no other version.

[PSDK]
- Add a define for NTDDI_WIN7SP1. While this isn't defined in the public Windows headers, it clearly exists in private headers because it is referenced in the public WinBase.h header.
2025-09-29 08:33:38 -05:00
Eric Kohl
f5204f85b1 [PSDK] Fixes for _IP_ADAPTER_ANYCAST_ADDRESS_XP and _IP_ADAPTER_MULTICAST_ADDRESS_XP
Addendum to 43548291.
2025-09-27 23:23:05 +02:00
Carl J. Bialorucki
435482912c [PSDK][INCLUDE/WINE] Header changes needed for iphlpapi, shlwapi, advapi32, and kernel32 winetest syncs (#8317)
- [INCLUDE/WINE] Add synced Wine headers for the iphlpapi winetest to use. This helps us slowly decouple our headers and wine's headers.
- [PSDK] Add definitions we are missing for other winetest syncs.
- [WINETESTS][APITESTS] Fix breaking changes, remove duplicate definitions for debugstr_guid.
2025-09-25 17:54:18 -05:00
Eric Kohl
918bc859a9 [NETSH] Create a root helper object
The root helper object is required to load ifmon.dll from WinXP.
2025-09-21 23:55:18 +02:00
Hermès Bélusca-Maïto
fa7eca6cd9 [NDK] Expose RtlUnhandledExceptionFilter2() (#8353) 2025-09-21 15:18:15 +02:00
Hermès Bélusca-Maïto
db69a9a7e1 [RTL][NDK] Improve RtlUnhandledExceptionFilter(2) (#8353)
- Reimplement `RtlUnhandledExceptionFilter()` by just calling
  `RtlUnhandledExceptionFilter2()`.

- Return an adequate exception filter value `EXCEPTION_CONTINUE_SEARCH`
  from `RtlUnhandledExceptionFilter2()`, instead of some random error.
  If `ExceptionCode` is `STATUS_POSSIBLE_DEADLOCK` however, return
  `EXCEPTION_CONTINUE_EXECUTION` instead, as shown by a test from Whindmar Saksit.

- The second parameter of `RtlUnhandledExceptionFilter2()` is not
  a flag, but a pointer to string `PCSTR` !
  See https://skanthak.hier-im-netz.de/download/NTDLL.H
  who is the only one online who has the correct definition,
  whose usage I've double-checked on Win7 ntdll.dll.

  This is used in the `<function_name>` slot in the displayed
  debugger message:
  ```
  *** An Access Violation occurred in <program_command_line>:<function_name>
  The instruction at <address> tried to write to a NULL pointer
  ```
  For example, see: https://community.osr.com/t/access-violation/33435
2025-09-21 15:18:14 +02:00
Hermès Bélusca-Maïto
92f680dddb [NDK] Fix the RTLP_UNHANDLED_EXCEPTION_FILTER type (#8353)
Confirmed with the System Informer phnt headers.
2025-09-21 15:18:13 +02:00
Hermès Bélusca-Maïto
ae4c5b9a8d [NDK] potypes.h: Add useful macros for SYSTEM_POWER_CAPABILITIES (#8386)
Add useful macros, similar to the powrprof.dll `IsPwr*()` functions,
but that are suitable when one has a `SYSTEM_POWER_CAPABILITIES`
structure initialized from `NtPowerInformation(SystemPowerCapabilities)`.

- `IS_PWR_SUSPEND_ALLOWED()`, equivalent to `IsPwrSuspendAllowed()`,
  indicating whether any of the S1, S2, S3 sleep states are supported.

- `IS_PWR_HIBERNATE_ALLOWED()`, equivalent to `IsPwrHibernateAllowed()`,
  indicating whether the S4 sleep state is supported and the
  hibernation file is present.

- `IS_PWR_POWEROFF_ALLOWED()`, equivalent to `IsPwrShutdownAllowed()`,
  indicating whether the S5 "soft-off" state is supported.
2025-09-15 16:40:49 +02:00
Timo Kreuzer
571ac5e608 [NTOS:PO] Implement SystemBatteryState in NtPowerInformation
This should get us proper battery status display.
2025-09-13 11:38:38 +03:00
Timo Kreuzer
5a8c36d9a1 [SDK] Remove header definitions of __ROS_LONG64__
These were totally pointless, because the condition was never true.
2025-09-11 09:17:13 +03:00
Whindmar Saksit
87df3ea3e1 [SHLWAPI][EXPLORER] Implement OS_SERVERADMINUI (#7051)
OS_SERVERADMINUI changes minor things in Explorer, the most visible is that the default folder view mode changes from large icons to details
2025-09-04 19:25:43 +02:00
Mark Jansen
db57e02d6b [APPCOMPAT] Add RendererFull3D flag
This flag will be used for DDraw experiments.
CORE-20322
2025-09-04 15:23:48 +02:00
Hermès Bélusca-Maïto
320bc52fb4 [NDK][RTL] Use LOGICAL also for RtlIsCriticalSectionLocked(ByThread)
This change has been validated with the System Informer phnt headers.
2025-08-25 23:11:57 +02:00
Hermès Bélusca-Maïto
ef5eadafb1 [NDK][RTL] Fix RtlTryEnterCriticalSection() return type
The Win32 TryEnterCriticalSection(), which returns a 32-bit BOOL,
directly redirects to NTDLL!RtlTryEnterCriticalSection().

The latter should therefore return a 32-bit boolean as well:
use the LOGICAL type for this purpose. This change has been
validated with the System Informer phnt headers.

This mismatch was caught by Marcin Jabłoński (TheNNX).
2025-08-25 23:11:56 +02:00
Hermès Bélusca-Maïto
e250b3fd01 [NDK][KMTESTS] Move the LOGICAL type definition to NDK
The LOGICAL (32-bit boolean) type is already defined for kernel-mode
in the XDK/DDK ntdef.h header. Add the type in the NDK for usage in
user-mode NT code also.

The definition present in kmt_platform.h can now be removed, since
it can now use the one from the NDK.
2025-08-25 23:11:45 +02:00
Timo Kreuzer
0e0852e1da [ASM] Add some asm constants for x86 2025-08-22 09:12:51 +03:00
Timo Kreuzer
80bef4fe40 [XDK][NTOS:KE] Update XSAVE_AREA 2025-08-22 09:12:51 +03:00
Timo Kreuzer
d7761b1296 [VCRUNTIME][ASM] Fix definition of x64 _JUMP_BUFFER 2025-08-22 09:12:51 +03:00
Serge Gautherie
a871ff1763 [SDK] ntddndis.h: Add/Update 3 NDIS typedefs (#8319) 2025-08-16 19:05:42 +02:00
Serge Gautherie
f100d34638 [NDIS][PSDK] Define IOCTL_NDIS_RESERVED7 and add a stub (#8240)
Another small step, until further investigation and implementation.

CORE-13831
2025-08-16 19:54:21 +03:00
Eric Kohl
dc97a4d380 [DHCPCSVC][IDL] Implement DhcpRemoveDNSRegistrations()
The dnsapi.dll part is still missing.
2025-08-14 14:44:04 +02:00
Eric Kohl
0bd6b3dd58 [DHCPCSVC][PSDK] Clean up, add some documentation and missing declarations 2025-08-13 14:58:27 +02:00
Eric Kohl
7dd18589a5 [IDL] Do not use the browser service interface GUID for the DHCP client service 2025-08-10 21:17:06 +02:00
Serge Gautherie
f24b57378e [PSDK][KS] IKsProcessingObject_fnProcessingObjectWork(): Fix mutex copypastas (#8288)
- ks.h: Add KsFilterReleaseProcessingMutex() declaration

- `IKsProcessingObject_fnProcessingObjectWork()`: Fix mutex copypastas

Addendum to commit c6b26fa452 (r50531).
CORE-19511
2025-08-08 23:35:56 +02:00
Timo Kreuzer
dda1cb9346 [PSDK] Avoid NDK include in versionhelpers.h 2025-08-06 17:48:37 +03:00