diff --git a/src/emulator/serialization.hpp b/src/emulator/serialization.hpp index e8eee856..7f6adf37 100644 --- a/src/emulator/serialization.hpp +++ b/src/emulator/serialization.hpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include diff --git a/src/windows-emulator/registry/registry_manager.cpp b/src/windows-emulator/registry/registry_manager.cpp index ad5c7801..963a4f2d 100644 --- a/src/windows-emulator/registry/registry_manager.cpp +++ b/src/windows-emulator/registry/registry_manager.cpp @@ -32,7 +32,7 @@ namespace void register_hive(registry_manager::hive_map& hives, const std::filesystem::path& key, const std::filesystem::path& file) { - hives[canonicalize_path(key)] = std::make_unique(file); + hives[canonicalize_path(key).u16string()] = std::make_unique(file); } } @@ -95,7 +95,7 @@ std::filesystem::path registry_manager::normalize_path(const std::filesystem::pa void registry_manager::add_path_mapping(const std::filesystem::path& key, const std::filesystem::path& value) { - this->path_mapping_[canonicalize_path(key)] = canonicalize_path(value); + this->path_mapping_[canonicalize_path(key).u16string()] = canonicalize_path(value); } std::optional registry_manager::get_key(const std::filesystem::path& key) @@ -137,7 +137,7 @@ std::optional registry_manager::get_value(const registry_key& ke { utils::string::to_lower_inplace(name); - const auto iterator = this->hives_.find(key.hive); + const auto iterator = this->hives_.find(key.hive.u16string()); if (iterator == this->hives_.end()) { return std::nullopt; diff --git a/src/windows-emulator/registry/registry_manager.hpp b/src/windows-emulator/registry/registry_manager.hpp index 0c14d79c..a07c8947 100644 --- a/src/windows-emulator/registry/registry_manager.hpp +++ b/src/windows-emulator/registry/registry_manager.hpp @@ -33,7 +33,7 @@ class registry_manager { public: using hive_ptr = std::unique_ptr; - using hive_map = std::unordered_map; + using hive_map = std::unordered_map; registry_manager(); registry_manager(const std::filesystem::path& hive_path); @@ -54,7 +54,7 @@ class registry_manager private: std::filesystem::path hive_path_{}; hive_map hives_{}; - std::unordered_map path_mapping_{}; + std::unordered_map path_mapping_{}; std::filesystem::path normalize_path(const std::filesystem::path& path) const; void add_path_mapping(const std::filesystem::path& key, const std::filesystem::path& value); diff --git a/src/windows-emulator/std_include.hpp b/src/windows-emulator/std_include.hpp index 55d332a4..4a6c82b2 100644 --- a/src/windows-emulator/std_include.hpp +++ b/src/windows-emulator/std_include.hpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,7 @@ #include #include #include +#include #include #include