From f08a97eae67aba83d9c1a8f27c22f792b9aefc52 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 5 Jan 2025 14:58:30 +0100 Subject: [PATCH] Fix compilation after merge --- src/common/platform/file_management.hpp | 6 ++++-- src/common/platform/kernel_mapped.hpp | 2 +- src/windows-emulator/syscalls.cpp | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/common/platform/file_management.hpp b/src/common/platform/file_management.hpp index 0d9ead13..2ae4960f 100644 --- a/src/common/platform/file_management.hpp +++ b/src/common/platform/file_management.hpp @@ -67,6 +67,8 @@ #define SL_RETURN_SINGLE_ENTRY 0x02 #define SL_NO_CURSOR_UPDATE 0x10 +#define SEC_IMAGE 0x01000000 + typedef enum _FSINFOCLASS { FileFsVolumeInformation = 1, // q: FILE_FS_VOLUME_INFORMATION @@ -330,8 +332,8 @@ typedef struct _FILE_BOTH_DIR_INFORMATION ULONG FileAttributes; ULONG FileNameLength; ULONG EaSize; - CCHAR ShortNameLength; - WCHAR ShortName[12]; + char ShortNameLength; + char16_t ShortName[12]; char16_t FileName[1]; } FILE_BOTH_DIR_INFORMATION, * PFILE_BOTH_DIR_INFORMATION; diff --git a/src/common/platform/kernel_mapped.hpp b/src/common/platform/kernel_mapped.hpp index e01d7ca1..28b56ea2 100644 --- a/src/common/platform/kernel_mapped.hpp +++ b/src/common/platform/kernel_mapped.hpp @@ -841,7 +841,7 @@ struct THREAD_TLS_INFO union { EmulatorTraits::PVOID* TlsVector; - PVOID TlsModulePointer; + EmulatorTraits::PVOID TlsModulePointer; }; EMULATOR_CAST(std::uint64_t, ULONG_PTR) ThreadId; diff --git a/src/windows-emulator/syscalls.cpp b/src/windows-emulator/syscalls.cpp index 93a6cb8e..6a02a325 100644 --- a/src/windows-emulator/syscalls.cpp +++ b/src/windows-emulator/syscalls.cpp @@ -1775,8 +1775,8 @@ namespace { const auto tls_entry_ptr = tls_vector + tls_info.TlsIndex; - const auto old_entry = c.emu.read_memory(tls_entry_ptr); - c.emu.write_memory(tls_entry_ptr, entry.TlsModulePointer); + const auto old_entry = c.emu.read_memory::PVOID>(tls_entry_ptr); + c.emu.write_memory::PVOID>(tls_entry_ptr, entry.TlsModulePointer); entry.TlsModulePointer = old_entry; }