mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-24 06:01:02 +00:00
Prepare socket support
This commit is contained in:
@@ -314,6 +314,7 @@ constexpr auto SHARED_SECTION = make_pseudo_handle(0x1337, handle_types::section
|
||||
constexpr auto CONSOLE_SERVER = make_pseudo_handle(0x1338, handle_types::section);
|
||||
constexpr auto CM_API = make_pseudo_handle(0x1338, handle_types::file);
|
||||
constexpr auto KSEC_DD = make_pseudo_handle(0x1339, handle_types::file);
|
||||
constexpr auto AFD_ENDPOINT = make_pseudo_handle(0x133A, handle_types::file);
|
||||
|
||||
constexpr auto CONSOLE_HANDLE = make_pseudo_handle(0x1, handle_types::file);
|
||||
constexpr auto STDOUT_HANDLE = make_pseudo_handle(0x2, handle_types::file);
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <cwctype>
|
||||
#include <utils/io.hpp>
|
||||
|
||||
#include "utils/finally.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
NTSTATUS handle_NtQueryPerformanceCounter(const syscall_context& c,
|
||||
@@ -2033,7 +2035,10 @@ namespace
|
||||
const auto attributes = object_attributes.read();
|
||||
auto filename = read_unicode_string(c.emu, attributes.ObjectName);
|
||||
|
||||
c.win_emu.logger.print(color::dark_gray, "--> Opening file: %S\n", filename.c_str());
|
||||
auto printer = utils::finally([&]
|
||||
{
|
||||
c.win_emu.logger.print(color::dark_gray, "--> Opening file: %S\n", filename.c_str());
|
||||
});
|
||||
|
||||
if (filename == L"\\Device\\ConDrv\\Server")
|
||||
{
|
||||
@@ -2053,6 +2058,12 @@ namespace
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (filename.starts_with(L"\\Device\\Afd\\Endpoint"))
|
||||
{
|
||||
file_handle.write(AFD_ENDPOINT.bits);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (filename.starts_with(L"\\Device\\"))
|
||||
{
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
@@ -2080,6 +2091,8 @@ namespace
|
||||
f.name = root->name + f.name;
|
||||
}
|
||||
|
||||
printer.cancel();
|
||||
|
||||
if (f.name.ends_with(L"\\"))
|
||||
{
|
||||
c.win_emu.logger.print(color::dark_gray, "--> Opening folder: %S\n", f.name.c_str());
|
||||
|
||||
Reference in New Issue
Block a user