Commit graph

1133 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto bd5209d9f4
[HALX86] These HalpNo* functions are actually _implemented_. Document their purpose.
Remove the misleading comment in HalpNoBusData().
Update the SAL annotations.
2023-06-25 21:25:06 +02:00
Oleg Dubinskiy e034377b51
[WIN32SS][ENG][NTDDRAW] Manage DirectDraw instances when switching display mode (#4519)
CORE-17932

[ENG] Implement DirectDraw management in switch display mode functions
(e.g. resolution change, color depth, display frequency etc.):

- Switch DirectDraw instances between the two PDEVs (the current one and
  the new one allocated by ourselves) by calling dxg!DxDdDynamicModeChange
  function.

- Suspend them before and resume after the display mode switch, by calling
  dxg!DxDdsuspendDirectDraw and dxg!DxDdResumeDirectDraw appropriately.

We currently don't have these functions implemented, but MS DXG has, so
it allows to properly manage DirectDraw PDEVs using this driver, similarly
to Windows.
My analysis confirms that these functions are always called in XP/2k3 on
display mode switch, even when there is no any DirectX app running at the
moment. Analyzing their prototypes show that my guesses are correct.

- Initialize hDev and dhpdev members for EDD_DIRECTDRAW_GLOBAL for newly
  created surfaces, switch them during mode change and re-initialize after
  it also. They are commonly used by DirectDraw stack.
  In addition, enable DirectDraw for old and new PDEVs, by calling
  dxg!DxDdEnableDirectDraw function.


[NTDDRAW] Additionally, fix usage of DirectDraw lock count in the PDEVOBJ
structure.

- Enable cDirectDrawDisableLocks member for storing its value, instead of
  DxDd_nCount, which is marked as ROS-specific.

- Use it in win32k!DxEngGet/SetHdevData for getting/setting DirectDraw
  count appropriately.

My analysis also shows that in Windows, the PDEVOBJ::cDirectDrawDisableLocks
method calls DxEngGetHdevData with type 8, which corresponds to our DxDd_nCount.
So there are no doubts that this member is used there.

- Rename DxEngGetHdevData_dd_count alias of type 8 to DxEngGetHdevData_dd_locks,
  to match more accurately an actual member name. Update the enumeration
  and fix all code parts appropriately.

All these changes allow to properly change display mode during executing
DirectDraw applications, when they try to switch in full-screen mode.
At least a bugcheck that happened before my changes, does no longer appear.

There are still some games that don't run correctly, as if there is no
3D acceleration (which actually exists). This requires further investigations.
2023-06-21 18:00:24 +02:00
Hermès Bélusca-Maïto 0fbd5eda85
[DDK] storport.h: Add some missing definitions that are in common with srb.h 2023-06-19 21:10:49 +02:00
Hermès Bélusca-Maïto b12069d670
[DDK] srb.h: Introduce Win8+ SCSI_MAXIMUM_BUSES_PER_ADAPTER and comment about the old SCSI_MAXIMUM_* variables. 2023-06-19 21:10:44 +02:00
Hermès Bélusca-Maïto 3bdc062fb9
[PSDK][NDK] Update SYSTEM_PERFORMANCE_INFORMATION definition with Win7+ members.
See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/performance.htm
for more information.
2023-06-15 12:55:08 +02:00
Eric Kohl c3db5e9c8e [ADVAPI32][SECLOGON] CreateProcessWithLogonW: Pass the environment to the callee 2023-06-10 14:10:14 +02:00
Hermès Bélusca-Maïto 2674e26cbb
[NTOS:IO] Reformat iorsrce.c, no functional code changes.
- Fix whitespace; add SAL annotations, doxygen documentation...

- Deduplicate the array of description strings corresponding to
  IO_QUERY_DEVICE_DATA_FORMAT.

- Unhardcode the "[3]" into 'IoQueryDeviceMaxData': the maximum number
  of device data queried.
2023-06-04 21:40:07 +02:00
Hermès Bélusca-Maïto 509359b3ec
[DDK] Add some documentation about the VIDEO_HARDWARE_CONFIGURATION_DATA structure. 2023-06-04 21:40:06 +02:00
Hermès Bélusca-Maïto 2e305b251b
[DDK] Correct PERF_CONFIGURATION_DATA definition. 2023-06-04 21:40:05 +02:00
Hermès Bélusca-Maïto 8d242c6229
[SDK] Add CONFIGURATION_TYPE definition back in arc.h
The definition is also in xdk/iotypes.h and ntddk.h around _ARC_DDK_
for compatibility, but arc.h should also be self-contained regarding
ARC definitions.
2023-06-04 21:40:04 +02:00
Hermès Bélusca-Maïto 789a296c43
[SDK:XBOX] Add missing 'VOID' in empty function prototypes. 2023-06-04 21:40:03 +02:00
Timo Kreuzer 15fbcc19b9 [NTOS:KE/x64] Fix KiConvertToGuiThread
- Do not allocate a new stack, if the thread already has a large one. This prevents the function from freeing a large stack as a normal stack and subsequently leaking system PTEs.
- Fix the check for failure of PsConvertToGuiThread (test eax, not rax, for being negative, because by default rax is zero extended from eax, not sign extended). This fixes an infinite loop on failure.
2023-05-16 22:03:13 +03:00
Katayama Hirofumi MZ 4aff629302
[IMM32][NTUSER][SDK] Add ImmCallImeConsoleIME (#5271)
- Add <jpnvkeys.h>.
- Add imm32!ImmCallImeConsoleIME.
CORE-11700
2023-05-10 14:04:01 +09:00
Katayama Hirofumi MZ 8b948ff062
[KERNEL32][SDK] RegisterConsoleIME and UnregisterConsoleIME (#5270)
The conime.exe program exists in WinXP/Win2k3 and it realizes Console IME. conime.exe calls kernel32!RegisterConsoleIME and kernel32!UnregisterConsoleIME. To realize Console IME, these two functions are required. CORE-11700
2023-05-07 22:55:46 +09:00
Mark Jansen bf29d98a54
[PSDK] Add some more argument names 2023-04-22 18:31:49 +02:00
Joachim Henze 99e5f51d5b
[SDK] Shorten autogenerated Copyright strings (#5210)
that we do compile into almost every dll and exe.
Reduces unnecessary scrolling in the
Versions tab of file properties dlg, which precedes the Copyright phrase anyway.

MS also uses shorter strings and therefore doesn't require to scroll at all.
See attached screenshots in the PR.
2023-04-04 12:10:59 +02:00
Dmitry Borisov 557306f5c0
[DDK:NDIS] Fix definition of broadcast address macro (#5155)
ff:ff:ff:ff:ff:ff is the broadcast MAC address.

CORE-8724
2023-03-18 16:57:52 +01:00
Hermès Bélusca-Maïto f6c8155239
[SDK] driverspecs.h: Add missing dummy _IRQL_limited_to_() definition (when _PREFAST_ is not defined).
Addendum to commit 8a688204.
2023-03-18 03:42:26 +01:00
Hermès Bélusca-Maïto e241c87eea
[SDK] sdkddkver.h: Add NTDDI_* defines for newest Windows 10 and 11 versions.
And add version descriptions, especially for Windows 10 as it becomes messy.

Information from:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlisntddiversionavailable
- Shared/sdk/extdef.h from https://github.com/Mattiwatti/WinObjEx64
- Descriptions from https://github.com/MiroKaku/Veil
- Cross-checked with headers from https://github.com/microsoft/wil
2023-03-14 00:14:12 +01:00
Hermès Bélusca-Maïto a8b09eddc4
[NTOS:KD] Add some annotations. 2023-03-09 18:32:36 +01:00
Joachim Henze 09dde2cff9
[REACTOS] "http://www.reactos" -> "https://reactos" (#5043)
To harmonize, to save some bytes, and last but not least for security reasons.
This can be understood as an addendum to (#2619).
2023-02-06 17:01:52 +03:00
Gabriel Grondin 144e984b40 [ZLIB] Update to v1.2.13. CORE-18752 2023-02-02 02:18:39 +03:00
Victor Perevertkin 1734f29721 [IP][LWIP][TCPIP] Move ip and lwip libraries to drivers/network/tcpip
These libraries are used only inside tcpip.sys driver so move them close
to it.
2023-02-01 02:31:14 +03:00
Timo Kreuzer 2154e259e7 [PSDK] Fix definition of DRVCALLBACK for 64 bit 2023-01-04 10:32:28 +01:00
Hermès Bélusca-Maïto 95e5f07084
🎊 🍾 🥳 Happy New Year 2023 to the ReactOS Community! 🎆 ⚛️ ☢️
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:
 __,  ,__)            __,  ,__)       __, ,__)        ░▄████▄░▄███▄░▄████▄░▄█▀▀█▄░
(--|__| _ ,_ ,_      (--|\ | _       (--\ | _  _ ,_   ░▀▀░▄██░██░██░▀▀░▄██░░░░▄█▀░
  _|  |(_||_)|_)(_|    _| \|(/_(_|_)     \|(/_(_||    ░░▄██▀░░██░██░░▄██▀░░▄░▀▀█▄░
 (        |  |  ,_|   (                (__|           ░██████░▀███▀░██████░▀█▄▄█▀░
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:
2023-01-01 00:00:00 +03:00
Timo Kreuzer 3b437b8a1c [NDK] Fix definition of RTL_DEBUG_INFORMATION
Fixes ntdll_aiptest RtlDebugInformation on x64
2022-12-30 11:19:26 +01:00
Timo Kreuzer 918c98a239 [NDK] Fix definition of LDR_ENUM_RESOURCE_INFO
This fixes ntdll_apitest LdrEnumResources on x64 Windows
2022-12-30 11:19:26 +01:00
Timo Kreuzer 081c637c06 [XDK] Silence some GCC x64 warnings 2022-12-01 15:21:59 +02:00
Timo Kreuzer 06f1ac5fa4 [CRT] Add a workaround for CORE-18255 2022-12-01 15:21:59 +02:00
Hermès Bélusca-Maïto 8398b28ae4
[PSDK] Fix x64 incompatibilities in ***Box_GetItemData(). Addendum to 6572dd7f4. 2022-11-28 15:02:39 +01:00
Thomas Faber 991e2bd45b
[LIBPNG] Update to version 1.6.39. CORE-18670 2022-11-27 10:10:53 -05:00
Thomas Faber c5febe93f0
[LIBPNG] Update to version 1.6.38. CORE-18670 2022-11-27 10:10:51 -05:00
Hermès Bélusca-Maïto 3c95c95369
[NDK] Fix description for PIO_APC_ROUTINE.
[RTL] Typo fix.
2022-11-26 02:38:52 +01:00
Thomas Faber 19da1718e5
[LIBXSLT] Update to version 1.1.37. CORE-17766 2022-11-25 09:30:40 -05:00
Thomas Faber 0d5a4166a4
[LIBXML2] Update to version 2.10.1. CORE-17766 2022-11-25 09:30:36 -05:00
Timo Kreuzer 20a6cff4dd [CRT] Implement _InterlockedCompareExchange128 intrinsic for GCC 2022-11-24 21:17:58 +02:00
Hermès Bélusca-Maïto f7024d6c72
[PSDK][NTOS:KD64] Turns out, that even Clang in MSVC mode needs the 64-bits pointer extension hack!
Addendum to commit de81021ba.
Otherwise, we get the following build error:

 \ntoskrnl\kd64\kddata.c(532,5): error: initializer element is not a compile-time constant
      PtrToUL64(RtlpBreakWithStatusInstruction),
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 \ntoskrnl\kd64\kddata.c(526,26): note: expanded from macro 'PtrToUL64'
 #define PtrToUL64(x)    ((ULPTR64)(x))
                          ^~~~~~~~~~~~
2022-11-24 13:30:43 +01:00
Thomas Faber 911153da10
[LIBXML2] Update to version 2.10.0. CORE-17766 2022-11-23 22:02:47 -05:00
Thomas Faber 21ab4d93c7
[LIBXSLT] Update to version 1.1.36. CORE-17766
This version was released after libxml2 2.10.0, but it removes
usage of some now-deprecated functions that would break the build.
2022-11-23 22:02:43 -05:00
Hermès Bélusca-Maïto de81021bab
[PSDK][NTOS:KD64] Rename GCC_ULONG64 to ULPTR64 to self-document the fact it stores a pointer as a 64-bit quantity.
But the underlying GCC stupidity is still there (15 years later).

However, enable it only in 32-bit GCC builds, not in 64-bits nor with MSVC.
See commit b9cd3f2d9 (r25845) for some details.

GCC is indeed still incapable of casting 32-bit pointers up to 64-bits,
when static-initializing arrays (**outside** a function) without emitting
the error:

  "error: initializer element is not constant"

(which might somehow indicate it actually tries to generate executable
code for casting the pointers, instead of doing it at compile-time).

Going down the rabbit hole, other stupidities show up:

Our PVOID64 type and the related POINTER_64 (in 32-bit archs), or the
PVOID32 and POINTER_32 (in 64-bit archs), are all silently broken in
GCC builds, because the pointer size attributes __ptr64 and __ptr32,
which are originally MSVC-specific, are defined to nothing in _mingw.h.
(And similarly for the __uptr and __sptr sign-extension attributes.)

Clang and other sane ompilers has since then implemented those (enabled
with -fms-extensions), but not GCC. The closest thing that could exist
for GCC is to do:

  #define __ptr64 __attribute__((mode(DI)))

in order to get a 64-bit-sized pointer type with

  typedef void* __ptr64 PVOID64;

but even this does not work, with the error:

  "error: invalid pointer mode 'DI'"
2022-11-24 01:18:16 +01:00
Hermès Bélusca-Maïto 1c0950b557
[PSDK][NTOS:KD64] Update the KDDEBUGGER_DATA64 structure with new fields.
Information from the Windows 10 SDK and from
https://github.com/DarthTon/Blackbone/blob/master/src/BlackBoneDrv/NativeStructs.h
2022-11-24 01:18:15 +01:00
Hermès Bélusca-Maïto 1847474aaa
[PSDK] Clarify the FIXME comment about this mysterious warning.h (here for WDK compatibility). 2022-11-24 01:18:11 +01:00
Thomas Faber 8940614a78
[LIBXML2] Update to version 2.9.14. CORE-17766 2022-11-21 19:46:12 -05:00
Thomas Faber 7244e0c5c6
[LIBXML2] Update to version 2.9.13. CORE-17766 2022-11-21 19:46:12 -05:00
Thomas Faber f7671c1be8
[LIBXSLT] Update to version 1.1.35. CORE-17766 2022-11-21 19:46:11 -05:00
Thomas Faber e524b1bcf6
[LIBXSLT] Improve sync with upstream. CORE-17766
Makefile.am: this hasn't been updated in a while
security.c: WIN32 -> _WIN32 to keep the ROS-diff consistent with the rest
win32config.h/libxslt.h: remove unnecessary ROS-diff
xsltwin32config.h: this was missed in the 1.1.34 sync
xsltexports.h: mark a ROS-diff as such
2022-11-21 19:46:08 -05:00
Hermès Bélusca-Maïto 56be4eafd5
[NTOS:IO][NDK] Add the exported IoDeleteDriver to the NDK headers. 2022-11-18 18:11:26 +01:00
Hermès Bélusca-Maïto 2dddbd5c54
[SMSS] Fix three SmpLoadSubSystem bugs related to the SB_CREATE_SESSION callback.
This fixes starting the Windows 2000 POSIX subsystem in ReactOS.

- The CreateSession pointer was initialized against the SbApiMsg variable, but
  it was the other SbApiMsg2 that was being initialized and sent through LPC.

- Do not overwrite the MuSessionId (Terminal Services session ID) variable with
  the generated environment subsystem session ID from SmpAllocateSessionId().

- Actually initialize the SbApiMsg ApiNumber for the CreateSession LPC call.

(dll\win32\kernel32\client\proc.c:3690) Retrying with: POSIX /P C:\ReactOS\system32\posix\ls.exe /C ls
Breakpoint 1 hit
csrsrv!CsrSbApiRequestThread+0x64:
001b:1000ac34 837dfc00        cmp     dword ptr [ebp-4],0
kd> ??ReceiveMsg
struct _SB_API_MSG
   +0x000 h                : _PORT_MESSAGE
   +0x018 ConnectionInfo   : _SB_CONNECTION_INFO
   +0x018 ApiNumber        : 0xcccccccc (No matching name)
   +0x01c ReturnValue      : 0n0
   +0x020 u                : <unnamed-tag>
kd> p
...
(base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with  Status c0000002 for sessionid 2
...
<Retrying>
...
(base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with  Status c0000002 for sessionid 3

All those bugs could have been avoided *IF*, rather than (badly) duplicating
its code, the existing SmpSbCreateSession() function had been used instead.

- "Not sure these field mean what I think they do -- but clear them" ... ◔_◔
  Those fields are related to the debug client interface (DbgUi) and session
  in case the subsystem being started is going to be debugged. These have
  nothing to do with the MuSessionId. Clarify this in the SB_CREATE_SESSION_MSG
  structure and in the SmpSbCreateSession() function.
2022-11-14 00:10:35 +01:00
Hermès Bélusca-Maïto 06a0451415
[SMSS][CSRSRV] Undefine CreateProcess symbol. Name the union inside SB_API_MSG.
Undefine CreateProcess because it can be #define'd (to CreateProcessA/W)
if winbase.h is included prior (as it is in SMSS).
2022-11-14 00:10:32 +01:00
Katayama Hirofumi MZ e1f8b32c3d [INCLUDE][USER32] Add WM_FINALDESTROY and improve ImeWndProcA/W
CORE-11700
2022-11-13 09:59:17 +09:00