[SDK] Add some missing definitions

This commit is contained in:
Timo Kreuzer 2024-11-02 10:10:16 +02:00
parent dc0433f02a
commit db5fa3bffc
5 changed files with 105 additions and 3 deletions

View File

@ -25,11 +25,13 @@ extern "C" {
#define LOCALE_ILANGUAGE 1
#define LOCALE_SLANGUAGE 2
#define LOCALE_SENGLANGUAGE 0x1001
#define LOCALE_SENGLISHLANGUAGENAME 0x1001
#define LOCALE_SABBREVLANGNAME 3
#define LOCALE_SNATIVELANGNAME 4
#define LOCALE_ICOUNTRY 5
#define LOCALE_SCOUNTRY 6
#define LOCALE_SENGCOUNTRY 0x1002
#define LOCALE_SENGLISHCOUNTRYNAME 0x1002
#define LOCALE_SABBREVCTRYNAME 7
#define LOCALE_SNATIVECTRYNAME 8
#define LOCALE_IDEFAULTLANGUAGE 9
@ -710,6 +712,18 @@ BOOL WINAPI EnumSystemCodePagesW(_In_ CODEPAGE_ENUMPROCW, _In_ DWORD);
BOOL WINAPI EnumSystemGeoID(_In_ GEOCLASS, _In_ GEOID, _In_ GEO_ENUMPROC);
BOOL WINAPI EnumSystemLocalesA(_In_ LOCALE_ENUMPROCA, _In_ DWORD);
BOOL WINAPI EnumSystemLocalesW(_In_ LOCALE_ENUMPROCW, _In_ DWORD);
typedef BOOL (CALLBACK* LOCALE_ENUMPROCEX)(LPWSTR, DWORD, LPARAM);
WINBASEAPI
BOOL
WINAPI
EnumSystemLocalesEx(
_In_ LOCALE_ENUMPROCEX lpLocaleEnumProcEx,
_In_ DWORD dwFlags,
_In_ LPARAM lParam,
_In_opt_ LPVOID lpReserved);
BOOL WINAPI EnumTimeFormatsA(_In_ TIMEFMT_ENUMPROCA, _In_ LCID, _In_ DWORD);
BOOL WINAPI EnumTimeFormatsW(_In_ TIMEFMT_ENUMPROCW, _In_ LCID, _In_ DWORD);
@ -888,6 +902,14 @@ int WINAPI GetTimeFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
int WINAPI GetTimeFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
int WINAPI GetTimeFormatEx(LPCWSTR,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
LANGID WINAPI GetUserDefaultLangID(void);
WINBASEAPI
int
WINAPI
GetUserDefaultLocaleName(
_Out_writes_(cchLocaleName) LPWSTR lpLocaleName,
_In_ int cchLocaleName);
LCID WINAPI GetUserDefaultLCID(void);
GEOID WINAPI GetUserGeoID(_In_ GEOCLASS);
@ -1006,7 +1028,11 @@ GetLocaleInfoEx(
_Out_writes_opt_(cchData) LPWSTR lpLCData,
_In_ int cchData);
BOOL WINAPI IsValidLocaleName(_In_ LPCWSTR lpLocaleName);
WINBASEAPI
BOOL
WINAPI
IsValidLocaleName(
_In_ LPCWSTR lpLocaleName);
BOOL
WINAPI
@ -1106,11 +1132,41 @@ GetStringScripts(
BOOL WINAPI SetProcessPreferredUILanguages(_In_ DWORD, _In_opt_ PCZZWSTR, _Out_opt_ PULONG);
BOOL WINAPI SetThreadPreferredUILanguages(_In_ DWORD, _In_opt_ PCZZWSTR, _Out_opt_ PULONG);
BOOL WINAPI VerifyScripts(_In_ DWORD, _In_ LPCWSTR, _In_ int, _In_ LPCWSTR, _In_ int);
INT WINAPI LCMapStringEx(_In_ LPCWSTR, _In_ DWORD, _In_ LPCWSTR, _In_ INT, _Out_opt_ LPWSTR, _In_ INT, _In_ LPNLSVERSIONINFO, _In_ LPVOID, _In_ LPARAM);
#if (WINVER >= _WIN32_WINNT_WIN8)
_When_((dwMapFlags & (LCMAP_SORTKEY | LCMAP_BYTEREV | LCMAP_HASH | LCMAP_SORTHANDLE)) != 0, _At_((LPBYTE) lpDestStr, _Out_writes_bytes_opt_(cchDest)))
#else
_When_((dwMapFlags & (LCMAP_SORTKEY | LCMAP_BYTEREV)) != 0, _At_((LPBYTE) lpDestStr, _Out_writes_bytes_opt_(cchDest)))
#endif
_When_(cchSrc != -1, _At_((WCHAR *) lpSrcStr, _Out_writes_opt_(cchSrc)))
_When_(cchDest != -1, _At_((WCHAR *) lpDestStr, _Out_writes_opt_(cchDest)))
WINBASEAPI
int
WINAPI
LCMapStringEx(
_In_opt_ LPCWSTR lpLocaleName,
_In_ DWORD dwMapFlags,
_In_reads_(cchSrc) LPCWSTR lpSrcStr,
_In_ int cchSrc,
_Out_writes_opt_(cchDest) LPWSTR lpDestStr,
_In_ int cchDest,
_In_opt_ LPNLSVERSIONINFO lpVersionInformation,
_In_opt_ LPVOID lpReserved,
_In_opt_ LPARAM sortHandle);
LCID WINAPI LocaleNameToLCID(_In_ LPCWSTR, _In_ DWORD);
#endif /* (WINVER >= 0x0600) */
WINBASEAPI
int
WINAPI
LCIDToLocaleName(
_In_ LCID Locale,
_Out_writes_opt_(cchName) LPWSTR lpName,
_In_ int cchName,
_In_ DWORD dwFlags);
#ifdef UNICODE
#define CALINFO_ENUMPROC CALINFO_ENUMPROCW
#define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXW
@ -1207,4 +1263,9 @@ typedef LPNUMBERFMTA LPNUMBERFMT;
#ifdef __cplusplus
}
#endif
#ifndef NOAPISET
#include <stringapiset.h>
#endif
#endif

View File

@ -226,6 +226,14 @@
#endif
#endif /* DECLSPEC_NOINLINE */
#ifndef DECLSPEC_GUARD_SUPPRESS
#if (_MSC_FULL_VER >= 181040116) || defined(_D1VERSIONLKG171_)
#define DECLSPEC_GUARD_SUPPRESS __declspec(guard(suppress))
#else
#define DECLSPEC_GUARD_SUPPRESS
#endif
#endif
#if !defined(_M_CEE_PURE)
#define NTAPI_INLINE NTAPI
#else

View File

@ -2,7 +2,7 @@
* Runtime Library Functions *
******************************************************************************/
$if (_WDMDDK_)
$if (_WDMDDK_ || _WINNT_)
#define FAST_FAIL_LEGACY_GS_VIOLATION 0
#define FAST_FAIL_VTGUARD_CHECK_FAILURE 1
#define FAST_FAIL_STACK_COOKIE_CHECK_FAILURE 2
@ -31,6 +31,9 @@ RtlFailFast(
__fastfail(Code);
}
$endif(_WDMDDK_ || _WINNT_)
$if (_WDMDDK_)
#if !defined(NO_KERNEL_LIST_ENTRY_CHECKS) && (defined(_M_CEE_PURE) || defined(_M_CEE_SAFE))
#define NO_KERNEL_LIST_ENTRY_CHECKS
#endif

View File

@ -75,6 +75,7 @@ $include(interlocked.h)
$include(ketypes.h)
$include(extypes.h)
$include(rtltypes.h)
$include(rtlfuncs.h)
$include(winnt_old.h)
#ifdef __cplusplus

View File

@ -130,14 +130,30 @@
#define STATUS_USER_APC ((DWORD)0x000000C0)
#define STATUS_TIMEOUT ((DWORD)0x00000102)
#define STATUS_PENDING ((DWORD)0x00000103)
#define DBG_EXCEPTION_HANDLED ((DWORD)0x00010001)
#define DBG_CONTINUE ((DWORD)0x00010002)
#define STATUS_SEGMENT_NOTIFICATION ((DWORD)0x40000005)
#define STATUS_FATAL_APP_EXIT ((DWORD)0x40000015)
#define DBG_REPLY_LATER ((DWORD)0x40010001)
#define DBG_TERMINATE_THREAD ((DWORD)0x40010003)
#define DBG_TERMINATE_PROCESS ((DWORD)0x40010004)
#define DBG_CONTROL_C ((DWORD)0x40010005)
#define DBG_PRINTEXCEPTION_C ((DWORD)0x40010006)
#define DBG_RIPEXCEPTION ((DWORD)0x40010007)
#define DBG_CONTROL_BREAK ((DWORD)0x40010008)
#define DBG_COMMAND_EXCEPTION ((DWORD)0x40010009)
#define DBG_PRINTEXCEPTION_WIDE_C ((DWORD)0x4001000A)
#define STATUS_GUARD_PAGE_VIOLATION ((DWORD)0x80000001)
#define STATUS_DATATYPE_MISALIGNMENT ((DWORD)0x80000002)
#define STATUS_BREAKPOINT ((DWORD)0x80000003)
#define STATUS_SINGLE_STEP ((DWORD)0x80000004)
#define STATUS_LONGJUMP ((DWORD)0x80000026)
#define STATUS_UNWIND_CONSOLIDATE ((DWORD)0x80000029)
#define DBG_EXCEPTION_NOT_HANDLED ((DWORD)0x80010001)
#define STATUS_ACCESS_VIOLATION ((DWORD)0xC0000005)
#define STATUS_IN_PAGE_ERROR ((DWORD)0xC0000006)
#define STATUS_INVALID_HANDLE ((DWORD)0xC0000008)
#define STATUS_INVALID_PARAMETER ((DWORD)0xC000000D)
#define STATUS_NO_MEMORY ((DWORD)0xC0000017)
#define STATUS_ILLEGAL_INSTRUCTION ((DWORD)0xC000001D)
#define STATUS_NONCONTINUABLE_EXCEPTION ((DWORD)0xC0000025)
@ -154,10 +170,23 @@
#define STATUS_INTEGER_OVERFLOW ((DWORD)0xC0000095)
#define STATUS_PRIVILEGED_INSTRUCTION ((DWORD)0xC0000096)
#define STATUS_STACK_OVERFLOW ((DWORD)0xC00000FD)
#define STATUS_DLL_NOT_FOUND ((DWORD)0xC0000135)
#define STATUS_ORDINAL_NOT_FOUND ((DWORD)0xC0000138)
#define STATUS_ENTRYPOINT_NOT_FOUND ((DWORD)0xC0000139)
#define STATUS_CONTROL_C_EXIT ((DWORD)0xC000013A)
#define STATUS_DLL_INIT_FAILED ((DWORD)0xC0000142)
#define STATUS_CONTROL_STACK_VIOLATION ((DWORD)0xC00001B2)
#define STATUS_FLOAT_MULTIPLE_FAULTS ((DWORD)0xC00002B4)
#define STATUS_FLOAT_MULTIPLE_TRAPS ((DWORD)0xC00002B5)
#define STATUS_REG_NAT_CONSUMPTION ((DWORD)0xC00002C9)
#define STATUS_HEAP_CORRUPTION ((DWORD)0xC0000374)
#define STATUS_STACK_BUFFER_OVERRUN ((DWORD)0xC0000409)
#define STATUS_INVALID_CRUNTIME_PARAMETER ((DWORD)0xC0000417)
#define STATUS_ASSERTION_FAILURE ((DWORD)0xC0000420)
#define STATUS_ENCLAVE_VIOLATION ((DWORD)0xC00004A2)
#define STATUS_INTERRUPTED ((DWORD)0xC0000515)
#define STATUS_THREAD_NOT_RUNNING ((DWORD)0xC0000516)
#define STATUS_ALREADY_REGISTERED ((DWORD)0xC0000718)
#define STATUS_SXS_EARLY_DEACTIVATION ((DWORD)0xC015000F)
#define STATUS_SXS_INVALID_DEACTIVATION ((DWORD)0xC0150010)