Bug #9208 ยป 001-win32-console.patch
win32/win32.c | ||
---|---|---|
#ifdef _WIN32_WCE
|
||
return FALSE;
|
||
#else
|
||
const void *const func = WriteConsoleW;
|
||
HMODULE k;
|
||
FARPROC func;
|
||
MEMORY_BASIC_INFORMATION m;
|
||
k = GetModuleHandle("kernel32");
|
||
if (!k) return FALSE;
|
||
func = GetProcAddress(k, "WriteConsoleW");
|
||
if (!func) return FALSE;
|
||
memset(&m, 0, sizeof(m));
|
||
if (!VirtualQuery(func, &m, sizeof(m))) {
|
||
return FALSE;
|
||
}
|
||
k = GetModuleHandle("kernel32.dll");
|
||
if (!k) return FALSE;
|
||
return (HMODULE)m.AllocationBase != k;
|
||
#endif
|
||
}
|