[SDK][XDK][PSDK] Grab header changes needed for Wine-10.0 KernelBase (#8047)

* [SDK] Update ThreadInfoClass to wine-10.0

* [SDK][MODULES] Fix a test and add wine-10 entries to headers

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
This commit is contained in:
Justin Miller 2025-05-31 17:20:02 -07:00 committed by GitHub
parent babe6046e5
commit 45eff312cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 600 additions and 5 deletions

View file

@ -0,0 +1,55 @@
/*
* Copyright (C) 2019 Alex Henrie
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_IP2STRING_H
#define __WINE_IP2STRING_H
#ifdef __cplusplus
extern "C" {
#endif
NTSYSAPI char * WINAPI RtlIpv4AddressToStringA(const IN_ADDR *address, char *str);
NTSYSAPI WCHAR * WINAPI RtlIpv4AddressToStringW(const IN_ADDR *address, WCHAR *str);
#define RtlIpv4AddressToString WINELIB_NAME_AW(RtlIpv4AddressToString)
NTSYSAPI NTSTATUS WINAPI RtlIpv4AddressToStringExA(const IN_ADDR *address, USHORT port, char *str, ULONG *size);
NTSYSAPI NTSTATUS WINAPI RtlIpv4AddressToStringExW(const IN_ADDR *address, USHORT port, WCHAR *str, ULONG *size);
#define RtlIpv4AddressToStringEx WINELIB_NAME_AW(RtlIpv4AddressToStringEx)
NTSYSAPI char * WINAPI RtlIpv6AddressToStringA(const IN6_ADDR *address, char *str);
NTSYSAPI WCHAR * WINAPI RtlIpv6AddressToStringW(const IN6_ADDR *address, WCHAR *str);
#define RtlIpv6AddressToString WINELIB_NAME_AW(RtlIpv6AddressToString)
NTSYSAPI NTSTATUS WINAPI RtlIpv6AddressToStringExA(const IN6_ADDR *address, LONG scope, USHORT port, char *str, ULONG *size);
NTSYSAPI NTSTATUS WINAPI RtlIpv6AddressToStringExW(const IN6_ADDR *address, LONG scope, USHORT port, WCHAR *str, ULONG *size);
#define RtlIpv6AddressToStringEx WINELIB_NAME_AW(RtlIpv6AddressToStringEx)
NTSYSAPI NTSTATUS WINAPI RtlIpv4StringToAddressA(const char *str, BOOLEAN strict, const char **terminator, IN_ADDR *address);
NTSYSAPI NTSTATUS WINAPI RtlIpv4StringToAddressW(const WCHAR *str, BOOLEAN strict, const WCHAR **terminator, IN_ADDR *address);
#define RtlIpv4StringToAddress WINELIB_NAME_AW(RtlIpv4StringToAddress)
NTSYSAPI NTSTATUS WINAPI RtlIpv4StringToAddressExA(const char *str, BOOLEAN strict, IN_ADDR *address, USHORT *port);
NTSYSAPI NTSTATUS WINAPI RtlIpv4StringToAddressExW(const WCHAR *str, BOOLEAN strict, IN_ADDR *address, USHORT *port);
#define RtlIpv4StringToAddressEx WINELIB_NAME_AW(RtlIpv4StringToAddressEx)
NTSYSAPI NTSTATUS WINAPI RtlIpv6StringToAddressA(const char *str, const char **terminator, IN6_ADDR *address);
NTSYSAPI NTSTATUS WINAPI RtlIpv6StringToAddressW(const WCHAR *str, const WCHAR **terminator, IN6_ADDR *address);
#define RtlIpv6StringToAddress WINELIB_NAME_AW(RtlIpv6StringToAddress)
NTSYSAPI NTSTATUS WINAPI RtlIpv6StringToAddressExA(const char *str, IN6_ADDR *address, ULONG *scope, USHORT *port);
NTSYSAPI NTSTATUS WINAPI RtlIpv6StringToAddressExW(const WCHAR *str, IN6_ADDR *address, ULONG *scope, USHORT *port);
#define RtlIpv6StringToAddressEx WINELIB_NAME_AW(RtlIpv6StringToAddressEx)
#ifdef __cplusplus
}
#endif
#endif

View file

@ -28,6 +28,7 @@ typedef void *DLL_DIRECTORY_COOKIE, **PDLL_DIRECTORY_COOKIE;
WINBASEAPI DLL_DIRECTORY_COOKIE WINAPI AddDllDirectory(const WCHAR *);
WINBASEAPI BOOL WINAPI RemoveDllDirectory(DLL_DIRECTORY_COOKIE);
WINBASEAPI BOOL WINAPI SetDefaultDllDirectories(DWORD);
WINBASEAPI INT WINAPI FindStringOrdinal(DWORD, const WCHAR *, INT, const WCHAR *, INT, BOOL);
#ifdef __cplusplus
}

View file

@ -0,0 +1,39 @@
/*
* Copyright (C) 2023 Paul Gofman for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __NTIORING_X_H_
#define __NTIORING_X_H_
enum IORING_VERSION
{
IORING_VERSION_INVALID = 0,
IORING_VERSION_1 = 1,
IORING_VERSION_2 = 2,
IORING_VERSION_3 = 300,
};
typedef enum IORING_VERSION IORING_VERSION;
enum IORING_FEATURE_FLAGS
{
IORING_FEATURE_FLAGS_NONE = 0,
IORING_FEATURE_UM_EMULATION = 0x00000001,
IORING_FEATURE_SET_COMPLETION_EVENT = 0x00000002,
};
typedef enum IORING_FEATURE_FLAGS IORING_FEATURE_FLAGS;
#endif

123
sdk/include/psdk/perflib.h Normal file
View file

@ -0,0 +1,123 @@
/*
* Copyright (C) 2017 Austin English
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _PERFLIB_H_
#define _PERFLIB_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef void * (__WINE_ALLOC_SIZE(1) CDECL * PERF_MEM_ALLOC)(SIZE_T,void*);
typedef void (CDECL * PERF_MEM_FREE)(LPVOID,LPVOID);
typedef ULONG (WINAPI * PERFLIBREQUEST)(ULONG,PVOID,ULONG);
typedef struct _PERF_COUNTERSET_INFO {
GUID CounterSetGuid;
GUID ProviderGuid;
ULONG NumCounters;
ULONG InstanceType;
} PERF_COUNTERSET_INFO, * PPERF_COUNTERSET_INFO;
/* PERF_COUNTERSET_INFO InstanceType values. */
#define PERF_COUNTERSET_FLAG_MULTIPLE 0x00000002
#define PERF_COUNTERSET_FLAG_AGGREGATE 0x00000004
#define PERF_COUNTERSET_FLAG_HISTORY 0x00000008
#define PERF_COUNTERSET_FLAG_INSTANCE 0x00000010
#define PERF_COUNTERSET_SINGLE_INSTANCE 0
#define PERF_COUNTERSET_MULTI_INSTANCES PERF_COUNTERSET_FLAG_MULTIPLE
#define PERF_COUNTERSET_SINGLE_AGGREGATE PERF_COUNTERSET_FLAG_AGGREGATE
#define PERF_COUNTERSET_MULTI_AGGREGATE (PERF_COUNTERSET_FLAG_AGGREGATE | PERF_COUNTERSET_FLAG_MULTIPLE)
#define PERF_COUNTERSET_SINGLE_AGGREGATE_HISTORY (PERF_COUNTERSET_FLAG_HISTORY | PERF_COUNTERSET_SINGLE_AGGREGATE)
#define PERF_COUNTERSET_INSTANCE_AGGREGATE (PERF_COUNTERSET_MULTI_AGGREGATE | PERF_COUNTERSET_FLAG_INSTANCE)
typedef struct _PERF_COUNTERSET_INSTANCE {
GUID CounterSetGuid;
ULONG dwSize;
ULONG InstanceId;
ULONG InstanceNameOffset;
ULONG InstanceNameSize;
} PERF_COUNTERSET_INSTANCE, * PPERF_COUNTERSET_INSTANCE;
typedef struct _PERF_COUNTER_INFO {
ULONG CounterId;
ULONG Type;
ULONGLONG Attrib;
ULONG Size;
ULONG DetailLevel;
LONG Scale;
ULONG Offset;
} PERF_COUNTER_INFO, *PPERF_COUNTER_INFO;
/* PERF_COUNTER_INFO Attrib flags. */
#define PERF_ATTRIB_BY_REFERENCE 0x00000001
#define PERF_ATTRIB_NO_DISPLAYABLE 0x00000002
#define PERF_ATTRIB_NO_GROUP_SEPARATOR 0x00000004
#define PERF_ATTRIB_DISPLAY_AS_REAL 0x00000008
#define PERF_ATTRIB_DISPLAY_AS_HEX 0x00000010
typedef struct _PROVIDER_CONTEXT {
DWORD ContextSize;
DWORD Reserved;
PERFLIBREQUEST ControlCallback;
PERF_MEM_ALLOC MemAllocRoutine;
PERF_MEM_FREE MemFreeRoutine;
LPVOID pMemContext;
} PERF_PROVIDER_CONTEXT, * PPERF_PROVIDER_CONTEXT;
typedef struct _PERF_COUNTER_IDENTIFIER {
GUID CounterSetGuid;
ULONG Status;
ULONG Size;
ULONG CounterId;
ULONG InstanceId;
ULONG Index;
ULONG Reserved;
} PERF_COUNTER_IDENTIFIER, *PPERF_COUNTER_IDENTIFIER;
#define PERF_WILDCARD_COUNTER 0xFFFFFFFF
#define PERF_WILDCARD_INSTANCE L"*"
typedef struct _PERF_DATA_HEADER {
ULONG dwTotalSize;
ULONG dwNumCounters;
LONGLONG PerfTimeStamp;
LONGLONG PerfTime100NSec;
LONGLONG PerfFreq;
SYSTEMTIME SystemTime;
} PERF_DATA_HEADER, *PPERF_DATA_HEADER;
PERF_COUNTERSET_INSTANCE WINAPI *PerfCreateInstance(HANDLE, const GUID *, const WCHAR *, ULONG);
ULONG WINAPI PerfDeleteInstance(HANDLE, PERF_COUNTERSET_INSTANCE *);
ULONG WINAPI PerfSetCounterRefValue(HANDLE, PERF_COUNTERSET_INSTANCE *, ULONG, void *);
ULONG WINAPI PerfSetCounterSetInfo(HANDLE, PERF_COUNTERSET_INFO *, ULONG);
ULONG WINAPI PerfStartProvider(GUID *, PERFLIBREQUEST, HANDLE *);
ULONG WINAPI PerfStartProviderEx(GUID *, PERF_PROVIDER_CONTEXT *, HANDLE *);
ULONG WINAPI PerfStopProvider(HANDLE);
ULONG WINAPI PerfAddCounters(HANDLE, PERF_COUNTER_IDENTIFIER *, DWORD);
ULONG WINAPI PerfCloseQueryHandle(HANDLE);
ULONG WINAPI PerfOpenQueryHandle(const WCHAR *, HANDLE *);
ULONG WINAPI PerfQueryCounterData(HANDLE, PERF_DATA_HEADER *, DWORD, DWORD *);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* _PERFLIB_H_ */

View file

@ -0,0 +1,135 @@
/*
* Copyright (C) the Wine project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _WINCONTYPES_
#define _WINCONTYPES_
typedef struct tagCOORD
{
SHORT X;
SHORT Y;
} COORD, *LPCOORD;
typedef struct tagSMALL_RECT
{
SHORT Left;
SHORT Top;
SHORT Right;
SHORT Bottom;
} SMALL_RECT,*LPSMALL_RECT;
typedef struct tagKEY_EVENT_RECORD
{
BOOL bKeyDown; /* 04 */
WORD wRepeatCount; /* 08 */
WORD wVirtualKeyCode; /* 0A */
WORD wVirtualScanCode; /* 0C */
union /* 0E */
{
WCHAR UnicodeChar; /* 0E */
CHAR AsciiChar; /* 0E */
} uChar;
DWORD dwControlKeyState; /* 10 */
} KEY_EVENT_RECORD,*LPKEY_EVENT_RECORD;
/* dwControlKeyState bitmask */
#define RIGHT_ALT_PRESSED 0x0001
#define LEFT_ALT_PRESSED 0x0002
#define RIGHT_CTRL_PRESSED 0x0004
#define LEFT_CTRL_PRESSED 0x0008
#define SHIFT_PRESSED 0x0010
#define NUMLOCK_ON 0x0020
#define SCROLLLOCK_ON 0x0040
#define CAPSLOCK_ON 0x0080
#define ENHANCED_KEY 0x0100
typedef struct tagMOUSE_EVENT_RECORD
{
COORD dwMousePosition;
DWORD dwButtonState;
DWORD dwControlKeyState;
DWORD dwEventFlags;
} MOUSE_EVENT_RECORD,*LPMOUSE_EVENT_RECORD;
/* MOUSE_EVENT_RECORD.dwButtonState */
#define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001
#define RIGHTMOST_BUTTON_PRESSED 0x0002
#define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004
#define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008
#define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010
/* MOUSE_EVENT_RECORD.dwEventFlags */
#define MOUSE_MOVED 0x0001
#define DOUBLE_CLICK 0x0002
#define MOUSE_WHEELED 0x0004
#define MOUSE_HWHEELED 0x0008
typedef struct tagWINDOW_BUFFER_SIZE_RECORD
{
COORD dwSize;
} WINDOW_BUFFER_SIZE_RECORD,*LPWINDOW_BUFFER_SIZE_RECORD;
typedef struct tagMENU_EVENT_RECORD
{
UINT dwCommandId;
} MENU_EVENT_RECORD,*LPMENU_EVENT_RECORD;
typedef struct tagFOCUS_EVENT_RECORD
{
BOOL bSetFocus;
} FOCUS_EVENT_RECORD,*LPFOCUS_EVENT_RECORD;
typedef struct tagINPUT_RECORD
{
WORD EventType;
union
{
KEY_EVENT_RECORD KeyEvent;
MOUSE_EVENT_RECORD MouseEvent;
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
MENU_EVENT_RECORD MenuEvent;
FOCUS_EVENT_RECORD FocusEvent;
} Event;
} INPUT_RECORD,*PINPUT_RECORD;
/* INPUT_RECORD.wEventType */
#define KEY_EVENT 0x01
#define MOUSE_EVENT 0x02
#define WINDOW_BUFFER_SIZE_EVENT 0x04
#define MENU_EVENT 0x08
#define FOCUS_EVENT 0x10
typedef struct tagCHAR_INFO
{
union
{
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes;
} CHAR_INFO,*LPCHAR_INFO;
typedef struct _CONSOLE_FONT_INFO
{
DWORD nFont;
COORD dwFontSize;
} CONSOLE_FONT_INFO,*LPCONSOLE_FONT_INFO;
typedef void *HPCON;
#endif /* _WINCONTYPES_ */

View file

@ -23,6 +23,10 @@ extern "C" {
#endif
#define LOCALE_RETURN_GENITIVE_NAMES 0x10000000
#define LOCALE_ALLOW_NEUTRAL_NAMES 0x08000000
#define LOCALE_SLOCALIZEDDISPLAYNAME 0x00000002
#if (WINVER >= _WIN32_WINNT_VISTA)
#define LOCALE_SLOCALIZEDLANGUAGENAME 0x0000006f
#endif
#define LOCALE_ILANGUAGE 1
#define LOCALE_SLANGUAGE 2
#define LOCALE_SENGLANGUAGE 0x1001
@ -167,6 +171,10 @@ extern "C" {
#define LOCALE_SOPENTYPELANGUAGETAG 0x007a
#define LOCALE_SSORTLOCALE 0x007b
//#endif /* (WINVER >= _WIN32_WINNT_WIN7) */
#define LOCALE_SRELATIVELONGDATE 0x007C // Win8
#define LOCALE_SSHORTESTAM 0x007E
#define LOCALE_SSHORTESTPM 0x007F
#if (WINVER >= 0x0600)
#define LOCALE_NAME_USER_DEFAULT NULL
@ -181,9 +189,11 @@ extern "C" {
#define NORM_IGNORENONSPACE 2
#define NORM_IGNORESYMBOLS 4
#define NORM_IGNOREWIDTH 131072
#define LINGUISTIC_IGNORECASE 0x00000010
#define LINGUISTIC_IGNORECASE 0x00000010
#define LINGUISTIC_IGNOREDIACRITIC 0x00000020
#define NORM_LINGUISTIC_CASING 0x08000000
#define SORT_STRINGSORT 4096
#define SORT_DIGITSASNUMBERS 0x00000008 // _WIN32_WINNT_WIN7
#define LCMAP_LOWERCASE 0x00000100
#define LCMAP_UPPERCASE 0x00000200
#define LCMAP_SORTKEY 0x00000400
@ -205,6 +215,11 @@ extern "C" {
#define LCID_SUPPORTED 2
#define LCID_ALTERNATE_SORTS 4
#define FIND_STARTSWITH 0x00100000
#define FIND_ENDSWITH 0x00200000
#define FIND_FROMSTART 0x00400000
#define FIND_FROMEND 0x00800000
#define LOCALE_ALL 0x00
#define LOCALE_WINDOWS 0x01
#define LOCALE_SUPPLEMENTAL 0x02
@ -455,6 +470,8 @@ extern "C" {
#define CAL_GREGORIAN_ARABIC 10
#define CAL_GREGORIAN_XLIT_ENGLISH 11
#define CAL_GREGORIAN_XLIT_FRENCH 12
#define CAL_PERSIAN 22
#define CAL_UMALQURA 23
#define CSTR_LESS_THAN 1
#define CSTR_EQUAL 2
#define CSTR_GREATER_THAN 3
@ -728,6 +745,33 @@ EnumSystemLocalesEx(
BOOL WINAPI EnumTimeFormatsA(_In_ TIMEFMT_ENUMPROCA, _In_ LCID, _In_ DWORD);
BOOL WINAPI EnumTimeFormatsW(_In_ TIMEFMT_ENUMPROCW, _In_ LCID, _In_ DWORD);
WINBASEAPI
int
WINAPI
FindNLSString(
_In_ LCID Locale,
_In_ DWORD dwFindNLSStringFlags,
_In_reads_(cchSource) LPCWSTR lpStringSource,
_In_ int cchSource,
_In_reads_(cchValue) LPCWSTR lpStringValue,
_In_ int cchValue,
_Out_opt_ LPINT pcchFound);
WINBASEAPI
int
WINAPI
FindNLSStringEx(
_In_opt_ LPCWSTR lpLocaleName,
_In_ DWORD dwFindNLSStringFlags,
_In_reads_(cchSource) LPCWSTR lpStringSource,
_In_ int cchSource,
_In_reads_(cchValue) LPCWSTR lpStringValue,
_In_ int cchValue,
_Out_opt_ LPINT pcchFound,
_In_opt_ LPNLSVERSIONINFO lpVersionInformation,
_In_opt_ LPVOID lpReserved,
_In_opt_ LPARAM sortHandle);
int
WINAPI
FoldStringA(