From a4bf68b613a443538a54e77ff2863c88c1c8a86a Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Thu, 2 May 2024 17:50:27 +0200 Subject: added logic to change default HTTP server implementation when running on Wine (#71) * added logic to change default HTTP server implementation when running on Wine * added log message to inform user about potential problems when running under Wine --- src/zencore/windows.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/zencore/windows.cpp') diff --git a/src/zencore/windows.cpp b/src/zencore/windows.cpp index 76d8ab445..d02fcd35e 100644 --- a/src/zencore/windows.cpp +++ b/src/zencore/windows.cpp @@ -9,6 +9,19 @@ namespace zen::windows { +bool +IsRunningOnWine() +{ + HMODULE NtDll = GetModuleHandleA("ntdll.dll"); + + if (NtDll) + { + return !!GetProcAddress(NtDll, "wine_get_version"); + } + + return false; +} + FileMapping::FileMapping(_In_ FileMapping& orig) { m_pData = NULL; -- cgit v1.2.3