From 1ece9da72e9dd60b598bc8e2958ddc3ef8094d28 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 7 Aug 2001 08:42:17 +0000 Subject: [PATCH] Remove the OSVERSIONINFOEX code because there's no obvious way to determine whether it'll compile before receiving the compile error. Gah. git-svn-id: svn://svn.tartarus.org/sgt/putty@1175 cda61777-01e9-0310-a592-d414129be87e --- window.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/window.c b/window.c index 42e4d6d0..ff7ae2a4 100644 --- a/window.c +++ b/window.c @@ -128,7 +128,7 @@ static char *window_name, *icon_name; static int compose_state = 0; -static OSVERSIONINFOEX osVersion; +static OSVERSIONINFO osVersion; /* Dummy routine, only required in plink. */ void ldisc_update(int echo, int edit) @@ -170,15 +170,12 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { ZeroMemory(&osVersion, sizeof(osVersion)); - osVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - - if(!GetVersionEx ((OSVERSIONINFO *) &osVersion)) { - // If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO. - osVersion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); - if (!GetVersionEx ( (OSVERSIONINFO *) &osVersion)) - return FALSE; - } + if (!GetVersionEx ( (OSVERSIONINFO *) &osVersion)) { + MessageBox(NULL, "Windows refuses to report a version", + "PuTTY Fatal Error", MB_OK | MB_ICONEXCLAMATION); + return 1; + } } /* -- 2.11.0