Reattach to cmd if wfreerdp was started from one.

This commit is contained in:
Armin Novak 2019-08-29 13:47:53 +02:00
parent 8e12c0a2a0
commit 81c60631a9

View File

@ -60,7 +60,7 @@
static int wf_create_console(void)
{
if (!AllocConsole())
if (!AttachConsole(ATTACH_PARENT_PROCESS))
return 1;
freopen("CONOUT$", "w", stdout);
@ -916,9 +916,8 @@ static BOOL wfreerdp_client_global_init(void)
WSADATA wsaData;
WSAStartup(0x101, &wsaData);
#if defined(WITH_DEBUG) || defined(_DEBUG)
wf_create_console();
#endif
freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0);
return TRUE;
}