mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-26 07:01:02 +00:00
Improvements to locale syscalls, fix TimeZone query and add more syscalls (#223)
This PR aims to do the following: - Add the `NtUserGetAtomName` syscall. - Add stub handlers for `NtUserSetWindowsHookEx`, `NtUserUnhookWindowsHookEx`, and `NtUserCreateWindowEx`. - Implement `NtGetNlsSectionPtr` (for Code Pages), add `NtQueryDefaultUILanguage`, and improve `NtQueryInstallUILanguage`. - Handle `SystemTimeZoneInformation`, `SystemCurrentTimeZoneInformation`, and `SystemDynamicTimeZoneInformation` in `NtQuerySystemInformation`. - Skip `ThreadAffinityMask` in `NtSetInformationThread`. - Fix `NtConnectPort` to allow TimeZone queries to work properly. This is probably the most problematic change here because it required messing with the shared section and hardcoding an offset (2504). Initializing the data in this offset seems necessary for calls like `GetTimeZoneInformation` to succeed, so maybe there's no other way around it.
This commit is contained in:
@@ -453,6 +453,7 @@ union TEB_SAME_TEB_FLAGS_UNION
|
||||
|
||||
#ifndef OS_WINDOWS
|
||||
using LCID = DWORD;
|
||||
using LANGID = WORD;
|
||||
#endif
|
||||
|
||||
typedef struct _TEB64
|
||||
@@ -862,6 +863,44 @@ typedef struct _SYSTEM_TIMEOFDAY_INFORMATION64
|
||||
ULONGLONG SleepTimeBias;
|
||||
} SYSTEM_TIMEOFDAY_INFORMATION64, *PSYSTEM_TIMEOFDAY_INFORMATION64;
|
||||
|
||||
#ifndef OS_WINDOWS
|
||||
typedef struct _SYSTEMTIME
|
||||
{
|
||||
WORD wYear;
|
||||
WORD wMonth;
|
||||
WORD wDayOfWeek;
|
||||
WORD wDay;
|
||||
WORD wHour;
|
||||
WORD wMinute;
|
||||
WORD wSecond;
|
||||
WORD wMilliseconds;
|
||||
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
|
||||
#endif
|
||||
|
||||
typedef struct _SYSTEM_TIMEZONE_INFORMATION
|
||||
{
|
||||
LONG Bias;
|
||||
ARRAY_CONTAINER<char16_t, 32> StandardName;
|
||||
SYSTEMTIME StandardDate;
|
||||
LONG StandardBias;
|
||||
ARRAY_CONTAINER<char16_t, 32> DaylightName;
|
||||
SYSTEMTIME DaylightDate;
|
||||
LONG DaylightBias;
|
||||
} SYSTEM_TIMEZONE_INFORMATION, *PSYSTEM_TIMEZONE_INFORMATION;
|
||||
|
||||
typedef struct _SYSTEM_DYNAMIC_TIMEZONE_INFORMATION
|
||||
{
|
||||
LONG Bias;
|
||||
ARRAY_CONTAINER<char16_t, 32> StandardName;
|
||||
SYSTEMTIME StandardDate;
|
||||
LONG StandardBias;
|
||||
ARRAY_CONTAINER<char16_t, 32> DaylightName;
|
||||
SYSTEMTIME DaylightDate;
|
||||
LONG DaylightBias;
|
||||
ARRAY_CONTAINER<char16_t, 128> TimeZoneKeyName;
|
||||
BOOLEAN DynamicDaylightTimeDisabled;
|
||||
} SYSTEM_DYNAMIC_TIMEZONE_INFORMATION, *PSYSTEM_DYNAMIC_TIMEZONE_INFORMATION;
|
||||
|
||||
typedef struct _PROCESS_BASIC_INFORMATION64
|
||||
{
|
||||
NTSTATUS ExitStatus;
|
||||
|
||||
Reference in New Issue
Block a user