diff options
Diffstat (limited to 'src/zencore')
| -rw-r--r-- | src/zencore/include/zencore/windows.h | 2 | ||||
| -rw-r--r-- | src/zencore/windows.cpp | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/windows.h b/src/zencore/include/zencore/windows.h index 14026fef1..b2b220f8f 100644 --- a/src/zencore/include/zencore/windows.h +++ b/src/zencore/include/zencore/windows.h @@ -412,5 +412,7 @@ private: DWORD m_dwViewDesiredAccess; }; +bool IsRunningOnWine(); + } // namespace zen::windows #endif 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; |