Introduce windows emulation context

This fixes #6
This commit is contained in:
momo5502
2024-09-13 13:48:21 +02:00
parent 53eeb988a7
commit 370665b520
6 changed files with 703 additions and 568 deletions

View File

@@ -1577,8 +1577,10 @@ namespace
}
}
syscall_dispatcher::syscall_dispatcher(const exported_symbols& ntdll_exports, const exported_symbols& win32u_exports)
void syscall_dispatcher::setup(const exported_symbols& ntdll_exports, const exported_symbols& win32u_exports)
{
this->handlers_ = {};
const auto ntdll_syscalls = find_syscalls(ntdll_exports);
const auto win32u_syscalls = find_syscalls(win32u_exports);
@@ -1588,6 +1590,11 @@ syscall_dispatcher::syscall_dispatcher(const exported_symbols& ntdll_exports, co
this->add_handlers();
}
syscall_dispatcher::syscall_dispatcher(const exported_symbols& ntdll_exports, const exported_symbols& win32u_exports)
{
this->setup(ntdll_exports, win32u_exports);
}
void syscall_dispatcher::add_handlers()
{
std::unordered_map<std::string, syscall_handler> handler_mapping{};