From 6ef5ed8110f7461b78c7195b40b177774e0bf782 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Wed, 16 Sep 2015 00:00:25 +0200 Subject: [PATCH] Remove dynamic loading of AttachConsole. API is available since WinXP. --- src/msw/app.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 450605f09f..860bde87e3 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -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