A recent change to the game Everquest adds a call to EnumSystemFirmwareTables. This of course causes the game to crash. Adding this stub call restores full functionality to the game.
Signed-off-by: Steven Bell bell.steven@gmail.com --- .../api-ms-win-core-sysinfo-l1-2-0.spec | 2 +- .../api-ms-win-core-sysinfo-l1-2-1.spec | 2 +- dlls/kernel32/cpu.c | 14 ++++++++++++-- dlls/kernel32/kernel32.spec | 2 +- dlls/kernelbase/kernelbase.spec | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec b/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec index 9b0567412d..1103427d4d 100644 --- a/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec +++ b/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec @@ -1,4 +1,4 @@ -@ stub EnumSystemFirmwareTables +@ stdcall EnumSystemFirmwareTables(long ptr long) kernel32.EnumSystemFirmwareTables @ stdcall GetComputerNameExA(long ptr ptr) kernel32.GetComputerNameExA @ stdcall GetComputerNameExW(long ptr ptr) kernel32.GetComputerNameExW @ stdcall GetLocalTime(ptr) kernel32.GetLocalTime diff --git a/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec b/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec index 6da2f25fa1..9a89b4b57a 100644 --- a/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec +++ b/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec @@ -1,5 +1,5 @@ @ stub DnsHostnameToComputerNameExW -@ stub EnumSystemFirmwareTables +@ stdcall EnumSystemFirmwareTables(long ptr long) kernel32.EnumSystemFirmwareTables @ stdcall GetComputerNameExA(long ptr ptr) kernel32.GetComputerNameExA @ stdcall GetComputerNameExW(long ptr ptr) kernel32.GetComputerNameExW @ stdcall GetLocalTime(ptr) kernel32.GetLocalTime diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 7668a10ea4..f92d646d2a 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -50,7 +50,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg); * QueryPerformanceCounter (KERNEL32.@) * * Get the current value of the performance counter. - * + * * PARAMS * counter [O] Destination for the current counter reading * @@ -176,7 +176,7 @@ VOID WINAPI GetNativeSystemInfo( { BOOL is_wow64;
- GetSystemInfo(si); + GetSystemInfo(si);
IsWow64Process(GetCurrentProcess(), &is_wow64); if (is_wow64) @@ -365,3 +365,13 @@ UINT WINAPI GetSystemFirmwareTable(DWORD provider, DWORD id, void *buffer, DWORD HeapFree(GetProcessHeap(), 0, sfti); return buffer_size; } + + +/*********************************************************************** + * EnumSystemFirmwareTables (KERNEL32.@) + */ +UINT WINAPI EnumSystemFirmwareTables(DWORD provider, void *buffer, DWORD size) +{ + FIXME("stub, always returning 0\n"); + return 0; +} diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 979ebd9fea..241c1215c6 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -418,7 +418,7 @@ @ stdcall EnumResourceTypesW(long ptr long) @ stdcall EnumSystemCodePagesA(ptr long) @ stdcall EnumSystemCodePagesW(ptr long) -# @ stub EnumSystemFirmwareTables +@ stdcall EnumSystemFirmwareTables(long ptr long) @ stdcall EnumSystemGeoID(long long ptr) @ stdcall EnumSystemLanguageGroupsA(ptr long ptr) @ stdcall EnumSystemLanguageGroupsW(ptr long ptr) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 8087736d12..f44195a4ea 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -312,7 +312,7 @@ @ stdcall EnumResourceTypesExA(long ptr long long long) @ stdcall EnumResourceTypesExW(long ptr long long long) @ stdcall EnumSystemCodePagesW(ptr long) kernel32.EnumSystemCodePagesW -# @ stub EnumSystemFirmwareTables +@ stdcall EnumSystemFirmwareTables(long ptr long) kernel32.EnumSystemFirmwareTables @ stdcall EnumSystemGeoID(long long ptr) kernel32.EnumSystemGeoID @ stdcall EnumSystemLanguageGroupsW(ptr long ptr) kernel32.EnumSystemLanguageGroupsW @ stdcall EnumSystemLocalesA(ptr long) kernel32.EnumSystemLocalesA
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=54947
Your paranoid android.
=== debian10 (32 bit report) ===
kernel32: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x00438134).
Report errors: kernel32:virtual prints too much data (91050 bytes)
=== debian10 (32 bit Chinese:China report) ===
kernel32: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x00438134).
Report errors: kernel32:virtual prints too much data (91050 bytes)
=== debian10 (32 bit WoW report) ===
kernel32: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x00438134).
Report errors: kernel32:virtual prints too much data (91050 bytes)
=== debian10 (64 bit WoW report) ===
kernel32: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x00438134).
Report errors: kernel32:virtual prints too much data (91050 bytes)