#include "../std_include.hpp" #include "../emulator_utils.hpp" #include "../syscall_utils.hpp" namespace syscalls { NTSTATUS handle_NtRaiseHardError(const syscall_context& c, const NTSTATUS error_status, const ULONG /*number_of_parameters*/, const emulator_object>> /*unicode_string_parameter_mask*/, const emulator_object /*parameters*/, const HARDERROR_RESPONSE_OPTION /*valid_response_option*/, const emulator_object response) { if (response) { response.write(ResponseAbort); } c.proc.exit_status = error_status; c.proc.exception_rip = c.emu.read_instruction_pointer(); c.emu.stop(); return STATUS_SUCCESS; } NTSTATUS handle_NtRaiseException( const syscall_context& c, const emulator_object>> /*exception_record*/, const emulator_object thread_context, const BOOLEAN handle_exception) { if (handle_exception) { c.win_emu.log.error("Unhandled exceptions not supported yet!\n"); c.emu.stop(); return STATUS_NOT_SUPPORTED; } c.proc.exception_rip = thread_context.read().Rip; c.emu.stop(); return STATUS_SUCCESS; } }