MCPcopy Create free account
hub / github.com/DFHack/dfhack / is_running_on_wine

Function is_running_on_wine

library/modules/DFSteam.cpp:123–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121
122
123static bool is_running_on_wine() {
124 typedef const char* (CDECL wine_get_version)(void);
125 static wine_get_version* pwine_get_version;
126 HMODULE hntdll = GetModuleHandle("ntdll.dll");
127 if(!hntdll)
128 return false;
129
130 pwine_get_version = (wine_get_version*) GetProcAddress(hntdll, "wine_get_version");
131 return !!pwine_get_version;
132}
133
134static DWORD findProcess(LPCWSTR name) {
135 PROCESSENTRY32W entry;

Callers 1

launchDFHackFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected