mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-21 20:53:56 +00:00
Prepare socket support
This commit is contained in:
@@ -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