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
#endif
#define PROCESSOR_ARCHITECTURE_INTEL 0
#define PROCESSOR_ARCHITECTURE_AMD64 9
enum class PEMachineType : std::uint16_t

View File

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