Support SystemEmulationProcessorInformation (#672)

This PR implements `SystemEmulationProcessorInformation`. It is used,
for example, in 32-bit `ole32.dll`.
This commit is contained in:
Maurice Heumann
2026-01-02 22:10:52 +01:00
committed by GitHub
2 changed files with 9 additions and 6 deletions

View File

@@ -94,6 +94,7 @@
#define IMAGE_FILE_MACHINE_CEE 0xC0EE #define IMAGE_FILE_MACHINE_CEE 0xC0EE
#endif #endif
#define PROCESSOR_ARCHITECTURE_INTEL 0
#define PROCESSOR_ARCHITECTURE_AMD64 9 #define PROCESSOR_ARCHITECTURE_AMD64 9
enum class PEMachineType : std::uint16_t enum class PEMachineType : std::uint16_t

View File

@@ -199,12 +199,14 @@ namespace syscalls
}); });
case SystemProcessorInformation: case SystemProcessorInformation:
return handle_query<SYSTEM_PROCESSOR_INFORMATION64>(c.emu, system_information, system_information_length, return_length, case SystemEmulationProcessorInformation:
[&](SYSTEM_PROCESSOR_INFORMATION64& info) { return handle_query<SYSTEM_PROCESSOR_INFORMATION64>(
memset(&info, 0, sizeof(info)); c.emu, system_information, system_information_length, return_length, [&](SYSTEM_PROCESSOR_INFORMATION64& info) {
info.MaximumProcessors = 2; memset(&info, 0, sizeof(info));
info.ProcessorArchitecture = PROCESSOR_ARCHITECTURE_AMD64; info.MaximumProcessors = 2;
}); info.ProcessorArchitecture =
(info_class == SystemProcessorInformation ? PROCESSOR_ARCHITECTURE_AMD64 : PROCESSOR_ARCHITECTURE_INTEL);
});
case SystemNumaProcessorMap: case SystemNumaProcessorMap:
return handle_query<SYSTEM_NUMA_INFORMATION64>(c.emu, system_information, system_information_length, return_length, return handle_query<SYSTEM_NUMA_INFORMATION64>(c.emu, system_information, system_information_length, return_length,