diff --git a/src/common/platform/file_management.hpp b/src/common/platform/file_management.hpp index 34dbdd05..5c6d091e 100644 --- a/src/common/platform/file_management.hpp +++ b/src/common/platform/file_management.hpp @@ -328,6 +328,11 @@ typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION ULONG ReparseTag; } FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION; +typedef struct _FILE_IS_REMOTE_DEVICE_INFORMATION +{ + BOOLEAN IsRemote; +} FILE_IS_REMOTE_DEVICE_INFORMATION, *PFILE_IS_REMOTE_DEVICE_INFORMATION; + typedef struct _FILE_STANDARD_INFORMATION { LARGE_INTEGER AllocationSize; diff --git a/src/windows-emulator/syscalls/file.cpp b/src/windows-emulator/syscalls/file.cpp index a9b75937..49fece70 100644 --- a/src/windows-emulator/syscalls/file.cpp +++ b/src/windows-emulator/syscalls/file.cpp @@ -547,12 +547,36 @@ namespace syscalls return ret(STATUS_SUCCESS); } + if (info_class == FileIsRemoteDeviceInformation) + { + if (!f->handle) + { + return ret(STATUS_NOT_SUPPORTED); + } + + block.Information = sizeof(FILE_IS_REMOTE_DEVICE_INFORMATION); + + if (length < block.Information) + { + return ret(STATUS_BUFFER_OVERFLOW); + } + + const emulator_object info{c.emu, file_information}; + FILE_IS_REMOTE_DEVICE_INFORMATION i{}; + + i.IsRemote = FALSE; + + info.write(i); + + return ret(STATUS_SUCCESS); + } + if (info_class == FileAllInformation) { return ret(STATUS_NOT_SUPPORTED); } - c.win_emu.log.error("Unsupported query file info class: %X\n", info_class); + c.win_emu.log.error("Unsupported query file info class: 0x%X\n", info_class); c.emu.stop(); return ret(STATUS_NOT_SUPPORTED);