Remove dynamic loading of AttachConsole.

API is available since WinXP.
This commit is contained in:
Tobias Taschner 2015-09-16 00:00:25 +02:00
parent e78be14ac1
commit 6ef5ed8110

View File

@ -377,10 +377,7 @@ bool wxConsoleStderr::DoInit()
if ( !m_dllKernel32.Load(wxT("kernel32.dll")) )
return false;
typedef BOOL (WINAPI *AttachConsole_t)(DWORD dwProcessId);
AttachConsole_t wxDL_INIT_FUNC(pfn, AttachConsole, m_dllKernel32);
if ( !pfnAttachConsole || !pfnAttachConsole(ATTACH_PARENT_PROCESS) )
if ( !::AttachConsole(ATTACH_PARENT_PROCESS) )
return false;
// console attached, set m_hStderr now to ensure that we free it in the