- Annotate the functions in query.c file with SAL2 of which they weren't annotated before
- Use _Out_writes_bytes_to_opt_ to further clarify the output parameter is being written to it based on the length size provided.
This is so the code analyzer understands such a parameter is being written into only the specific amount of bytes.
This patch adds the NETIO.SYS driver to ReactOS. NETIO.SYS
is part of Windows since NT6 (Vista).
The driver is not feature complete (meaning some functionality is
unimplemented) but does its job quite good for what it originally
was written for (which is getting WinDRBD working on
ReactOS/Windows Server 2003 SP2).
The driver re-uses parts of the AFD.SYS driver, namely those
functions that ease communitating with the transport device
interface (TDI). Other than that, following features are implemented
and should work:
* TCP/IP networking: connect, listen, accept, read, write
* UDP/IP networking: write
So in a nutshell TCP/IP support is completed, UDP support is
partially complete and ICMP support does not exist yet.
In particular the listen/accept mechanism allows one to write
kernel side TCP servers that one can connect to via the internet.
The netio driver is licensed under the MIT license, see the file
netio.c for more details.
Have fun with it :)
Signed-off-by: Johannes Khoshnazar-Thoma <[email protected]>
We want to use the TDI helper functions also in the NETIO.SYS
driver which comes with the next commit. The code was modernized
a bit (usage of DPRINT, doxygen style comments) but other than
that it was left unchanged.
- [INCLUDE/WINE] Add GetNTVersion() macro, useful for determining Windows versions in Wine tests we need to bring up for older Windows versions.
- [INCLUDE/WINE] Header changes needed for kernel32 winetest
- [WINETESTS] Perform any fixes needed from breaking header changes
- Don't use DECLSPEC_IMPORT for function prototypes when compiled with GCC. This is related to CORE-6504. This hack can be removed when binutils is fixed and CORE-6504 is resolved.
- Add and use `CONST_STR_SIZE/LEN` macros to get the number of bytes and
characters for a static const string buffer, instead of invoking e.g.
`wcslen()`, which may or may NOT be optimized out (e.g. MSVC debug builds).
- Use `UNICODE_NULL` instead of `0`.
- Transform a `DPRINT` into an `INFO_(VIDEOPRT, ...)`
- Fix an x64 warning
`registry.c(689): warning C4267: '=': conversion from 'size_t' to 'USHORT', possible loss of data`
CORE-18185
Addendum to commit 215148267e
Everything that's needed (the x86 emulator with x86BiosCall) is implemented.
Fixes screen cleaning when bootvid takes over the VGA display.
The choice is done by looking for the presence or absence of the
`HKLM\System\CurrentControlSet\Control\GraphicsDrivers\DisableEmulator`
registry key. For more details, see:
https://www.geoffchappell.com/studies/windows/km/hal/api/x86bios/call.htm
By default, use V86 in 32-bit Win2k3-compatible builds, otherwise
(Vista+) check the presence of the registry key.
The X86 emulator routines are exported by the HAL.DLL. They are always
exported by the non-x86 HAL. However, they may or may not be exported by
the x86 (32-bit) HAL: on NT 5.2 and below they are not exported, while
on NT 6.x (Vista+) they are.
Therefore:
- in our NT <= 5.2 x86 builds, we load the routines at runtime. If they
aren't found, we fail emulator support initialization and fall back to
VDM V86 support.
- in our NT 6.x (x86 or not) builds, we always directly link with the HAL
routines, since they are guaranteed to be present there.
Addendum to commit 7f1075986f (PR #8305).
Addresses review comment https://github.com/reactos/reactos/pull/8305#discussion_r2505628716
In `expand_pointer_table_if_necessary()`, if any of the `RefIdToPointer`
`XlatTable` or `StateTable` buffers failed to be reallocated, the
`realloc()` call would return NULL while the underlying buffer still be
valid. Directly assigning the reallocation result to the pointers would
then leak the buffers.
With this fix, the `realloc()` result is stored in a temporary pointer.
If the result is NULL, we free the original buffer, since the intended
code behaviour is to reset all the tables. If the result is a valid
pointer to the reallocated buffer, then we can use it instead.