mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 16:46:16 +00:00
Support more features
This commit is contained in:
@@ -731,6 +731,12 @@ typedef struct _SYSTEM_RANGE_START_INFORMATION64
|
||||
EmulatorTraits<Emu64>::SIZE_T SystemRangeStart;
|
||||
} SYSTEM_RANGE_START_INFORMATION64, *PSYSTEM_RANGE_START_INFORMATION64;
|
||||
|
||||
typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
|
||||
{
|
||||
BOOLEAN KernelDebuggerEnabled;
|
||||
BOOLEAN KernelDebuggerNotPresent;
|
||||
} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
|
||||
|
||||
struct SID_AND_ATTRIBUTES64
|
||||
{
|
||||
EMULATOR_CAST(EmulatorTraits<Emu64>::PVOID, PSID) Sid;
|
||||
|
||||
@@ -397,6 +397,7 @@ constexpr auto BASE_NAMED_OBJECTS_DIRECTORY = make_pseudo_handle(0x2, handle_typ
|
||||
|
||||
constexpr auto KNOWN_DLLS_SYMLINK = make_pseudo_handle(0x1, handle_types::symlink);
|
||||
constexpr auto SHARED_SECTION = make_pseudo_handle(0x1, handle_types::section);
|
||||
constexpr auto DBWIN_BUFFER = make_pseudo_handle(0x2, handle_types::section);
|
||||
|
||||
constexpr auto WER_PORT_READY = make_pseudo_handle(0x1, handle_types::event);
|
||||
|
||||
|
||||
@@ -651,6 +651,12 @@ namespace
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (filename == u"DBWIN_BUFFER")
|
||||
{
|
||||
section_handle.write(DBWIN_BUFFER);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (filename == u"windows_shell_global_counters" //
|
||||
|| filename == u"{00020000-0000-1005-8005-0000C06B5161}" //
|
||||
|| filename == u"Global\\{00020000-0000-1005-8005-0000C06B5161}")
|
||||
@@ -1052,6 +1058,28 @@ namespace
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (info_class == SystemKernelDebuggerInformation)
|
||||
{
|
||||
if (return_length)
|
||||
{
|
||||
return_length.write(sizeof(SYSTEM_KERNEL_DEBUGGER_INFORMATION));
|
||||
}
|
||||
|
||||
if (system_information_length != sizeof(SYSTEM_KERNEL_DEBUGGER_INFORMATION))
|
||||
{
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
const emulator_object<SYSTEM_KERNEL_DEBUGGER_INFORMATION> info_obj{c.emu, system_information};
|
||||
|
||||
info_obj.access([&](SYSTEM_KERNEL_DEBUGGER_INFORMATION& info) {
|
||||
info.KernelDebuggerEnabled = FALSE;
|
||||
info.KernelDebuggerNotPresent = TRUE;
|
||||
});
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (info_class == SystemProcessInformation || info_class == SystemModuleInformation)
|
||||
{
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
@@ -1341,7 +1369,8 @@ namespace
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (info_class == ProcessDefaultHardErrorMode || info_class == ProcessWx86Information)
|
||||
if (info_class == ProcessDefaultHardErrorMode || info_class == ProcessWx86Information ||
|
||||
info_class == ProcessDebugFlags)
|
||||
{
|
||||
if (return_length)
|
||||
{
|
||||
@@ -1359,6 +1388,24 @@ namespace
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (info_class == ProcessDebugObjectHandle)
|
||||
{
|
||||
if (return_length)
|
||||
{
|
||||
return_length.write(sizeof(handle));
|
||||
}
|
||||
|
||||
if (process_information_length != sizeof(handle))
|
||||
{
|
||||
return STATUS_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
const emulator_object<handle> info{c.emu, process_information};
|
||||
info.write(NULL_HANDLE);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (info_class == ProcessEnclaveInformation || info_class == ProcessMitigationPolicy)
|
||||
{
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
@@ -3524,11 +3571,21 @@ namespace
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
NTSTATUS handle_NtSystemDebugControl()
|
||||
{
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
NTSTATUS handle_NtUserFindWindowEx()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
NTSTATUS handle_NtUserMoveWindow()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
NTSTATUS handle_NtGetNextThread(const syscall_context& c, const handle process_handle, const handle thread_handle,
|
||||
const ACCESS_MASK /*desired_access*/, const ULONG /*handle_attributes*/,
|
||||
const ULONG flags, const emulator_object<handle> new_thread_handle)
|
||||
@@ -3763,6 +3820,8 @@ void syscall_dispatcher::add_handlers(std::map<std::string, syscall_handler>& ha
|
||||
add_handler(NtUserFindExistingCursorIcon);
|
||||
add_handler(NtSetContextThread);
|
||||
add_handler(NtUserFindWindowEx);
|
||||
add_handler(NtUserMoveWindow);
|
||||
add_handler(NtSystemDebugControl);
|
||||
|
||||
#undef add_handler
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user