Add 3 new syscall handlers

This commit is contained in:
Igor Pissolati
2025-04-19 16:33:34 -03:00
parent 5d19803020
commit c702bedaee
3 changed files with 40 additions and 2 deletions

View File

@@ -846,4 +846,22 @@ namespace syscalls
return STATUS_NOT_SUPPORTED;
}
}
NTSTATUS handle_NtFlushBuffersFile(const syscall_context& c, const handle file_handle,
const emulator_object<IO_STATUS_BLOCK<EmulatorTraits<Emu64>>> /*io_status_block*/)
{
if (file_handle == STDOUT_HANDLE)
{
return STATUS_SUCCESS;
}
const auto* f = c.proc.files.get(file_handle);
if (!f)
{
return STATUS_INVALID_HANDLE;
}
(void)fflush(f->handle);
return STATUS_SUCCESS;
}
}