diff --git a/src/windows_emulator/handles.hpp b/src/windows_emulator/handles.hpp index 49f8c127..35c208bc 100644 --- a/src/windows_emulator/handles.hpp +++ b/src/windows_emulator/handles.hpp @@ -179,7 +179,8 @@ private: constexpr auto KNOWN_DLLS_DIRECTORY = make_pseudo_handle(0x1337, handle_types::directory); constexpr auto KNOWN_DLLS_SYMLINK = make_pseudo_handle(0x1337, handle_types::symlink); constexpr auto SHARED_SECTION = make_pseudo_handle(0x1337, handle_types::section); -constexpr auto CONSOLE_SERVER = 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 CONSOLE_HANDLE = make_pseudo_handle(0x1, handle_types::file); constexpr auto STDOUT_HANDLE = make_pseudo_handle(0x2, handle_types::file); diff --git a/src/windows_emulator/syscalls.cpp b/src/windows_emulator/syscalls.cpp index b3b48f10..27ae5479 100644 --- a/src/windows_emulator/syscalls.cpp +++ b/src/windows_emulator/syscalls.cpp @@ -1428,6 +1428,12 @@ namespace return STATUS_SUCCESS; } + if (filename == L"\\Device\\DeviceApi\\CMApi") + { + file_handle.write(CM_API.bits); + return STATUS_SUCCESS; + } + handle root_handle{}; root_handle.bits = reinterpret_cast(attributes.RootDirectory); if (root_handle.value.is_pseudo && (filename == L"\\Reference" || filename == L"\\Connect"))