mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-17 19:13:55 +00:00
# Conflicts: # src/analyzer/main.cpp # src/emulator/memory_region.hpp # src/windows-emulator/io_device.cpp # src/windows-emulator/module/module_mapping.cpp # src/windows-emulator/process_context.hpp # src/windows-emulator/syscalls.cpp # src/windows-emulator/windows_emulator.cpp
33 lines
647 B
C++
33 lines
647 B
C++
#include "io_device.hpp"
|
|
#include "devices/afd_endpoint.hpp"
|
|
|
|
namespace
|
|
{
|
|
struct dummy_device : stateless_device
|
|
{
|
|
NTSTATUS io_control(windows_emulator&, const io_device_context&) override
|
|
{
|
|
return STATUS_SUCCESS;
|
|
}
|
|
};
|
|
}
|
|
|
|
std::unique_ptr<io_device> create_device(const std::u16string_view device)
|
|
{
|
|
if (device == u"CNG"
|
|
|| device == u"KsecDD"
|
|
|| device == u"PcwDrv"
|
|
|| device == u"DeviceApi\\CMApi"
|
|
|| device == u"ConDrv\\Server")
|
|
{
|
|
return std::make_unique<dummy_device>();
|
|
}
|
|
|
|
if (device == u"Afd\\Endpoint")
|
|
{
|
|
return create_afd_endpoint();
|
|
}
|
|
|
|
throw std::runtime_error("Unsupported device: " + u16_to_u8(device));
|
|
}
|