| 121 | |
| 122 | |
| 123 | static 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 | |
| 134 | static DWORD findProcess(LPCWSTR name) { |
| 135 | PROCESSENTRY32W entry; |