X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinplink.c;h=a67a2375487c54c64455bbfc47887d305d5203bf;hb=49d2cf19accb059b3b68d1fc2b78e606a578c3e8;hp=fdf019013fca65c9ff5011659cb354fe67baefb5;hpb=fb581ac62541bfe09ebbc1de07ef678998b9a539;p=PuTTY.git diff --git a/windows/winplink.c b/windows/winplink.c index fdf01901..a67a2375 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -12,7 +12,7 @@ #include "storage.h" #include "tree234.h" -#define WM_AGENT_CALLBACK (WM_XUSER + 4) +#define WM_AGENT_CALLBACK (WM_APP + 4) #define MAX_STDIN_BACKLOG 4096 @@ -598,16 +598,16 @@ int main(int argc, char **argv) inhandle = GetStdHandle(STD_INPUT_HANDLE); outhandle = GetStdHandle(STD_OUTPUT_HANDLE); errhandle = GetStdHandle(STD_ERROR_HANDLE); - GetConsoleMode(inhandle, &orig_console_mode); - SetConsoleMode(inhandle, ENABLE_PROCESSED_INPUT); - - main_thread_id = GetCurrentThreadId(); - /* * Turn off ECHO and LINE input modes. We don't care if this * call fails, because we know we aren't necessarily running in * a console. */ + GetConsoleMode(inhandle, &orig_console_mode); + SetConsoleMode(inhandle, ENABLE_PROCESSED_INPUT); + + main_thread_id = GetCurrentThreadId(); + handles[0] = netevent; handles[1] = stdinevent; handles[2] = stdoutevent;